18 UNIVERSAL SERIAL INTERFACE (USI)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
18-33
8.4 I
Table 18.
2
C Master Status Bits
IMSTA[2:0]
Status
0x7
Reserved
0x6
NAK has been received.
0x5
ACK has been received.
0x4
ACK or NAK has been sent.
0x3
End of receive data.
0x2
End of transmit data.
0x1
Stop condition has been generated.
0x0
Start condition has been generated.
(Default: 0x0)
When an operation completion interrupt occurs, read IMSTA[2:0] to check the operation that has been
finished. IMSTA[2:0] is automatically reset to 0x0 by writing 1 to IMIF.
D1
IMEIF: Overrun Error Flag Bit
Indicates whether an overrun error has occurred or not.
1 (R):
Error occurred
0 (R):
No error (default)
1 (W):
Reset to 0
0 (W):
Ignored
IMEIF is set to 1 when an overrun error occurs. At the same time a receive error interrupt request is sent
to the ITC if IMEIE/USI_IMIE register is 1.
An overrun error occurs when a transmit or receive trigger is issued after two-byte data has been re-
ceived (the first byte data exists in the receive data buffer and the second byte data exists in the shift
register) without the receive data buffer being read.
IMEIF is reset by writing 1.
To reset an overrun error, clear IMEIF by writing 1, and then read the receive data buffer (USI_RD reg-
ister) twice.
D0
IMIF: Operation Completion Flag Bit
Indicates whether the triggered operation has completed or not.
1 (R):
Completed
0 (R):
Not completed (default)
1 (W):
Reset to 0
0 (W):
Ignored
IMIF is set to 1 when the operation that is specified and triggered using the USI_IMTG register has
completed. At the same time an operation completion interrupt request is sent to the ITC if IMIE/USI_
IMIE register is 1. IMIF is reset by writing 1.
USI I
2
C Slave Mode Trigger Register (USI_ISTG)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
USI I
2
C Slave
Mode Trigger
Register
(USI_ISTG)
0x300470
(8 bits)
D7–5 –
reserved
–
–
–
0 when being read.
D4
ISTG
I
2
C slave operation trigger
1 Trigger
0 Ignored
0
W
1 Waiting
0 Finished
R
D3
–
reserved
–
–
–
0 when being read.
D2–0 ISTGMOD
[2:0]
I
2
C slave trigger mode select
ISTGMOD[2:0] Trigger mode
0x0 R/W
0x7
0x6
0x5
0x4
0x3
0x2
0x1
0x0
reserved
Receive ACK/NAK
Transmit NAK
Transmit ACK
Receive data/
Detect stop
Transmit data
reserved
Wait for start
Note: This register is effective only in I
2
C slave mode. Configure USI to I
2
C slave mode before this reg-
ister can be used.
D[7:5]
Reserved