20 I
2
C
20-8
EPSON
S1C17704 TECHNICAL MANUAL
When STP is set to 1, the I
2
C module pulls up the SDA line from low to high with the SCL line held at high to
generate a STOP condition on the I
2
C bus. This makes the I
2
C bus in free status.
Furthermore, the I
2
C module allows presetting for generating a STOP condition in advance. To do this, set STP
to 1 after checking if the I
2
C is operating (TBUSY = 1 or RBUSY = 1). A STOP condition will be generated
upon completion of data transmission/reception (including an ACK transfer).
STP is automatically reset to 0 after a STOP condition has been generated.
The
I
2
C module does not support repeated START condition. A STOP condition cannot be omitted before
generating a new START condition for starting the next data transfer.
Wait state by setting TXE, RXE, STRT, and STP
If TXE (D9/I2C_DAT register), RXE (D10/I2C_DAT register), STRT (D0/I2C_CTL register), and STP (D1/
I2C_CTL register) have all been set to 0 when byte data and ACK transfer have finished, the I
2
C module fixes
the SCL output at low and enters wait state. The wait state will be canceled by writing 1 to TXE or RXE to
resume data transmission/reception or by writing 1 to STP to generate a STOP condition.
Disabling data transmission/reception
After data transfer (both transmission and reception) has finished, write 0 to the I2CEN bit to disable data
transmission/reception.
Always make sure that the RBUSY and TBUSY flags are 0 before data transmission/reception is disabled.
The data being transferred cannot be guaranteed if I2CEN is set to 0 during transmitting/receiving.
Timing charts
PCLK
T16 Ch.2 output
SCL (input)
SCL (output)
SDA (input)
SDA (output)
STRT
STP
TXE
RXE
TBUSY
RBUSY
RBRDY
RTACK
Shift register
RTDT[7:0]
Interrupt
A6
valid
shift
valid
shift
shift
shift
shift
shift
shift
shift
A[6:0] + DIR
D[7:0]
A5
A4
A3
A2
A1
A0
D7
D6
(ACK received)
DIR = 0
ACK
Register settings
Start communication
Start transmission
Start transmission
Set transmit data and TXE
START
condition
Slave address transmission
Data transmission
ACK reception
Figure 20.5.5 I
2
C Timing Chart 1 (START condition
→
data transmission)
Содержание S1C17704
Страница 1: ...TECHNICAL MANUAL S1C17704 CMOS 16 BIT SINGLE CHIP MICROCOMPUTER ...
Страница 22: ...1 OVERVIEW 1 10 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 42: ...3 MEMORY MAP BUS CONTROL 3 12 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 82: ...6 INTERRUPT CONTROLLER ITC 6 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 108: ...8 CLOCK GENERATOR CLG 8 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 112: ...9 PRESCALER PSC 9 4 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 138: ...10 I O PORTS P 10 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 156: ...11 16 BIT TIMERS T16 11 18 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 208: ...14 8 BIT OSC1 TIMER T8OSC1 14 16 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 234: ...16 STOPWATCH TIMER SWT 16 14 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 242: ...17 WATCHDOG TIMER WDT 17 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 264: ...18 UART 18 22 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 300: ...20 I2C 20 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 320: ...21 REMOTE CONTROLLER REMC 21 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 360: ...24 ON CHIP DEBUGGER DBG 24 6 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 362: ...25 BASIC EXTERNAL WIRING DIAGRAM 25 2 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...