Count objective time with a Micro Coontroller

robbiegal

robbiegal

@robbiegal-ZFsmPr Oct 21, 2024
Hi guys!

I have an MCU ( Microchip PIC18F4525 ) and I want it to count objective time from the moment I turn the MCU on for about two weeks.

The MCU has an on-chip 16-bit timer, but it get to its upper limit in two sec (31kHz clock).

How do I count for hundreds of hours?
Use another timer as a counter?

Is there a more elegant solution?

Thx!

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww Nov 25, 2009

    Here is one suggestion don't know its perfect or not.
    Take variable for minutes, hours, days, months. And write program. After 60 minutes reset that variable and increament hours and same way after 24 hours reset it and increament in days.

    As another option controller available with internal RTC may be solved your problem