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 triangular wave.

Written by @
Aim: Write an assembly language program to interface DAC to 8085 to demonstrate the generation of triangular wave.
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 00 to Accumulator
  • Move the content of accumulator to DAC
  • Increment the content of accumulator by 1
  • If the content of accumulator is zero proceed to next step else go to step 2
  • Load FF to the accumulator
  • Move the content of accumulator to DAC
  • Decrement the content of accumulator by 1
  • If the content of accumulator is zero go to step 1 else go to step 6
Program:
Memory Address
Op-code
Operand
Comments
2000
MVI
L,00 H

2002
MOV
A,L
Load 00 to accumulator
2003
OUT
08 H
Port address of DAC
2005
INR
L
Increment L
2006
JNZ
2002
Jump to target address
2009
MVI
L,FF H

200B
MOV
A,L
Load FF H to accumulator
200C
OUT
08 H
Port address of DAC
200E
DCR
L
Decrement L
200F
JNZ
200B
Jump to target address if B is not 0
2012
JMP
2000
Jump unconditionally
2013
END

End the program
Used Instruction:
MVI: This instruction is used to store 8 bit data in specified register.
DCR: This instruction is used decrement 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 triangular wave generated interfacing DAC trainer board with 8085 Trainer kit.

4 comments:

  1. MVI MOV.... are mnemonics
    they are not op-code

    ReplyDelete
    Replies
    1. patti show.....

      Delete
  2. pls change opcode to mnemonic

    ReplyDelete
    Replies
    1. ithokke parayan ne aarada @#$@##k

      Delete