??? 06/17/05 10:42 Read: times |
#95147 - LPC9xx RTC - How to read current value |
Hi all
I am successfully setting up the RTC in an LPC925 but I would like to read the value of the RTC at an instant in time. While I assume that I can read the RTCH and RTCL registers, I can't find it documented as to where the 7bit prescaler for the RTC is stored. As such how do I read the value? What I wanted to do was use the RTC as another timer by capturing the value when I want to start timing and capture it again when I want to stop timing, then I have the time between 2 points. Is this feasible? Here is how I set the RTC (I didn't want the interrupt - yes I realise that it may roll over while I am timing but I am just testing at the moment) //Set the RTC up to Internal CLK (0x60) and Start it (0x01) RTCH = 0xFF; RTCL = 0xFF; RTCCON = 0x61; Thanks and Regards; Marshall Brown |