Running 2 Youtube Channel : The Masti Adda (Fun based ) : The Knowledge Adda (Knowledge based) : Subscribe for Knowledge with Fun....

Write an assembly language program to interface DAC to 8085 to demonstrate the generation of saw tooth wave.

Written by @
Apparatus Used: Microprocessor Kit, Keyboard and DAC interface Board
Assumption: DAC 0800 is an 8 bit Digital to analog converter and output voltage variation is between +5V to -5 V. The output voltage varies in step of 10/256=.04 (approx.). By this table we can see the digital data input and corresponding output.
 
Input data (Hex)
Output Voltage
00
-5.00
01
-4.96
02
-4.92
03
-4.88
---
-----
----
---
7F
0.00
----
-----
FD
4.92
FE
4.96
FF
5.00
According the discussed above table we can see that with input 00 to DAC we get analog output as -5V. Its give output digital data 00 to FF at regular intervals to DAC and result in namely different form as square wave saw tooth and triangular wave. The Port address of DAC is 08 H.
Algorithm:
  • Load the initial value 00 to accumulator
  • Move it to DAC
  • Increment the content of accumulator by 1
  • Repeat the highlighted step
Program:
Memory Address
Op-code
Operand
Comments
2000
MVI
A,00 H
Load 00 to accumulator
2002
OUT
08 H
Send data of  A to DAC
2006
INR
A
Increment A by 1
2007
JNZ
2002
Jump if A is not zero at target address
200A
JMP
2000
Jump unconditionally at target address
200D
END

End the program

Used Instruction:
MVI: This instruction is used to store 8 bit data in specified register.
INR: This instruction is used increment the content of specified register by 1.
JNZ: Jump if counter is not zero at target address.
JMP: Jump unconditionally to the target address.
OUT: Send the data to the output port from accumulator.
END: This instruction is used to execute the program.
 
Result: Thus the saw tooth wave generated interfacing DAC trainer board with 8085 Trainer kit.

No comments:

Post a Comment