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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/12/04 12:58
Read: times


 
#64605 - RE: Timer 2 in auto reload mode
Responding to: ???'s previous message
hi,

1) independently of device variant, I have said about that the wrong value has been indicated there. For 1000 ticks it is need to load (65536-1000). Of course I meant the up-counter because it was defined with that example.

2) I used indefinite article "a" instead "the" because I meant any timer (0/1/2). Have you tried to change counting direction for timers 0 and 1 with DCEN?

3) You said:
the 51FA,c504,c508 and others can count upward and downward depending on how the DCEN flag is set.

DCEN bit just allows this feature but does not select count direction. When it is set then direction is controlled via pin T2EX. I doubt that original poster has meant such usage of timer.

Moreover, when the down-count mode is used then TL2/TH2 should not be loaded from RCAP2L/RCAP2H while you init the timer. In general, for such scheme TL2/TH2 are loaded with 0xFF and RCAP2L/RCAP2H with value which timer decreases down to.

BTW, an interest question: let say, the timer2 is configured to autoreload mode with down-counting direction (DCEN is set) and pin T2EX is grounded. Now we load value 0xFFFF in both TL2/TH2 and RCAP2L/RCAP2H then run timer 2.
Debugging such situation here, Keil hang ups ((=

Regards,
Oleg

List of 33 messages in thread
TopicAuthorDate
Timer 2 in auto reload mode            01/01/70 00:00      
   RE: Timer 2 in auto reload mode            01/01/70 00:00      
      RE: Timer 2 in auto reload mode            01/01/70 00:00      
         RE: Timer 2 in auto reload mode            01/01/70 00:00      
            RE: Timer 2 in auto reload mode            01/01/70 00:00      
               RE: Timer 2 in auto reload mode            01/01/70 00:00      
               RE: Timer 2 in auto reload mode            01/01/70 00:00      
                  RE: Timer 2 in auto reload mode            01/01/70 00:00      
                     RE: Timer 2 in auto reload mode            01/01/70 00:00      
                        RE: Timer 2 in auto reload mode            01/01/70 00:00      
                           RE: Timer 2 in auto reload mode            01/01/70 00:00      
   RE: Timer 2 in auto reload mode            01/01/70 00:00      
      RE: Timer 2 in auto reload mode            01/01/70 00:00      
         RE: Timer 2 in auto reload mode            01/01/70 00:00      
            RE: Timer 2 in auto reload mode            01/01/70 00:00      
               RE: Timer 2 in auto reload mode            01/01/70 00:00      
                  RE: Timer 2 in auto reload mode            01/01/70 00:00      
                     RE: Timer 2 in auto reload mode            01/01/70 00:00      
                        RE: Timer 2 in auto reload mode            01/01/70 00:00      
                        RE: Timer 2 in auto reload mode            01/01/70 00:00      
                           RE: Timer 2 in auto reload mode            01/01/70 00:00      
                              RE: Timer 2 in auto reload mode            01/01/70 00:00      
                           RE: Timer 2 in auto reload mode            01/01/70 00:00      
                  RE: Timer 2 in auto reload mode            01/01/70 00:00      
                     RE: Timer 2 in auto reload mode            01/01/70 00:00      
               RE: Timer 2 in auto reload mode            01/01/70 00:00      
                  RE: Timer 2 in auto reload mode            01/01/70 00:00      
                     RE: Timer 2 in auto reload mode            01/01/70 00:00      
                        RE: Timer 2 in auto reload mode            01/01/70 00:00      
                           RE: Timer 2 in auto reload mode            01/01/70 00:00      
                              RE: Timer 2 in auto reload mode            01/01/70 00:00      
                                 RE: Timer 2 in auto reload mode            01/01/70 00:00      
                                    RE: Timer 2 in auto reload mode            01/01/70 00:00      

Back to Subject List