English
Language : 

SM59R16A5 Datasheet, PDF (60/89 Pages) SyncMOS Technologies,Inc – Two serial peripheral interfaces in full duplex mode
SM59R16A5/SM59R09A5/SM59R05A5
8-Bit Micro-controller
64KB/36KB/20KB with ISP Flash
& 2KB RAM embedded
14. IIC function
The IIC module uses the SCL (clock) and the SDA (data) line to communicate with external IIC interface. Its speed can be
selected to 400Kbps (maximum) by software setting the IICBR [2:0] control bit. The IIC module provided 2 interrupts
(RXIF, TXIF). It will generate START, repeated START and STOP signals automatically in master mode and can detects
START, repeated START and STOP signals in slave mode. The maximum communication length and the number of
devices that can be connected are limited by a maximum bus capacitance of 400pF.
The interrupt vector is 6Bh.
Mnemonic
AUX
IICCTL
IICS
IICA1
IICA2
IICRWD
IICS2
Description
Auxiliary register
IIC control
register
IIC status register
IIC Address 1
register
IIC Address 2
register
IIC Read/Write
register
IIC status2
register
Direct
91h
F9h
F8h
FAh
FBh
FCh
FDh
Bit 7
BRGS
IICEN
MStart
-
Bit 6 Bit 5
IIC function
-
P4SPI
Bit 4
P4UR
1
Bit 3
P4IIC
MSS MAS RStart
RXIF TXIF RDR TDR
IICA1[7:1]
IICA2[7:1]
IICRWD[7:0]
-
-
- AB_EN
Bit 2 Bit 1 Bit 0 RESET
P0KBI
P2PW
M
DPS
00H
IICBR[2:0]
04H
RXAK TXAK RW
00H
MATCH1
or RW1
A0H
MATCH2
or RW2
60H
00H
BF_E
N
AB_F
BF
00H
Mnemonic: AUX
7
6
5
BRGS
-
P4SPI
4
P4UR1
3
2
1
P4IIC P0KBI P2PWM
Address: 91h
0 Reset
DPS 00H
P4IIC: P4IIC = 0 – IIC function on P1.
P4IIC = 1 – IIC function on P4.
Mnemonic: IICCTL
7
6
5
IICEN
MSS
4
3
MAS RStart
Address: F9h
2
1
0
Reset
IICBR[2:0]
04h
IICEN: Enable IIC module
IICEN = 1 is Enable
IICEN = 0 is Disable.
MSS: Master or slave mode select.
MSS = 1 is master mode.
MSS = 0 is slave mode.
*The software must set this bit before setting others register.
MAS: Master address select (master mode only)
MAS = 0 is to use IICA1.
MAS = 1 is to use IICA2.
RStart: Re-start control bit (master mode only)
When this bit is set, the module will generate a start condition to the SDA and SCL lines (after
current ACK) and send out the calling address which is stored in the IICA1 or IICA2( selected by
MAS control bit).When module is finished to send out address, this bit will be cleared by
hardware.
IICBR[2:0]: Baud rate selection (master mode only), where Fosc is the external crystal or oscillator
frequency. The default is Fosc/512 for users’ convenience.
IICBR[2:0]
Baud rate
000
Fosc/32
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M047
60
Ver.H SM59R16A5 04/2015