
μ
PD17016, 17017
237
Table 19-4. Operation of Serial Interface in Each Mode
Operation
Mode
3-Wire Serial I/O Mode
Slave operation
SIO1CK1 = SIO1CK0 = 0
Master operation
Item
SIO1CK1 = SIO1CK0 = other than 0
Wait
Wait released
Wait
Wait released
Setting
status of
each pin
P0B
2
/SCK
P0B
1
/SO
P0B
0
/SI
When P0BBIO0 = 0
Floating
Waits for external data
When P0BBIO0 = 1
General-purpose output port.
Outputs contents of output latch.
Usually, P0BBIO0 is cleared to 0.
Operation of clock
counter
Incremented at falling edge of SCK pin.
Operation of
presettable shift
register (SIO1SFR)
Output
When SIO1HIZ = 1
Shifts data from MSB and outputs it to SO
2
pin at falling edge of SCK pin.
When SIO1HIZ = 0
Does not output data.
Input
Shifts data of SI pin from LSB and inputs it at rising edge of SCK pin regardless of P0BBIO0.
However, the contents of output latch are output to SI pin when P0BBIO0 = 1.
Wait operation
Serial communication is started when “1” is written to SIO1TS.
SIO1TS is reset to “0” at rising edge of shift clock when value of clock counter is “8”.
For operation of each pin, refer to above.
When P0BBIO2 = 0
Floating
General-purpose
input port
When P0BBIO2 = 1
General-purpose
output port
Outputs contents of
output.
Usually, P0BBIO2 is
cleared to 0.
When SIO1HIZ = 0
When P0BBIO1 = 0
General-purpose
input port
Floating
When P0BBIO1 = 1
General-purpose
output port
Outputs contents of
output latch.
When P0BBIO2 = 0
Floating
External clock input
When P0BBIO2 = 1
General-purpose
output port
Outputs contents of
output latch.
When SIO1HIZ = 1
When P0BBIO1 = 0
General-purpose
input port
Floating
When P0BBIO1 = 1
Outputs serial data.
When P0BBIO2 = 0
Floating
General-purpose
input port
When P0BBIO2 = 1
Outputs high level.
Usually, P0BBIO2 is
set to 1.
When SIO1HIZ = 0
When P0BBIO1 = 0
General-purpose
input port
Floating
When P0BBIO1 = 1
General-purpose
output port
Outputs contents of
output latch.
When P0BBIO2 = 0
Floating
General-purpose
input port
When P0BBIO2 = 1
Outputs internal
clock.
When SIO1HIZ = 1
When P0BBIO1 = 0
General-purpose
input port
Floating
When P0BBIO1 = 1
Outputs serial data.