Quote Originally Posted by fazan83 View Post
I don't understand by what you guys mean PIC16F84a doesn't have PWM.
We can use the pulseout command right?

PULSOUT Pin,Period
By PWM they mean hardware PWM module see data sheet of 16f8xx.
pic basic pro has got a command to use this its..
HPWM Channel, dutycycle, frequency.

PIC 16F84 does not have this hardware module so you can't use this command. But you do have a software pwm command..
PWM pin, duty, cycle. but the disadvantage is...
The PIC has to keep churning out pulses all the time not able to do other important things like adc measurement or rpm measurement etc which will be the feedback to control your motor. The second thing is the software pwm is only for a limited no of cycle & to keep it ON you need to give it or invoke the command again after the cycle is over.

Pulseout command is commonly used as clock or some cases in hobby projects to control servo motors. but in all these cases the micro is made to spend all its time only to generate pulse. Log on to rentron.com & you will find some nice examples to use pwm to fire IR leds.

Regards
Raghunathan.