0
\$\begingroup\$

Hello in I2C we send data to the slave using I2C->TXDATA register. on the same line we need to recieve ACK response from the slave.

From SPI expirience i know that for the slave to respond master needs to send the slave it dummy bits to provide it with clk.

But the ACK is only one bit,how do i provide a clock of 1 bit? Thanks.

enter image description here

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ SPI and I2C are different. Experience with one may not help with the other. To answer teh specific question; to clock one bit, pulse SCL once. That's it. From the data you supply, you appear to be using an I2C core on some MCU : that should handle it for you. \$\endgroup\$ – user_1818839 Oct 18 '20 at 20:22
1
\$\begingroup\$

Every transaction requires you send nine clock pulses from the master, the month byte is for the ACK bit.

For the slave address transaction the data line is left high from the master so the slave can acknowledge the address if recognized.

If you are using the I2C hardware it will automatically send nine clock pulses. If being implemented in software you will need to send all nine clocks by setting the clock high and then low.

\$\endgroup\$
1
  • \$\begingroup\$ Hello Kevin, I am asking regarding sending data from slave to masker. In SPI for the slave to respond on MISO we need to provide it with CLK from the master by sending extra dummy bits on the MOSI line. Do we need in I2C to send CLK to the slave for it to respond? Thanks. \$\endgroup\$ – rocko445 Oct 19 '20 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.