CrazyEngineers
  • Count objective time with a Micro Coontroller

    robbiegal

    robbiegal

    @robbiegal-ZFsmPr
    Updated: Oct 21, 2024
    Views: 1.1K
    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!
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Harshad Italiya

    MemberNov 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
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register