Program to interface DAC using 8255 and generate ramp waveform
The following is the assembly language using DAC to interface with 8255 and generate a ramp on CRO. Here in the code, we use two jump instructions JMP and JZ in order to form the ramp wave. The jump instructions used in the program are iterated to repeat cycles of a ramp wave.
Code:
MOV DX,8807 : DX is loaded with control word register address of 8255
MOV AL,80
OUT DX,AL : Contents of AL are transferred to portA of 8255
MOV DX,8801 : DX is loaded with Port A address of 8255
Ramp MOV AL,00
Begin OUT DX,AL ; Contents of AL are transferred to portA of 8255
INC AL
CMP AL,FF
JZ Ramp
JMP Begin ; Repeat the same
Thus we programed in assembly language to interface DAC using 8255 to generate a ramp wave.
Related links
Ebooks for micro processors and micro controllers
No comments:
Post a Comment