This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
i'm using rtc interrupt to have an event every 1 minute (default setting of rtc is minute changed event). It works and i have no problem. Is it possible using rtc interrupt for second changed event? For example every 30 seconds i want p1.0 led on.
Thanks,
Luca
Hi Luca,
Yes this is possible. The easiest way is just to enable the RT1PS interrupt. Please take a look at the Technical Reference Manual Section 18.2.6 Real-Time Clock Interrupts and let me know if you need some help writing this code.
"RT1PSIFG can be used to generate interrupt intervals selectable by the RT1IP bits. RT1PS is sourced with the output of RT0PS, which is 128 Hz (32768/256 Hz). Therefore, intervals of 64 Hz, 32 Hz, 16 Hz, 8 Hz, 4 Hz, 2 Hz, 1 Hz, or 0.5 Hz are possible. Setting the RT1PSIE bit enables the interrupt."
Hopefully this helps.
David
ok i'll read the manual. Could i have A simple example of this interrupt? led on off every X seconds. Thanks Luca
**Attention** This is a public forum