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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/06/03 00:19
Read: times


 
#44867 - RE: Timers, time base
Responding to: ???'s previous message
To get the 16-bit reload value, I believe you use 65536 - 921.6 = 64614.4. Round that to the closest integer of 64614.

Notice that your 1ms timer is running slightly slow. If you need additional absolute timing accuracy, you can readjust your clock occasionally, i.e. set it ahead by a certain number every X cycles. This will correct absolute timing errors, but introduce clock jitter which may or may not be acceptable for your application.

You can use Timer1 overflow to trigger an interrupt (set TF1) when Timer1 is the baud generator. This is a bad idea though, because servicing the interrupt will consume most if not all of your MCU cycles. In fact it will not even work except for very low baud rates and even then the MCU won't be able to do much at all. Don't do it - use a different timer or select an MCU with a PCA or additional timers (P89C51Rx2 for example).

- Lee

List of 8 messages in thread
TopicAuthorDate
Timers, time base            01/01/70 00:00      
   RE: Timers, time base            01/01/70 00:00      
      RE: Timers, time base            01/01/70 00:00      
         RE: Timers, time base            01/01/70 00:00      
            RE: Timers, time base            01/01/70 00:00      
               RE: Timers, time base            01/01/70 00:00      
                  RE: Timers, time base - Rob            01/01/70 00:00      
   RE: Timers, time base            01/01/70 00:00      

Back to Subject List