So from what I feel, you'll need to use HPWM. Look in your datasheet to spot the CCP1, CCP2 pins, see if they're free, and If so, well, it's just a matter of few lines of code then.
Play around this one
Code:
if Strenght= 0 then
HPWM Channel, DutyCycle, Frequency
PAUSE 500
CCP1CON = 0 ' turn of PWM
LOW YourBuzzerOut (or high depending)
PAUSE 500
endif
if Strenght= 64 then
HPWM Channel, DutyCycle, Frequency
endif
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks