23.04.2013 Views

TMPM330 - Keil

TMPM330 - Keil

TMPM330 - Keil

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9.3.2 Serial Clock Generation Circuit<br />

Under development<br />

This circuit generates basic transmit and receive clocks.<br />

• I/O interface mode<br />

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

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

In the SCLK output mode with the SC0CR serial control register set to “0,” the<br />

output of the previously mentioned baud rate generator is divided by 2 to generate the<br />

basic clock.<br />

In the SCLK input mode with SC0CR set to “1,” rising and falling edges are<br />

detected according to the SC0CR setting to generate the basic clock.<br />

• Asynchronous (UART) mode :<br />

9.3.3 Receive Counter<br />

9.3.4 Receive Control Unit<br />

According to the settings of the serial control mode register SC0MOD0 , either<br />

the clock from the baud rate register, the system clock (fSYS), the internal output signal of<br />

the TMRB9 timer, or the external clock (SCLKO pin) is selected to generate the basic<br />

clock, SIOCLK.<br />

The receive counter is a 4-bit binary counter used in the asynchronous (UART) mode and is<br />

up-counted by SIOCLK. Sixteen SIOCLK clock pulses are used in receiving a single data bit<br />

while the data symbol is sampled at the seventh, eighth, and ninth pulses. From these three<br />

samples, majority logic is applied to decide the received data.<br />

• I/O interface mode:<br />

In the SCLK output mode with SC0CR set to “0,” the RXD0 pin is sampled on the<br />

rising edge of the shift clock output to the SCLK0 pin.<br />

In the SCLK input mode with SC0CR set to “1,” the serial receive data RXD0 pin<br />

is sampled on the rising or falling edge of SCLK input depending on the SC0CR<br />

setting.<br />

• Asynchronous (UART) mode:<br />

The receive control unit has a start bit detection circuit, which is used to initiate receive<br />

operation when a normal start bit is detected.<br />

9.3.5 Receive Buffer<br />

The receive buffer is of a dual structure to prevent overrun errors. The first receive buffer (a<br />

shift register) stores the received data bit-by-bit. When a complete set of bits have been<br />

stored, they are moved to the second receive buffer (SC0BUF). At the same time, the<br />

receive buffer full flag (SC0MOD2 “RBFLL”) is set to “1” to indicate that valid data is stored<br />

in the second receive buffer. However, if the receive FIFO is set enabled, the receive data is<br />

moved to the receive FIFO and this flag is immediately cleared.<br />

If the receive FIFO has been disabled (SCOFCNF = 0 and SC0MOD1<br />

=01), the INTRX0 interrupt is generated at the same time. If the receive FIFO has been<br />

enabled (SCNFCNF = 1 and SC0MOD1 = 01), an interrupt will be<br />

generated according to the SC0RFC setting.<br />

Serial Channel (SIO)

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

Saved successfully!

Ooh no, something went wrong!