Chapter 12
Serial Interface 2
Operation
XII - 12
nClock Setup
Clock source is selected from the dedicated prescaler by using the SC2CKS register and timer 3 output.
The dedicated prescaler is started to operate by selecting "prescaler operation" with the PSCMD
(x'03F6F') register. The SC2MST flag of the SC2MD1 register can select the internal clock (clock mas-
ter), or the external clock (clock slave). Even if the external clock is selected, the internal clock with same
frequency as the external clock, should be set by the SC2CKS register, because the internal clock
generates the interrupt flag SC2IRQ. Table 12-3-2 shows the internal clock source which can be set by
the SC2CKS register.
Table 12-3-2
Synchronous Serial Interface Inside Clock Source
nBUSY flag Setup
If data is set to the transmission / receiption shift register SC2TRB, or start condition is enabled, the busy
flag SC2BSY is set. That is cleared by the generation of the communication complete interrupt SC2IRQ.
nInput edge / output edge Setup
The SC2CE1 flag of the SC2MD0 register can set the output edge of the transmission data, and the input
edge of the received data. Data at transmission is output at the falling edge of clock when the SC2CE1
flag = "0", and at the rising edge of clock when the SC2CE1 = "1". Data at reception is input at the rising
edge of clock when the SC2CE1 = "0", and at the falling edge of clock as the SC2CE1 flag = "1".
SC2CE1
Transmission data output edge
1
0
Received data input edge
Table 12-3-3
Input Edge / Output Edge of Transmission and Received Data
Serial 2
Clock source
(Internal clock)
fosc/2
fosc/4
fosc/16
fosc/32
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.