Here are a few things that 'may' help;
1. If you're using an oscillator >8MHz, then you'll want to include DEFINE I2C_SLOW 1
since the 1307 max clock speed is 100kHz.
2. The SQW output is an open-drain type. I.E. it cannot output a logic 1. Use a 10K
pull-up on the SQW output. Then you should see a square wave output on your scope.
3. Use the external pull-ups on SDA and SCL.
4. Connect a 3V battery to the 1307 Vbat input.





Bookmarks