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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/04/04 19:26
Read: times


 
#69844 - RE: need help with tutorial
Responding to: ???'s previous message
i modify the code abit..
after reading http://www.8052.com/tutrtc.phtml
the same problem persists..
the code stop at WAIT: JNB TF0,WAIT after mov p1,R1
and it just wont go to the next instructions as it's supposed to....it seems that the timer will not overflow...??

TIMER_VALUE EQU 19456
COUNT EQU 20

org 00h
MOV TMOD,#01H
mov R1,#10001000B
mov p1,R1
ACALL DELAY
mov R1,#00h
mov p2,R1

DELAY:
MOV R7,#COUNT
AGAIN:
MOV TH0,#HIGH TIMER_VALUE
MOV TL0,#LOW TIMER_VALUE
SETB TR0
WAIT: JNB TF0,WAIT
CLR TF0
CLR TR0
DJNZ R7,AGAIN
RET

end

List of 12 messages in thread
TopicAuthorDate
need help with tutorial            01/01/70 00:00      
   RE: need help with tutorial            01/01/70 00:00      
   RE: need help with tutorial            01/01/70 00:00      
      RE: need help with tutorial            01/01/70 00:00      
   RE: need help with tutorial            01/01/70 00:00      
      RE: need help with tutorial            01/01/70 00:00      
      RE: need help with tutorial            01/01/70 00:00      
   RE: need help with tutorial            01/01/70 00:00      
      RE: need help with tutorial            01/01/70 00:00      
   RE: need help with tutorial            01/01/70 00:00      
      RE: need help with tutorial            01/01/70 00:00      
         Slip of the pen            01/01/70 00:00      

Back to Subject List