??? 06/17/06 10:31 Modified: 06/17/06 10:59 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#118466 - Missing stop point in program Responding to: ???'s previous message |
Hello Ghulam,
You need to pay more attention to details such as formatting your code, comments, Labels, End point of your program. Regards, Charles Bannister ; Subject: trouble in stopping the timer ; Full Name: Ghulam Mustafa (Karachi Pakistan) ; Date: 06/17/06 09:53 ; Read: 1 times-- Printable Version ; Score: Hasn't been scored ; Hello, ; i am working on a porgram in which i have to use the ; timer to count the duration of an event and when the ; event completes it stop counting it for this purpose ; i made a program but in it i am getting trouble to ; make the timer stop counting. ; ; The problem is that as long as the P0.0 is low it ; stops counting but as it goes high again it starts ; counting again. But you can see that i have ; dissabled all the intrupts. ; Please tell me how could i solve this problem. ; Thanks ; ; here is the program ORG 000H RESET1: JMP MAIN ORG 00BH TIMER0: JMP RPM ORG 030H MAIN: MOV TMOD,#01H MOV TH0,#HIGH(-1000) ; 0xFC MOV TL0,#LOW(-1000) ; 0x18 SETB EA SETB ET0 JNB P0.0,$ SETB TR0 JB P0.0,$ CLR EA ; Intrupt disabbled as p0.0 goes low CLR ET0 CLR TR0 JMP DISPLAY RPM: MOV TH0,#HIGH(-1000) MOV TL0,#LOW(-1000) INC R0 ; value is increamented in R0 RETI DISPLAY: MOV P1,R0 SJMP $ ; Your program need this!!! END Hex Listing :02000000802E50 :02000B00804033 :10003000758901758CFC758A18D2AFD2A93080FD04 :10004000D28C2080FDC2AFC2A9C28C8008758CFC06 :09005000758A180832889080FEC0 :00000001FF |
Topic | Author | Date |
trouble in stopping the timer | 01/01/70 00:00 | |
Stopping timer | 01/01/70 00:00 | |
Missing stop point in program | 01/01/70 00:00 | |
Silver platter | 01/01/70 00:00 | |
Silver Platter treatment | 01/01/70 00:00 | |
Mind your own business | 01/01/70 00:00 | |
Your comment. | 01/01/70 00:00 | |
and I thought this was only when asking![]() | 01/01/70 00:00 |