Datasheet

COP8SGE5, COP8SGE7, COP8SGH5
COP8SGK5, COP8SGR5, COP8SGR7
SNOS516E JANUARY 2000REVISED APRIL 2013
www.ti.com
Table 6. Prescaler Factors (continued)
Prescaler Prescaler
Select Factor
11010 13.5
11011 14
11100 14.5
11101 15
11110 15.5
11111 16
As an example, considering Asynchronous Mode and a CKI clock of 4.608 MHz, the prescaler factor selected is:
4.608/1.8432 = 2.5 (1)
The 2.5 entry is available in Table 6. The 1.8432 MHz prescaler output is then used with proper Baud Rate
Divisor (Table 5) to obtain different baud rates. For a baud rate of 19200 e.g., the entry in Table 5 is 5.
N 1 = 5 (N 1 is the value from Table 5)
N = 6 (N is the Baud Rate Divisor)
Baud Rate = 1.8432 MHz/(16 × 6) = 19200 (2)
The divide by 16 is performed because in the asynchronous mode, the input frequency to the USART is 16 times
the baud rate. The equation to calculate baud rates is given below.
The actual Baud Rate may be found from:
BR = Fc/(16 × N × P) (3)
Where:
BR is the Baud Rate
Fc is the CKI frequency
N is the Baud Rate Divisor (Table 5).
P is the Prescaler Divide Factor selected by the value in the Prescaler Select Register (Table 6)
NOTE
In the Synchronous Mode, the divisor 16 is replaced by two.
Example:
Asynchronous Mode:
Crystal Frequency = 5 MHz
Desired baud rate = 9600
Using the above equation N × P can be calculated first.
N × P = (5 × 10
6
)/(16 × 9600) = 32.552 (4)
Now 32.552 is divided by each Prescaler Factor (Table 6) to obtain a value closest to an integer. This factor
happens to be 6.5 (P = 6.5).
N = 32.552/6.5 = 5.008 (N = 5) (5)
The programmed value (from Table 5) should be 4 (N 1).
Using the above values calculated for N and P:
BR = (5 × 10
6
)/(16 × 5 × 6.5) = 9615.384 (6)
% error = (9615.385 9600)/9600 x 100 = 0.16% (7)
42 Submit Documentation Feedback Copyright © 2000–2013, Texas Instruments Incorporated
Product Folder Links: COP8SGE5 COP8SGE7 COP8SGH5 COP8SGK5 COP8SGR5 COP8SGR7