BAT32G1x9 user manual | Chapter 20 Serial interface IICA
756 / 1149
Rev.1.02
1
2
3
4
5
6
7
8
9
A6
A5
A4
A3
A2
A1
A0
R/W
ACK
20.5.4
Ack (ACK).
The serial data status of the sender and receiver can be acknowledged by answer (ACK). The receiver returns
a reply each time it receives 8 bits of data.
Typically, the sender receives a reply after sending 8 bits of data. When the receiver returns the reply, it is deemed to
have been received normally and continues processing. Bit2 (ACKDn) can pass through the IICA status register n
(IICSn). Confirm the detection of the Ack. When the master receives the last data for the received state, a stop
condition is generated without returning a reply. When the slave does not return a reply after receiving the data, the
master device outputs a stop condition or a restart condition to abort the transmission. The reasons why a reply is
not returned are as follows:
①
There is no normal reception.
②
The receipt of the last data has ended.
③
The address specified receiver does not exist.
The receiver sets the SDAAn line low on the 9th clock to generate a reply (normal receive).
By setting the bit2 (ACKEn) of the IICA control register n0 (IICCTLn0) to "1", it becomes a state that automatically
generates a response. Sets bit3 (TRCn) of the IICSn register by the 8th bit of data that follows from the 7-bit address
information. In the case of receiving (TRCn=0,1), it is usually necessary to place the ACKEn position "1".
During the slave receive run (TRCn=0,1) cannot receive data or does not need the next data, the ACKEn must
be cleared to "0" to inform the master that the data cannot be received.
When the next data is not needed during the master receive run (TRCn=0,1), in order not to generate a reply,
the ACKEn bit must be cleared to "0" to notify the subordinate sender of the end of the data (stop sending).
Figure 20-16
Ack
SCLAn
SDAAn
When the address of the local station is received, regardless of the value of the ACKEn bit, a reply is
automatically generated; When an address for a non-local station is received, no reply (NACK) is generated.
When the extension code is received, a reply is generated by placing the ACKEn position "1" in advance. The
Ack generation method when receiving data varies depending on the waiting timing setting, as shown below.
•
When selecting a wait for 8 clocks (bit3 (WTIMn) = 0 of the IICCTLn0 register): pass before releasing the
wait ACKEn position "1" generates a reply synchronously with the 8th clock drop edge of the SCLAn pin.
•
When selecting a wait for 9 clocks (bit3 (WTIMn) = 1 of the IICCTLn0 register): pass beforehand ACKEn
position "1" to generate a reply.
Note: n=0,1