pitufos
Joined: 08 Oct 2003 Posts: 11 Location: BRAZIL
|
Output Compare - dsPIC |
Posted: Mon Feb 07, 2011 7:09 am |
|
|
Hi everyone,
I'm trying to work with dsPIC30F3012 running at 20Mhz(HS2_PLL8) and Output Compare module.
I'm generating pulses between 800KHz and 2MHz using OC1.
Code: |
//TIMER-PULSE MODE
setup_timer2(TMR_INTERNAL | TMR_32_BIT , 11);//11 to 800KHz or 4 to 2MHz
//CONTINUOUS PULSE MODE
setup_compare( 1,COMPARE_CONT_PULSE | COMPARE_TIMER2 );
|
What is the best way to "count" the pulses generated by this module?
I´ve tried to control by #int_OC1, but it didn't work.
Regards,
Leandro |
|