May 2003
7542 Group
Clock Asynchronous Serial I/O (UART)
Page 3 of 8
REJ05B0023-0100Z
Figure 1 Setting method for UART of serial I/O1 (1)
3.2 UART Setting Method
Figure 1 and Figure 2 show the setting method for UART of serial I/O1.
b7
b0
0
b7
1 0
b0
b7
b0
0 0
0
Interrupt control register 1 (ICON1) [Address 3E
16
]
Serial I/O1 receive interrupt disabled
Serial I/O1 transmit interrupt disabled
Process 1: Stop and initialize serial I/O.
Serial I/O1 control register (SIO1CON) [Address 1A
16
]
Transmit operation stop and initialization
Receive operation stop and initialization
BRG count source selected (set in internal clock selected)
0: f(X
IN
)
1: f(X
IN
)/4
Serial I/O1 synchronous clock selected (
Note 1
)
0: BRG output/16
1: External clock input/16
Transmit interrupt source selected
0: When transmit buffer has emptied
1: When transmit shift operation is completed
Transmit enable selected
0: Transmit disabled (at half-duplex communication receive)
1: Transmit enabled (at full-duplex communication) (
Note 2
)
Receive enable selected
0: Receive disabled (at half-duplex communication transmit)
1: Receive enabled (at full-duplex communication) (
Note 2
)
Clock asynchronous serial I/O
Serial I/O1 enabled (P1
0
–P1
2
pins operate as serial I/O1 pins)(
Note 3
)
Serial I/O1 control register (SIO1CON) [Address 1A
16
]
Process 3: Set serial I/O1 control register.
Note 1:
Setting of serial I/O1 synchronous clock selection bit is as follows;
“0”: P1
2
pin can be used as a normal I/O pin
“1”: P1
2
pin is used as an input pin for an external clock.
2:
When data transmission is executed at the state that an external clock input is selected
as the synchronous clock, set “1” to the transmit enable bit while the S
CLK1
is “H” state.
3:
When clock asynchronous (UART) serial I/O is selected, P1
3
pin can be used as a normal I/O pin.
Process 2: Disable serial I/O1 transmit/receive interrupt.