help with pic16f877+generation of 120khz pwm

hey there guys. I need some help urgently. using the setup of the PIC i have attached to this thread can someone please help me with the following:
[​IMG]



I want to use the ccp1 module in pwm mode to generate a 120khz square wave with a duty cycle of 50%.

once this is done, the ccp1 module should be continuosly enabled and the trisc bit for the pin is used to gate the pwm output. when the trisc bit is set, the pin is an input and the 120khz is not presented to the pin(rc3) but when trisc is clear the pin becomes an output with the 120Khz signal on it.

lets say i have a switch connected to RB1. When this switch is pressed, the 120khz square wave is outputted on the RC3 pin for a period of only 1ms. How do i do this?

Can someone please help me with this. Can you show me what the C code would look like to do the above.

Replies

You are reading an archived discussion.

Related Posts

Hey I heard Acer has launched a 3d laptop. Is it possible for a laptop to have a 3d projection. how its different from other laptops? Check out this link...
Mr. John Chadwick of EngCom mentions CE on his website Engineering News by You :: Links - Engcom The site's got some cool stuff for engineers, so check it out....
I got a mail from the Texas Instruments folks about a new contest they are sponsoring. The link in the mail points to a site called "Mahalowpower". It looks to...
I came across many sample resumes on different sites. they stated widely about skills, achievements and job responsibilities. Has anyone else seen this? Do I just ignore it? I'm a...
The war of words is going on for quite some time now. But the question still remains intact - Do we really need twitter? It is more about twitter because...