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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/16/03 07:26
Read: times


 
#56731 - RE: TIMER HELP
Responding to: ???'s previous message
Hi Dobrica,
You are missing the hours increment and end of day
check (for a 24 hour based clock) on your clock
assembly routine. Below is the missing code added.
Good luck,
Charles Bannister
         PUSH   PSW         
         PUSH   ACC         
         clr   tr0          .
         mov   th0,#HIGH RELOAD   
         mov   tl0,#LOW  RELOAD
         setb  tr0  
         INC    MSEC            
         MOV    A,MSEC
         CJNE   A,#64H,CEASEND   
         MOV    MSEC,#00H 
         INC    SEC          
         MOV    A,SEC
         CJNE   A,#3CH,ceasEND
         MOV    SEC,#00H      
         INC    MIN
         MOV    A,MIN
         CJNE   A,#3CH,ceasEND
         MOV    MIN,#00H      
         INC    ora
;======================== End of day check
         INC    HOURS            ;; INCREMENT HOURS
         MOV    A,HOURS          ;; 24 HOURS ELAPSED?
         CJNE   A,#24,cendsEND   ;; GOTO END IF NO...
         MOV    HOURS,#0x00      ;; RESET HOURS LSB
;=======================
CEASEND:  POP   ACC
          POP   PSW         
          RETI               



List of 41 messages in thread
TopicAuthorDate
TIMER HELP            01/01/70 00:00      
   RE: TIMER HELP            01/01/70 00:00      
   RE: TIMER HELP            01/01/70 00:00      
      RE: TIMER HELP            01/01/70 00:00      
         RE: TIMER HELP            01/01/70 00:00      
            RE: TIMER HELP            01/01/70 00:00      
               RE: TIMER HELP            01/01/70 00:00      
                  RE: TIMER HELP            01/01/70 00:00      
               RE: TIMER HELP            01/01/70 00:00      
   RE: TIMER HELP            01/01/70 00:00      
      Timer interrupt response (LONG)            01/01/70 00:00      
         RE: Timer interrupt response (LONG)            01/01/70 00:00      
            RE: Timer interrupt response (LONG)            01/01/70 00:00      
            RE: Timer interrupt response (PS)            01/01/70 00:00      
         RE: Timer interrupt response (LONG)            01/01/70 00:00      
            RE: Timer interrupt response (LONG)            01/01/70 00:00      
               RE: Timer interrupt response (LONG)            01/01/70 00:00      
            RE: Timer interrupt response (LONG)            01/01/70 00:00      
               RE: Timer interrupt response (LONG)            01/01/70 00:00      
                  RE: Timer interrupt response (LONG)            01/01/70 00:00      
                     RE: Timer interrupt response (LONG)            01/01/70 00:00      
                        RE: Timer interrupt response (LONG)            01/01/70 00:00      
                           RE: Timer interrupt response (LONG)            01/01/70 00:00      
                  RE: Timer interrupt response (LONG)            01/01/70 00:00      
               RE: Timer interrupt response (LONG)            01/01/70 00:00      
            RE: Timer interrupt response (LONG)            01/01/70 00:00      
   RE: TIMER HELP            01/01/70 00:00      
   RE: TIMER HELP            01/01/70 00:00      
      RE: TIMER HELP            01/01/70 00:00      
      RE: TIMER HELP            01/01/70 00:00      
      RE: TIMER HELP            01/01/70 00:00      
      RE: TIMER HELP            01/01/70 00:00      
         RE: TIMER HELP            01/01/70 00:00      
            RE: TIMER HELP            01/01/70 00:00      
               RE: TIMER HELP            01/01/70 00:00      
                  RE: TIMER HELP            01/01/70 00:00      
                     RE: Acrobat....            01/01/70 00:00      
                        RE: Acrobat....            01/01/70 00:00      
                           RE: Acrobat....            01/01/70 00:00      
      RE: TIMER HELP            01/01/70 00:00      
         INTERRUPT HELP            01/01/70 00:00      

Back to Subject List