10 years ago.

Does this board have a real time clock?

Do I have to poser the real time clock through the vin or can it be powered by a coin cell battery?

thanks

eric

Question relating to:

2 Answers

10 years ago.

Andy's hardware approach is the way to go. I have had this working with a 1.5v (should really be 3v) cell connected to Vbat for some time now and it works fine. On my board D7 was not populated, so I linked the coin cell to the Vbat connector J15 after breaking the track. Best mid-range MCU so far from Freescale for RTC functions.

10 years ago.

Yes it has an RTC but it looks like the power is taken from the main system power input rather than from a separate battery input.

There is a coin cell holder on the board but that powers the whole CPU not just the RTC which depending on what the software is doing could drain the battery very quickly..

You have two options - The software approach would be to detect that main power has been removed and issue the correct instructions to put the CPU into a low power mode where everything other than the RTC is powered down until power is restored. A little too specific for the mbed library, you'd have to get the CPU user manual and directly set the correct register values.

The hardware approach - Looking at the schematic you could remove/break J15 to isolate VBAT from the main cpu power input. You then install BT1 (the coin cell holder) if it's not fitted and remove D7 to prevent the whole system from powering from the coin cell. Finally run a wire from BT1 pin 1 or 2 to J15 pin 1 to connect the coin cell output to the CPU VBatt input. This isn't ideal, the cpu VBatt input is always powered by the battery even if system power is available, but it's the best option I can see without adding an extra diode.