??? 11/23/05 01:44 Read: times |
#104027 - Adding restart to Piezo Ceramic Trnsdcer |
Hi all,
I'm going explain this as best as i can, my last post on a different topic wasn't very clear. I currently have the code to a 'buzzer' but now wish to add a restart switch. If the switch transitions from 1 to 0 while the buzzer is sounding i want to restart the timing loop so it continues to buzz for another second. This is the code I currently have... 0064 HUNDRED EQU 100 D8F0 COUNT EQU -10000 8100 ORG 8100H 8100 MOV TMOD, #01H 8100 LOOP: JNB P1.6, LOOP . WAIT: JB P1.6, WAIT . SETB P1.7 . CALL DELAY . CLR P1.7 . SJMP LOOP . DELAY: MOV R7,#HUNDRED . AGAIN: MOV TH0,#HIGH CONT . MOV TL0,#LOW COUNT . SETB TR0 . WAIT2: JNB TF0,WAIT2 . CLR TF0 . CLR TR0 . DJNZ R7,AGAIN . RET . END |
Topic | Author | Date |
Adding restart to Piezo Ceramic Trnsdcer | 01/01/70 00:00 | |
Answer with comments![]() | 01/01/70 00:00 |