Datasheet
V850ES/JG3 CHAPTER 17 I
2
C BUS
R01UH0015EJ0300 Rev.3.00 Page 561 of 870
Sep 30, 2010
17.6.4 ACK
ACK is used to confirm the serial data status of the transmitting and receiving devices.
The receiving device returns ACK for every 8 bits of data it receives.
The transmitting device normally receives ACK after transmitting 8 bits of data. When ACK is returned from the
receiving device, the reception is judged as normal and processing continues. The detection of ACK is confirmed with the
IICSn.ACKDn bit.
When the master device is the receiving device, after receiving the final data, it does not return ACK and generates the
stop condition. When the slave device is the receiving device and does not return ACK, the master device generates
either a stop condition or a restart condition, and then stops the current transmission. Failure to return ACK may be
caused by the following factors.
(a) Reception was not performed normally.
(b) The final data was received.
(c) The receiving device (slave) does not exist for the specified address.
When the receiving device sets the SDA0n line to low level during the ninth clock, ACK is generated (normal reception).
When the IICCn.ACKEn bit is set to 1, automatic ACK generation is enabled. Transmission of the eighth bit following
the 7 address data bits causes the IICSn.TRCn bit to be set. Normally, set the ACKEn bit to 1 for reception (TRCn bit = 0).
When the slave device is receiving (when TRCn bit = 0), if the slave device cannot receive data or does not need to
receive any more data, clear the ACKEn bit to 0 to indicate to the master that no more data can be received.
Similarly, when the master device is receiving (when TRCn bit = 0) and the subsequent data is not needed, clear the
ACKEn bit to 0 to prevent ACK from being generated. This notifies the slave device (transmitting device) of the end of the
data transmission (transmission stopped).
Figure 17-11. ACK
SCL0n
1
SDA0n
23456789
AD6 AD5 AD4 AD3 AD2 AD1 AD0 R/W
ACK
Remark n = 0 to 2
When the local address is received, ACK is automatically generated regardless of the value of the ACKEn bit. No ACK
is generated if the received address is not a local address (NACK).
When receiving the extension code, set the ACKEn bit to 1 in advance to generate ACK.
The ACK generation method during data reception is based on the wait timing setting, as described by the following.
• When 8-clock wait is selected (IICCn.WTIMn bit = 0):
ACK is generated at the falling edge of the SCL0n pin’s eighth clock if the ACKEn bit is set to 1 before the wait state
cancellation.
• When 9-clock wait is selected (IICCn.WTIMn bit = 1):
ACK is generated if the ACKEn bit is set to 1 in advance.
Remark n = 0 to 2