Issue coding RTC 7 segment clock

You really should use either millis(), or test the actual clock values to perform the displayrefresh…. with delay(), you’re spinning the tyres for 99% of the cpu time, when you could be checking buttons, dimming sensors, checking alarms etc.

Also, when you redesign the clock, try a ‘better’ RTC chip like the DS323x family. Much higher accuracy & stability overall. The code is quite similar.

Ok, back to the schematic:


PF5 and PF6 are not the I2C lines, those would be PD0 and PD1, which you are already using for the LED display.

Did you do any testing of this design before having the board made?

1 Like

I had some testing but it was with a different MCU and LED display, I also posted a review request on the EEvblog forum hoping that people could point out mistakes/ improvements I could make. Realizing now I should've used an arduino leonardo with an RTC module and the same displays instead of what I used to do a full on prototype.

Honestly at this point I'm probably better off just redesigning the board entirely, learn from my mistakes and not rush my projects so much, which is what caused this one to be so half baked.

there is a midpoint between breadboard and PCB fab. Use a terminal shield with a power distribution board with terminals. Solid connections via screw terminals ending in duponts to the individual breakout boards. You can make solid prototypes that prove the design over time before committing to copper.

1 Like

All really good points, trust me I learned my lesson and I'll be sure to do that for the redesign. This PCB was my first successful bootload and some code worked, so its a step in the right direction, small victories but a learning process nonetheless.

You might be able to find a software I2C implementation that will work with the DS1307.

Other than that, I've seen lots of boards over the years with cut traces and little bits of 30-gauge wire to correct for design errors. Even the UNO has the famous spacing problem with the headers.

1 Like

I think you’ve done really well, and we all learn more from our mistakes than our successes !

Enjoy !

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.