APPLICATION
2.5 Serial I/O
3822 GROUP USER’S MANUAL
2–128
2.5.4 Register setting example
(1) Clock synchronous serial I/O mode
Figure 2.5.18 and Figure 2.5.19 show a transmitting method in the clock synchronous mode. Figure
2.5.20 and Figure 2.5.21 show a receiving method in the clock synchronous mode.
Fig. 2.5.18 Transmitting method in clock synchronous mode (1)
SIOCON: Serial I/O control register [Address 1A16]
b0: BRG count source selection bit
0: f(XIN)
1: f(XIN)/4
b7
b0
b2: SRDY output enable bit
0: P47/SRDY pin operates as I/O port P47
1: P47/SRDY pin operates as signal output pin SRDY
(SRDY signal indicates receive enable state)
b4: Transmit enable bit
1: Transmit enabled
b5: Receive enable bit
0: Receive disabled
1: Receive enabled
b6: Serial I/O mode selection bit
1: Clock synchronous serial I/O mode
11
Setting of serial I/O control register
Selection of clock synchronous, transmit, or others
Disable Serial I/O transmit interrupt
ICON1: Interrupt control register 1 [Address 3E16]
b3: Serial I/O transmit interrupt enable bit
0: Interrupts disabled
b7
b0
0
Set the value to baud rate generator BRG [Address 1C 16]
b1: Serial I/O synchronization clock selection bit
(In clock synchronous mode)
0: BRG output/4
1: External clock input
b3: Transmit interrupt source selection bit
0: When transmit buffer has emptied
1: When transmit shift operation is completed
b7: Serial I/O enable bit
1: Serial I/O enabled
(pins P44–P47 operate as serial I/O pins)
1
Continued to Figure 2.5.19
[Notes on use]
Notes 1: To use an INT pin or input port for S RDY watchdog, set as required.
2: When an external clock is selected in setting below, BRG setting is not required in
setting below.
3: In the full duplex data transfer mode, set the receive enable bit (bit 5) to “1” (receive
enabled) in setting below.
4: To use a serial I/O transmit interrupt, set in the following sequence.
5: When no serial I/O transmit interrupt is used, omit settings , , , and below.