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.

SCL pin<br />

Write to SBIxDBR<br />

SDA pin<br />

<br />

INTS0 interrupt<br />

request<br />

SCL<br />

SDA<br />

<br />

INTSBIx interrupt request<br />

INTSBIx interrupt<br />

Under development<br />

if MST = 0<br />

Then go to the slave-mode processing<br />

if TRX = 0<br />

Then go to the receiver-mode processing<br />

if LRB = 0<br />

Then go to processing for generating the stop condition<br />

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

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

SBIxCR1 ← X X X X 0 X X X Specifies the number of bits to be transmitted and specify<br />

whether ACK is required.<br />

SBIxDBR ← X X X X X X X X Writes the transmit data.<br />

End of interrupt processing<br />

(Note) X: Don’t care<br />

1<br />

D7<br />

Fig. 10-15 = “000” and = “1” (Transmitter Mode)<br />

Receiver mode ( = “0”)<br />

2 3 4 5 6 7 8 9<br />

D6 D5 D4 D3 D2 D1<br />

If the next data to be transmitted has eight bits, the transmit data is written into SBIxDBR. If<br />

the data has different length, and are programmed and the received data<br />

is read from SBIxDBR to release the SCL line. (The data read immediately after<br />

transmission of a slave address is undefined.) On reading the data, is set to “1,” and<br />

the serial clock is output to the SCL pin to transfer the next data word. In the last bit, when<br />

the acknowledgment signal becomes the “L” level, “0” is output to the SDA pin.<br />

After that, the INTSBIx interrupt request is generated, and is cleared to “0,” pulling<br />

the SCL pin to the “L” level. Each time the received data is read from SBIxDBR, one-word<br />

transfer clock and an acknowledgement signal are output.<br />

Read the received data<br />

1<br />

D7<br />

Fig. 10-16 = “000” and = “1” (Receiver Mode)<br />

D0<br />

ACK<br />

2 3 4 5 6 7 8 9<br />

D6 D5 D4 D3 D2 D1<br />

D0<br />

Master output<br />

Slave output<br />

ACK<br />

Acknowledgment signal<br />

from receiver<br />

Master output<br />

Slave output<br />

Next D7<br />

Acknowledgment<br />

signal from receiver<br />

Serial Bus Interface (SBI)

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

Saved successfully!

Ooh no, something went wrong!