CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Output Compare - dsPIC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pitufos



Joined: 08 Oct 2003
Posts: 11
Location: BRAZIL

View user's profile Send private message

Output Compare - dsPIC
PostPosted: Mon Feb 07, 2011 7:09 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group