23.04.2013 Views

TMPM330 - Keil

TMPM330 - Keil

TMPM330 - Keil

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Baud Rate Generator<br />

Under development<br />

<strong>TMPM330</strong> (rev 0.4) 9-10<br />

<strong>TMPM330</strong><br />

The baud rate generator generates transmit and receive clocks to determine the serial<br />

channel transfer rate.<br />

The baud rate generator uses either the φT1, φT4, φT16 or φT64 clock supplied from the<br />

7-bit prescaler. This input clock selection is made by setting the baud rate generator control<br />

register, SC0BRCR .<br />

The baud rate generator contains built-in dividers for divide by 1, N + m/16 (N=2~15,<br />

m=0~15), and 16. The division is performed according to the settings of the baud rate<br />

generator control registers SC0BRCR and SC0BRADD<br />

to determine the resulting transfer rate.<br />

• UART mode<br />

1) If SC0BRCR = 0,<br />

The setting of SC0BRADD is ignored and the counter is divided by N<br />

where N is the value set to SC0BRCR . (N = 1 to 16).<br />

2) If SC0BRCR = 1,<br />

The N + (16 - K)/16 division function is enabled and the division is made by using the<br />

values N (set in SC0BRCR ) and K (set in SC0BRADD). (N = 2<br />

to 15, K = 1 to 15)<br />

• I/O interface mode<br />

(Note) For the N values of 1 and 16, the above N+(16-K)/16 division function is<br />

inhibited. So, be sure to set SC0BRCR to “0.”<br />

The N + (16 - K)/16 division function cannot be used in the I/O interface mode. Be sure to<br />

divide by N, by setting SC0BRCR to “0”.<br />

• Baud rate calculation to use the baud rate generator:<br />

1) UART mode<br />

Baud rate =<br />

Baud rated generator input clock<br />

Frequency divided by the divide ratio<br />

The highest baud rate out of the baud rate generator is 1.0Mbps when φT1 is 16 MHz.<br />

The fsys frequency, which is independent of the baud rate generator, can be used as<br />

the serial clock. In this case, the highest baud rate will be 2.0 Mbps when fsys is 32<br />

MHz.<br />

2) I/O interface mode<br />

Baud rated generator input clock<br />

Baud rate =<br />

/2<br />

Frequency divided by the divide ratio<br />

The highest baud rate will be generated when φT1 is 16 MHz. The divide ratio can be<br />

set to 1 if double buffer is used and the resulting output baud rate will be 8 Mbps. (If<br />

double buffering is not used, the highest baud rate will be 4.0 Mbps applying the divide<br />

ratio of “2”).<br />

/16<br />

Serial Channel (SIO)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!