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.

SCLK input mode<br />

Under development<br />

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

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

In the SCLK input mode with SC0MOD2 set to “0” and the transmit double<br />

buffers are disabled (double buffering is always enabled for the receive side), 8-bit<br />

data written in the transmit buffer is output from the TXD0 pin and 8 bits of data is<br />

shifted into the receive buffer when the SCLK input becomes active. The INTTX0<br />

interrupt is generated upon completion of data transmission and the INTRX0 interrupt<br />

is generated at the instant the received data is moved from receive buffer 1 to receive<br />

buffer 2. Note that transmit data must be written into the transmit buffer before the<br />

SCLK input for the next frame (data must be written before the point A in Fig. 9-15). As<br />

double buffering is enabled for data reception, data must be read before completing<br />

reception of the next frame data.<br />

If SC0MOD2 = “1” and double buffering is enabled for both transmission and<br />

reception, the interrupt INTRX0 is generated at the timing Transmit Buffer 2 data is<br />

moved to Transmit Buffer 1 after completing data transmission from Transmit Buffer 1.<br />

At the same time, the 8 bits of data received is shifted to buffer 1, it is moved to receive<br />

buffer 2, and the INTRX0 interrupt is generated. Upon the SCLK input for the next<br />

frame, transmission from Transmit Buffer 1 (in which data has been moved from<br />

Transmit Buffer 2) is started while receive data is shifted into receive buffer 1<br />

simultaneously. If data in receive buffer 2 has not been read when the last bit of the<br />

frame is received, an overrun error occurs. Similarly, if there is no data written to<br />

Transmit Buffer 2 when SCLK for the next frame is input, an under-run error occurs.<br />

Serial Channel (SIO)

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

Saved successfully!

Ooh no, something went wrong!