Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/22/01 13:33
Read: times


 
#16815 - problem starting timer
This is a problem I faced with 89c51.
I used interupt INTO to start the timer and INT1 to stop the timer. I am able to start the timer only once (once after reset.). After the initial start and stop I am not able to start the timer again though the interuot causes it to go into the INTO routine. Any idea wher I am wrong. Below is the code
that I used.

ORG 0003H
LJMP 0030H

ORG 0013H
LJMP 0040H

ORG 0030H

CLR IE.0;Disable INT0
CLR IE.2;Disable INT1
SETB TR0; Start timer
SETB IE.2;Enable INT1
RETI

ORG 0040H

CLR IE.2; Disable INT1
CLR IE.0; Disable INT0
CLR TR0; Stop timer
CALL CALDIST
MOV R7,#0FFH
REPINT: CALL DISPLAY
DJNZ R7,REPINT
SETB IE.0;To enable INT0 int.
RETI

Any ones help would be appreciated.


List of 5 messages in thread
TopicAuthorDate
problem starting timer            01/01/70 00:00      
RE: problem starting timer            01/01/70 00:00      
RE: problem starting timer            01/01/70 00:00      
RE: problem starting timer            01/01/70 00:00      
RE: problem starting timer            01/01/70 00:00      

Back to Subject List