he said Basic, you could just turn a pin on and off with a delay in between. So:
on
delay x
off
delay y
repeat
that would be your simplest PWM, adjust x and y to suit your required duty cycle and frequency (noting your frequency will obviously be affected by your crystal)
Problem with doing it in BASIC (unless the BASIC has a PWM command) it may not leave much time for anything else. What PWM period (frequency) are you hoping for? How many channels (motors)?
Pic basic pro has 2 commands that might work, they support pulsout, which i have used to drive servos, and they also have PWM command, i havent used this one. but it is one of the instruction sets in basic
thank you all
but there is one problem
i will drive a motor wuth PWM but iwant to do other things while doing PWM , so this is a big probelm
thanks after all