thanks guys. I'm currently programming in basic and i just found that it already has a code for PWM. Before i was just toggling between low and high which seemed to work but not nearly as smooth as the PWM.counter var byte
r_duty var byte
counter = 0
r_duty = 50
LOW 0
LOW 1
LOW 4
PAUSE 1000
high 4
'PROGRAM START
dutycycle_loop
for counter = 0 to 205
r_duty = r_duty + 1
gosub generate
next
high 0
pause 1000
for counter = 0 to 205
r_duty = r_duty - 1
gosub generate
next
goto dutycycle_loop
generate
pwm p0, r_duty, 50000
return
One thing that i did notice is that even when duty is 100% the motors are not pulling maximum speed, and not really even close, more like 80%. Is the only way to get 100% of motor power to set p0 to high and p1 to low?
Bane