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.

SCK pin<br />

SIOF<br />

SO pin bit 6<br />

Under development<br />

Fig. 10-28 Transmit Data Retention Time at the End of Transmission<br />

8-bit receive mode<br />

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

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

Set the control register to the receive mode. Then writing “1” to SBIxCR1 enables<br />

reception. Data is taken into the shift register from the SI pin, with the least-significant bit<br />

(LSB) first, in synchronization with the serial clock. Once the shift register is loaded with the<br />

8-bit data, it transfers the received data to SBIxDBR and the INTSBIx (buffer-full) interrupt<br />

request is generated to request reading the received data. The interrupt service program<br />

then reads the received data from SBIxDBR.<br />

In the internal clock mode, the serial clock will be stopped and automatically be in the wait<br />

state until the received data is read from SBIxDBR.<br />

In the external clock mode, shift operations are executed in synchronization with the<br />

external clock. The maximum data transfer rate varies, depending on the maximum latency<br />

between generating the interrupt request and reading the received data.<br />

Reception can be terminated by clearing to “0” or setting to “1” in the<br />

INTSBIx interrupt service program. If is cleared, reception continues until all the<br />

bits of received data are written to SBIxDBR. The program checks SBIxSR to<br />

determine whether reception has come to an end. is cleared to “0” at the end of<br />

reception. After confirming the completion of the reception, last received data is read. If<br />

is set to “1,” the reception is aborted immediately and is cleared to “0.”<br />

(The received data becomes invalid, and there is no need to read it out.)<br />

(Note) The contents of SBIxDBR will not be retained after the transfer mode is<br />

changed. The ongoing reception must be completed by clearing to<br />

“0” and the last received data must be read before the transfer mode is<br />

changed.<br />

7 6 5 4 3 2 1 0<br />

SBIxCR1 ← 0 1 1 1 0 X X X Selects the receive mode.<br />

SBIxCR1 ← 1 0 1 1 0 0 0 0 Starts reception.<br />

INTSBIx interrupt<br />

bit 7<br />

tSODH = Min. 3.5/fsys/2 [s]<br />

Reg. ← SBIxDBR Reads the received data.<br />

Serial Bus Interface (SBI)

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

Saved successfully!

Ooh no, something went wrong!