
NUC126
Aug. 08, 2018
Page
346
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
–
Reset I2C1 controller in I2C1RST (SYS_IPRST1[9]]).
Pin Configuration
Group
Pin Name
GPIO
MFP
I2C1
I2C1_SCL
PA.8
MFP2
PC.4, PC.9, PE.4, PF.3
MFP3
PE.8
MFP4
I2C1_SDA
PA.9
MFP2
PC.5, PC.10, PE.0, PE.5, PF.4
MFP3
PE.9
MFP4
6.11.5
Functional Description
On I
2
C bus, data is transferred between a Master and a Slave. Data bits transfer on the SCL and SDA
lines are synchronously on a byte-by-byte basis. Each data byte is 8-bit long. There is one SCL clock
pulse for each data bit with the MSB being transmitted first, and an acknowledge bit follows each
transferred byte. Each bit is sampled during the high period of SCL; therefore, the SDA line may be
changed only during the low period of SCL and must be held stable during the high period of SCL. A
transition on the SDA line while SCL is high is interpreted as a command (START or STOP). Please
refer to Figure 6.11-2 for more detailed I
2
C BUS Timing.
t
BUF
STOP
SDA
SCL
START
t
HD;STA
t
LOW
t
HD;DAT
t
HIGH
t
f
t
SU;DAT
Repeated
START
t
SU;STA
t
SU;STO
STOP
t
r
Figure 6.11-2 I
2
C Bus Timing
The device’s on-chip I
2
C provides the serial interface that meets the I
2
C bus standard mode
specification. The I
2
C port handles byte transfers autonomously. To enable this port, the bit I2CEN in
(I2C_CTL [6]) should be set to '1'. The I
2
C hardware interfaces to the I
2
C bus via two pins: SDA and
SCL. When I/O pins are used as I
2
C ports, user must set the pins function to I
2
C in advance.
There is two-level buffer to improve the performance of I
2
C bus. In two-level buffer mode, the next
transmitted or the last received data can be active even if the current data is transmitted or the last
received isn’t read back yet.
There are under run or over run interrupt when the two-level buffer mode is enabled and the interrupt
event enable is set. When two-level buffer under run, user will capture the last data be read. When
two-level buffer over run, user will capture the last data be written.
Note:
Pull-up resistor is needed for I
2
C operation as the SDA and SCL are open-drain pins.
6.11.5.1 I
2
C Protocol
Figure 6.11-3 shows the typical I
2
C protocol. Normally, a standard communication consists of four
parts:
START or Repeated START signal generation