Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 11 months ago.
RTC problem with LPC1768
I'm a beginner with LPC1768, and from the datasheet I found that there's a RTC in it. And my problem is that if i want to use the internal RTC to get the real time, what code shall I write in compiler? Do I need to set the time and the date?
1 Answer
6 years, 11 months ago.
You need to do it like this: https://developer.mbed.org/handbook/Time, that uses the RTC. You do need to set the time, since it is just a simple counter in the end. So if you unplug your device, and also the battery backup voltage (the Vbat pin, typically not connected), it will lose its time.