SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 94
Version 1.0
Because SIO function is shared with Port5 for P5.0 as SCK, P5.1 as SI and P5.2 as SO
The following table showed the Port5[2:0] I/O mode behavior and setting when SIO function enable and disable
SENB=1 (SIO Function Enable)
(SCKMD=1)
SIO source = External clock
P5.0 will change to Input mode automatically, no matter what P5M
setting
P5.0/SCK
(SCKMD=0)
SIO source = Internal clock
P5.0 will change to Output mode automatically, no matter what
P5M setting
P5.1/SI
P5.1 must be set as Input mode in P5M, or the SIO function will be abnormal
(TXRX=1)
SIO = Transmitter/Receiver
P5.2 will change to Output mode automatically, no matter what
P5M setting
P5.2/SO
(TXRX=0)
SIO = Receiver only
P5.2 will change to Input mode automatically, no matter what P5M
setting
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
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
SIOB
SIOB7 SIOB6 SIOB5 SIOB4 SIOB3 SIOB2 SIOB1 SIOB0
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
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
SIOR
SIOR7 SIOR6 SIOR5 SIOR4 SIOR3 SIOR2 SIOR1 SIOR0
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-scalar 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 )
Example: Setup the SIO clock to be 5KHz. F
OSC
= 3.58MHz. SIO rate = F
CPU
= F
OSC
/4.
SIOR = 256 – (1/(5KHz) * 3.58MHz/4)
= 256 – (0.0002*895000)
= 256 – 179
= 77