Hi - thanks so much for this project.  The code is very clear and it was easy to test and understand!'

I am looking to deploy this code in a home project using a PIC16F1938.  It was possible to get it running in Proteus with little trouble.  However, when I load it to a live PIC, it hangs up when reading the time (when it reads the seconds, it comes back with a value of 0xD1 (what we put in the buffer to send a read command to the DS3231) and then when the I2C_Hold functin is called at the start of reading the minutes the SSPCON2 register has a value of 0x10 and it locks up.

I am convinced that I have made a wiring problem, but have confirmed the following:

  • VDD - 5V
  • SDA and SDC both have a pull-up via 10K resistors
  • GND connected

Are there any gotchas for I2C that I may be missing???

 

 

Never shown publicly.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.