hi guys... i've read a lottt of posts on this site and its awesome!
i have a slight problem however.. i need to generate a PWM with 1KHz constant frequency and a duty cycle varying from 5-95% using a PIC12F675..
i cannot use a 12F683.. .. however i did try this using 555. although the duty cycle varies as desired, the frequency does too... any ideas on this would be welcome too...
i dont want a program.. please give me some suggestion on how to go abt it.. i'm new to PIc's and so far all i've done is flash an LED..
thanx in advance.. hoping something would come up..?
What kind of resolution do you want for your duty cycle? You stated a range of 5-95% but do you want to increment by 1%, 5%, 0.5%, etc.? If the resolution isn't too small, you can use Timer 0 and interrupts to free your PIC up for other processing.
It's too bad that you can't use the 12F683. Ignoring the fact that it has a PWM generator, it also has Timer 2 which has a period register and its internal oscillator can run at 8MHz giving you better resolution if you choose to implement a software PWM setup.
hey! thanx so much for your reply...
a 0.5% resolution should do nicely i guess.. i know, but then my boss says no to 12F683.. or any IC which has a CCP module.. so here i am, struggling, cuz all i've managed to learn so far in assembly language programming is to blink an LED..
i've started writing a code tho.. just trial and error, will post it here and someone could lead me on from there...
hey! thanx so much for your reply...
a 0.5% resolution should do nicely i guess.. i know, but then my boss says no to 12F683.. or any IC which has a CCP module.. so here i am, struggling, cuz all i've managed to learn so far in assembly language programming is to blink an LED.
Or his boss is really cheap and won't spring for an extra 5 cents for the 12F675. It could also be that the company already stocks the 12F675 and wants to minimize inventory. But most likely a school project, since their "engineer" is only flashing LEDs so far.