Tuesday, September 15, 2009

Blink port C bit 0 of 8255




Statement: Write a program to blink Port C bit 0 of the 8255. Assume address of control word register of 8255 as 83H. Use Bit Set/Reset mode.





Source program:
BACK: MVI A, 0lH : Load bit pattern to make PCο high
OUT 83H : Send it to control word register
CALL DELAY : Call Delay subroutine
MVI A, 00H : Load bit pattern to make PCο Low
OUT 83H : Send it to control word register
CALL Delay : Call Delay subroutine
JMP BACK : Repeat
FLOWCHART


Delay subroutine:
Delay: LXI D, Count
Back: DCX D
MOV A, D
ORA E
JNZ Back
RET


No comments:

Post a Comment