38C3 Group User’s Manual
HARDWARE
1-28
SERIAL I/O
The 38C3 group has a built-in 8-bit clock synchronous serial I/O. The
I/O pins of serial I/O also operate as I/O port P4, and their function is
selected by the serial I/O control register 1 (address 001916).
Fig. 24 Block diagram of serial I/O
FUNCTIONAL DESCRIPTION
Data bus
XCIN
XIN
Serial I/O
interrupt request
P46 latch
P45 latch
Serial I/O port selection bit
P47 latch
Serial I/O counter (3)
Serial I/O shift register (8)
Synchronous
circuit
Internal
system clock
selection bit
Serial I/O port selection bit
“1”
“0”
S
CLK
SRDY output selection bit
External clock
Synchronous clock
selection bit
Divider
1/8
1/16
1/32
1/64
1/128
1/256
Internal synchronous
clock selection bits
P46/SCLK1
P45/SOUT
P44/SIN
SRDY
P47/SRDY
P40 latch
Serial I/O port selection bit
P40/SCLK2
“1”
“0”
“1”
“0”
“1”
“0”
“1”
“0”
“1”
“0”
[Serial I/O Control Registers 1, 2 (SIOCON1,
SIOCON2)] 001916, 001A16
Each of the serial I/O control registers 1, 2 contains 8 bits that select
various control parameters of serial I/O.
qOperation in serial I/O mode
Either an internal clock or an external clock can be selected as the
synchronous clock for serial I/O transfer. A dedicated divider is built-
in as the internal clock, giving a choice of six clocks.
When internal clock is selected, serial I/O starts to transfer by a write
signal to the serial I/O register (address 001B16). After 8 bits have
been transferred, the SOUT pin goes to high impedance.
When external clock is selected, the clock must be controlled exter-
nally because the contents of the serial I/O register continue to shift
while the transfer clock is input. In this case, the SOUT pin does not
go to high impedance at the completion of data transfer.
The interrupt request bit is set at the end of the transfer of 8 bits,
regardless of whether the internal or external clock is selected.
When selecting internal clock and setting “1” to SIOCON20, the P40
pin can be also used as synchronous clock output pin SCLK2. At this
time, the SCLK1 pin can be used as I/O port.
Table 9 Function of P46/SCLK1 and P40/SCLK2
SIOCON16
1
SIOCON13
1
SIOCON20
0
1
P46/SCLK1
SCLK1
P46
P40/SCLK2
P40
SCLK2
SIOCON13: Serial I/O port selection bit
SIOCON16: Synchronous clock selection bit
SIOCON20: Synchronous clock output pin selection bit