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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/26/03 08:46
Read: times


 
#53386 - RE: Baud rate in X2 mode
Responding to: ???'s previous message
Hi,
could you explain some more? Which UART mode is used, is it clocked via timer1 or 2?
In short, there are many clock modes of UART, here are some of them:
- baud rate = OSC/12 (OSC/6 in x2): used when UART is in mode 0;
- baud rate = OSC/32 or OSC/64 (OSC/16 or OSC/32 in x2 mode) depends on SMOD bit : used when UART is in mode 2;
- baud rate is variable and clocked via timer 1 in mode 2. This way used for UART modes 1 and 3. Baud rate may be calculated by:
a)SMOD=0: OSC/(32*12*(256-TH1))
b)SMOD=1: OSC/(16*12*(256-TH1))
note: if timer1 is in x2 mode then baud rate will be doubled (change 12 to 6 in formulas);
- baud rate is variable and clocked via timer 2 in autoreload mode. This way used for UART modes 1 and 3 when you set bits RCLK/TCLK of T2CON. Baud rate may be calculated as OSC/(32*(65536-RCAP2HL)); if timer clocked in x2 mode: OSC/(16*(65536-RCAP2HL))
Good days!

List of 10 messages in thread
TopicAuthorDate
Baud rate in X2 mode            01/01/70 00:00      
   RE: Baud rate in X2 mode            01/01/70 00:00      
      RE: Baud rate in X2 mode            01/01/70 00:00      
         RE: Baud rate in X2 mode            01/01/70 00:00      
            RE: Baud rate in X2 mode            01/01/70 00:00      
               RE: Baud rate in X2 mode            01/01/70 00:00      
   RE: Baud rate in X2 mode            01/01/70 00:00      
      RE: Baud rate in X2 mode            01/01/70 00:00      
         RE: Baud rate in X2 mode            01/01/70 00:00      
            RE: Baud rate in X2 mode            01/01/70 00:00      

Back to Subject List