Timers - dspic33f

Discussion in 'Embedded Systems and Microcontrollers' started by Bird0030, May 15, 2012.

  1. Bird0030

    Thread Starter New Member

    Mar 11, 2011
    I am fairly new to assembly language and using Dspic's. The following is a program that I have been working at for quite awhile. I am using DsPic33fj64gp802.

    "Write a program for timer, the timer is working as counting mode, and its main subroutine will display its counted value on PORTB.
    Every 5 pulse from outside, it will trigger the timer interrupt, then its interrupt subroutine will toggle PORTA.0 five times"

    I am unsure how to implement the interrupt on the 5th pulse from the outside.
    At the moment I am trying to use timer1 as an Asynchronous counter, which the interupt will toggle PORTA.0 five times..

    Any help or suggestions would be appreciated.
    Thank you.