Not able to get pwmout to work

clucas

New Member
Hi - I am a bit new to this and I want modulate the speed of a motor using pwmout command. I have tried using the wizard in program editor and Logiator. The chip is a 28X1 on the AXE20 board. The motor is on output 2 and I can get the motor running using a high/low command but regardless of the values I use, the pwmout command has no effect.
Thanks
 

nick12ab

Senior Member
Welcome to the PICAXE Forum.
Hi - I am a bit new to this and I want modulate the speed of a motor using pwmout command. I have tried using the wizard in program editor and Logiator. The chip is a 28X1 on the AXE20 board. The motor is on output 2 and I can get the motor running using a high/low command but regardless of the values I use, the pwmout command has no effect.
Thanks
What's the AXE20?
What's your complete code? - both versions please.
 

clucas

New Member
I can get moto working with this:
init:
symbol motport = B.2
low motport
wait 1


main:
high motport
pause 500
low motport
wait 5
goto main
 

clucas

New Member
Various attempts at a basic program of this kind:


main:
label_5: pause 2000 'Wait command
pwmout 2 , 99 , 200
pause 1000 'Wait command
pwmout 2 , 99 , 100
goto label_5

Sorry for the multiple posts but forum would not let me post it all on one.
Thanks
 

clucas

New Member
I think I have solved the problem - the 28X1 chip only has pwm outputs on pins 12 and 13 which do not go through the darlington transistor! However hpwm can be used on output 2 and seems to work ok. Cant seem to find hpwm as a command in Logicator though.
Thanks
 

nick12ab

Senior Member
I think I have solved the problem - the 28X1 chip only has pwm outputs on pins 12 and 13 which do not go through the darlington transistor! However hpwm can be used on output 2 and seems to work ok.
Rev-Ed should change the PWM wizard as it was misleading for it to just show a number without a port letter and for an output command it would imply one of the normal output pins! (port B)


Cant seem to find hpwm as a command in Logicator though.
Thanks
You can use a BASIC cell instead.
 
Top