Hi community,
First time poster, so I apologise if I'm posting to the wrong forum of a crap post you're about to read
So, I've built a board with an RTC module, an LCD display and some relays. Everything works as it should and my system is functioning properly, except when I power it down and turn it back on. When my board us running off of 12V VIN pin my system isn't getting the time from the RTC module. but, when I plug the USB in it picks up the time from the RTC.
My RTC is running on A4 and A5 together with the LCD which is also using a serial module on the same pins. However, even without the LCD connected the time is incorrect until the USB is plugged in.
This really doesn't make sense from everything I read. The RTC module is this one:
https://www.jaycar.com.au/medias/sys_master/images/8978843140126/XC4450-dataSheetMain.pdf
It's connected to VCC 5V and GND and SCL and SDA are connected to A4 and A5. When the USB is connected and the IDE is open I get the correct time printed in the console.
But this weird issue is killing me. So everything is running well, but when the power is connected and reconnected the system loses the current date and time and all it needs is the USB to be connected to start working again. Even with my Mac in sleep mode, in which case it's only getting the power via USB I suspect.
Any ideas would be appreciated. Thank you in advance!
Cheers,
M