Chapter 11
Serial Interface 0
XI - 16
Operation
nData Input Pin Setup
3 channels type (clock pin (SBT pin), data output pin (SBO pin), data input pin (SBI pin)) or 2 channels
type (clock pin (SBT pin), data I/O pin (SBO pin)) can be selected as a communication mode. SBI pin can
be used for only serial data input. SBO pin can select serial data input or output. The SC0IOM flag of the
SC0MD1 register can select if the serial data is input to SBI pin or SBO pin. When "data input from SBO
pin" is selected to set the 2 lines type, the P0DIR0 flag of the P0DIR register controls direction of SBO pin
to switch transmission / reception. At this time, SBI pin can be used as a general port, too.
nClock Setup
The SC0CKS register selects a clock source from the special prescaler and timer output. The special
prescaler starts its operation after the PSCMD (x'03F6F') register selects "prescaler operation". The
SC0MST flag of the SC0MD1 register can select the internal clock (clock master), or the external clock
(clock slave). Even if the external clock is selected, set the internal clock that has the same clock cycle
or below to the external clock, by the SC0CKS register. That is happened, because the interrupt flag
SC0TIRQ is generated by the internal clock. Here is the internal clock source that can be set by the
SC0CKS register. Also, the SC0CKM flag of the SC0MD1 register can divide the internal clock by 8.
Table 11-3-3
Synchronous Serial Interface Internal Clock Source
The transfer speed should be up to 2.5 MHz. If the transfer clock is over 2.5 MHz, the
transmission data may not be sent correctly.
At reception, if SC0IOM of the SC0MD1 register is set to "1" and "serial data input from SBO"
is selected, SBI pin can be used as a general port.
Serial 0
Internal clock
fosc/2
fosc/4
fosc/16
fosc/64
fs/2
fs/4
Timer 3 output
When timer output is selected as serial interface transfer clock, select fosc as a clock source
of the timer. If other clock is selected, normal transfer of serial interface data is not guaran-
teed.