SN8P1700
8-bit micro-controller build-in 12-bit ADC
Because SIO function is shared with Port5 for P5.0 as SCK, P5.1 as SI and P5.2 as SO
The following table shown the Port5[2:0] I/O mode behavior and setting when SIO function enable and disable
SENB=1 (SIO Function Enable)
(SCKMD=1)
P5.0 will change to Input mode automatically, no matter what
SIO source = External clock
(SCKMD=0)
P5M setting
P5.0/SCK
P5.1/SI
P5.0 will change to Output mode automatically, no matter what
P5M setting
SIO source = Internal clock
P5.1 must be set as Input mode in P5M ,or the SIO function will be abnormal
(TXRX=1)
P5.2 will change to Output mode automatically, no matter what
SIO = Transmitter/Receiver
(TXRX=0)
P5M setting
P5.2/SO
P5.2 will change to Input mode automatically, no matter what P5M
setting
SIO = Receiver only
SENB=0 (SIO Function Disable)
P5.0/P5.1/P5.2 Port5[2:0] I/O mode are fully controlled by P5M when SIO function Disable
SIOB DATA BUFFER
SIOB initial value = 0000 0000
0B6H
SIOB
Bit 7
X
Bit 6
X
Bit 5
X
Bit 4
X
Bit 3
X
Bit 2
X
Bit 1
X
Bit 0
X
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
SIOB is the SIO data buffer register. It stores serial I/O transmit and receive data.
SIOR REGISTER DESCRIPTION
SIOR initial value = 0000 0000
0B5H
SIOR
Bit 7
X
Bit 6
X
Bit 5
X
Bit 4
X
Bit 3
X
Bit 2
X
Bit 1
X
Bit 0
X
W
W
W
W
W
W
W
W
The SIOR is designed for the SIO counter to reload the counted value when end of counting. It is like a post-scaler of
SIO clock source and let SIO has more flexible to setting SCK range. Users can set the SIOR value to setup SIO
transfer time. To setup SIOR value equation to desire transfer time is as following.
SCK frequency = SIO rate / (256 - SIOR)
SIOR = 256 - ( 1 / ( SCK frequency ) * SIO rate / 2 )
ꢃExample: Setup the SIO clock to be 5KHz. Fosc = 3.58MHz. SIO’s rate = Fcpu = Fosc/4.
SIOR = 256 – (1/(5KHz) * 3.58MHz/4)
= 256 – 89
= 167
SONiX TECHNOLOGY CO., LTD
Page 103
Revision 1.94