I2C acknowledge bit not sent.
Posted: Sat Feb 25, 2023 8:37 am
Hello everyone,
I am trying to establish I2C communication between 2 microcontrollers. My colleague operates PIC32 as I2C master device and my job is to program ESP32S3 as I2C slave device. In my opinion our problem is synchronization but actually I have no clue. We both have written our codes separately and tested them out. I have recreated I2C communication scenario with ESP32S3WROOM-1 chip(slave) and ESP32DOITDEVKIT(master) and the slave device gets the bytes from the master device. I am providing logic diagram below(diagram1). My colleague has written an I2C application for LCD and it works fine, but when the same code is applied to our application(PIC32->ESP32S3) logic diagram does not seem fine to me. I am providing logic diagram below(diagram2) which represents PIC32->ESP32S3 I2C communication. Note, that after NACK data byte is still sent and because no ACK bite is sent, SCL keeps the low state. I am also adding my I2C slave code which works in my personal I2C simulation scenario. Maybe you guys can point out flaws in my code.
I am trying to establish I2C communication between 2 microcontrollers. My colleague operates PIC32 as I2C master device and my job is to program ESP32S3 as I2C slave device. In my opinion our problem is synchronization but actually I have no clue. We both have written our codes separately and tested them out. I have recreated I2C communication scenario with ESP32S3WROOM-1 chip(slave) and ESP32DOITDEVKIT(master) and the slave device gets the bytes from the master device. I am providing logic diagram below(diagram1). My colleague has written an I2C application for LCD and it works fine, but when the same code is applied to our application(PIC32->ESP32S3) logic diagram does not seem fine to me. I am providing logic diagram below(diagram2) which represents PIC32->ESP32S3 I2C communication. Note, that after NACK data byte is still sent and because no ACK bite is sent, SCL keeps the low state. I am also adding my I2C slave code which works in my personal I2C simulation scenario. Maybe you guys can point out flaws in my code.