MCC Melody AVR® RTC PLIB Driver: Sleep 3s, wake for 1s toggling a LED - Power Measurement | Videos
MCC Melody AVR® RTC PLIB Driver: Sleep 3s, wake for 1s toggling a LED - Power Measurement
Click on the link to open the Real Time Counter (RTC) in the MCC Melody API reference for AVR: https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=SCF-AVR8-RTC-V1&version=latest&redirect=true
In this video an MCC Melody Project is created, which sets up the Periodic Interrupt Timer (PIT) of the AVR RTC to wake the MCU from Power Down mode, the AVRs lowest power mode, every 4s.
While awake a delay is used to toggle the LED every 50ms. Then the RTC Overflow interrupt, after 1s, sets a flag which puts the AVR back to sleep.