20 i
2
C MaSTeR (i2CM)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
20-1
I
20
2
C Master (I2CM)
i2CM Module Overview
20.1
The S1C17624/604/622/602/621 includes an I
2
C master (I2CM) module that supports two-wire communications.
The I2CM module operates as an I
2
C bus master device and can communicate with I
2
C-compliant slave devices.
The following shows the main features of I2CM:
• Operates as an I
2
C bus master device (as single master only).
• Supports standard (100 kbps) and fast (400 kbps) modes.
• Supports 8-bit data length only (MSB first).
• 7-bit addressing mode (10-bit addressing is possible by software control.)
• Includes one-byte receive data buffer and one-byte transmit data buffer.
• Can generate start, repeated start, and stop conditions.
• Supports half-duplex communications.
• Supports clock stretch function.
• Includes a noise filter function to help improve the reliability of data transfers.
• Can generate transmit buffer empty and receive buffer full interrupts.
Figure 20.1.1 shows the I2CM configuration.
Shift register
SDA0
SDA
SCL
SCL0
I
2
C master clock
(from T16 Ch.2)
Internal bus
ITC
I
2
C master
Bus I/F
and
control
registers
Shift register
Clock/transfer control
Noise
filter
Interrupt
control
1.1 I2CM Module Configuration
Figure 20.
i2CM input/Output Pins
20.2
Table 20.2.1 lists the I2CM pins.
2.1 List of I2CM Pins
Table 20.
Pin name
I/O
Qty
Function
SDA0
I/O
1
I2CM data input/output pin (see Note below)
Inputs serial data from the I
2
C bus. Also outputs serial data to the I
2
C bus.
SCL0
I/O
1
I2CM clock input/output pin (see Note below)
Inputs SCL line status. Also outputs a serial clock.
The I2CM input/output pins (SDA0, SCL0) are shared with I/O ports and are initially set as general purpose I/O
port pins. The pin functions must be switched using the port function select bits to use the general purpose I/O port
pins as I2CM input/output pins.
For detailed information on pin function switching, see the “I/O Ports (P)” chapter.