How do i go about setup a interrupt timer for a 1 Hz 'HeartBeat' to flash an LED on a dspic30F4012 28 pin?
Thanks,
Sean
How do i go about setup a interrupt timer for a 1 Hz 'HeartBeat' to flash an LED on a dspic30F4012 28 pin?
Thanks,
Sean
See p.43 for datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/70135G.pdf. On p.67 is information on timers:
9.4 Timer Interrupt The 16-bit timer has the ability to generate an interrupt on period match. When the timer count matches the Period register, the T1IF bit is asserted and an interrupt will be generated, if enabled. The T1IF bit must be cleared in software. The Timer Interrupt Flag, T1IF, is located in the IFS0 control register in the interrupt controller. When the Gated Time Accumulation mode is enabled, an interrupt will also be generated on the falling edge of the gate signal (at the end of the accumulation cycle). Enabling an interrupt is accomplished via the respective Timer Interrupt Enable bit, T1IE. The timer interrupt enable bit is located in the IEC0 Control register in the interrupt controller.
Hope this helps,
Clem