CY8CMBR3108 I2Cリード

Tip / ログイン to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KySa_4592371
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

CY8CMBR3108を使用して近接センサを1個実装しています。

データシート(文書番号: 001-92218 Rev. *C)の32頁「読み出し動作」について教えて下さい。

最終読み出しデータに対し、ホストはNAKを返すように記載がありますが、

NAKを返さない場合(ACK応答)は何が起きますか?

0 件の賞賛
1 解決策
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hi,

While Master is reading the data from the slave, at the end of every byte of data, the master sends an ACK to the slave, letting the slave know that it is ready for more data. When the master has received the number of bytes it is expecting, it sends a NACK, signaling to the slave to halt communications and release the bus. The master follows this up with a STOP condition.

I2C_read.PNG

So the host should send NACK as per the I2C protocol. Else the protocol is violated and the slave may result in going to undetermined state.

Thanks

Ganesh

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hi,

While Master is reading the data from the slave, at the end of every byte of data, the master sends an ACK to the slave, letting the slave know that it is ready for more data. When the master has received the number of bytes it is expecting, it sends a NACK, signaling to the slave to halt communications and release the bus. The master follows this up with a STOP condition.

I2C_read.PNG

So the host should send NACK as per the I2C protocol. Else the protocol is violated and the slave may result in going to undetermined state.

Thanks

Ganesh

0 件の賞賛

Thank you.
I understand.

0 件の賞賛