App note: Low-Power Real Time Clock


An application note (PDF!) on low-power real-time clock from Microchip:

This application note uses the Timer1 module, from a mid-range PIC16CXXX microcontroller, to control a low-power real-time clock. Timer1 was chosen because it has its own crystal which allows the module to operate during sleep. The two events that will wake the device from sleep (for this application) are a keypress and a Timer1 overflow.

Join the Conversation


  1. So they claim a low power rtc but then don’t give any details of power consumption of the circuit in the AN… Can it compete with the <1uA current draw of the rtc chips I can get from a cursory digikey search at <$1, or are they just telling us something that is already blatantly obvious, i.e you can use a MCU to keep track of how many seconds it has been on for….

    1. Check the datasheet of the PIC16(L)F171x series first before complaining.
      Can its typical sleep mode current draw of 50 nA at 1.8 V compete with “< 1 uA current draw"? You tell me…

      1. Well sure, if it spends the whole time in sleep mode, but that isn’t the point. It is using an external oscillator and has extra wakeups, so with the overhead beyond minimal sleep mode it would have been nice if they had included some of that data in their AN. Especially given that their datasheet explicitly points out that enabling the sleep mode peripherals such as timer1 will increase current draw (as likely will using an external oscillator rather than the 31kHz LFINTOSC)

        I agree if you are using an LF part PIC in an application that requires RTC functionality it could make sense to use the pic rather than add an extra rtc chip, but with the caveat that the extra complexity of switching the PIC power supply between an external supply and a backup battery may be the worse solution compared to an RTC chip that is already designed with this in mind.

      2. With regard to regular wake-ups from sleep: What RTC chip can interface with an LCD display and read button inputs? Let’s assume for a minute there is something like this which can interface with a display and can be programmed in a way to react meaningfully to button presses. Do you know an RTC chip that can all this with a current draw < 1uA? Which one is it?

        Also, you should know that this app note is about how to program (!!!) this PIC family with low power applications in mind. RTC is just a chosen example for covering the topic. This is not an app-note about how to design a power management circuits for different application scenarios. Heck, it is not about circuit design at all… You seem to have missed the intent and purpose of the app note by a country mile. That said, outside of the context of this app note, i agree with you that when power management becomes a concern one might rather choose a dedicated combined RTC+PMIC.

      3. With regard to the external 31kHz osc. I am under the impression that using timer1 with LFINTOSC does not increase current draw significantly during sleep mode, but perhaps i missed something in the datasheet that says otherwise. However, using a better external oscillator will indeed increase the current draw during sleep mode to about 500nA.

    2. Add a lot of salt to this app note, it uses an ancient PIC16CXXX, ouch!
      Modern PIC16Fs with a 32768Hz oscillator can run the oscillator at ~1uA, BUT at 1.8V. For 3V operation the ballpark figure is 2.3uA. Then add a bit for counter updating. Even if you double the 2.3uA, it comes up to 5 years for a CR2032 coin cell assuming 200mAh. It’s not a huge problem, is it?

      This is for 3V parts, for 5V parts you have to check the internal regulator features, some have a low power sleep regulator. The normal internal regulator operation uses up to 20uA, depending on the part. Watch out! Or pick a PIC24 with RTC, then you can save on waking up and have all the features of an RTC, and the power consumption is in the same ballpark as the PIC16 XLP parts. So the more exact equivalent if you want to remove an external RTC chip is to use a suitable PIC24 with RTC. The 2.25uA at 3.3V will give 10 years for a 200mAh CR2023.

      1. True that. From using Microchip’s website over the years I guess I am not surprised. Link glitches galore. 0582B dated 1997 uses the PIC16CXXX. Comparing the two, it looks like marketing has got hold of manpower to update some of these ANs, and this one specifically to flog their Explorer 8 dev board. Thanks marketing! Once Microchip told me old ANs cannot be updated to fix bugs, ha ha ha..

  2. Take a look at the original copyright date: 1997. This App note is nearly 20 years old. While the concepts are sound, low power has moved on quite a bit, along with available RTC chips.

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.