- Simplified through visuals…..
WAP to read the data from Port1, 10 times, each after a 1 sec delay. Store the data from RAM locations 20H onwards. When the operation is complete, ring an “Alarm” connected at Port3.1. Assume CLK = 12 MHz
Clear Port3.1
MOV TMOD, #10H
MOV 90H, #OFFH
MOV RO, #0AH
REPEAT:
MOV R1, #20H
MOV shoelover1996@hotmail.com, 90H
INC R1
ACALL DELAY
DJNZ RO, REPEAT
SETB P3.1
HERE:SJMP HERE //ends the program
DELAY:MOV R2, #14H
REPEAT:MOV TL1, #OBOH
MOV TH1, #3CH
MOV TCON, #40H
WAIT:JNB TCON.1, WAIT
MOV TCON, #00H //clears tcon register
DJNZ R2, REPEAT
RET
Leave a comment