12.07.2015 Views

Low Energy Timer - AN0026 - Application Note - Energy Micro

Low Energy Timer - AN0026 - Application Note - Energy Micro

Low Energy Timer - AN0026 - Application Note - Energy Micro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

...the world's most energy friendly microcontrollersFigure 4.1. RTC TriggerCOMP0IFRTC_COMP0RTC_CNT0LETIMER STARTUFIF UFIF UFIF UFIF UFIFLETIMER0_COMP0LETIMER0_CNT0REP0 = 5 REP0 = 4 REP0 = 3 REP0 = 2 REP0 = 1 REP0 = 0LETIM_OUT0The RTC generates a compare match after 5 seconds (RTC_COMP0 = 5) of program execution whichwill trigger the LETIMER to start counting. The LETIMER will count-down while LETIMERn_REP0!=0generating a pulse on each underflow. For this project LETIMER_REP0 has the value of 5 so there willbe 5 pulses generated on pin PD6 (P5.9 on the DK protoboard).<strong>Note</strong>The RTC continues counting after the compare match. If it wraps around the top valueand generates a new compare match the LETIMER will not be triggered becauseLETIMERn_REP0 = 0.2013-05-08 - an0026_Rev1.05 8 www.energymicro.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!