HPWM only one motor working?

Hey guys,

i have another question about the good ol' HPWM function on the picaxe.

i am using a picaxe 20x2 and this is my code:

main:

hpwm pwmfull_f,pwmhhhh,10,200,500

pause 1000

hpwm pwmfull_f,pwmhhhh,10,200,800

pause 1000

goto main

 

when i connect pins c.5,c.4,c.3 and b.4 to an L293D and run the picaxe with this code only one motor turns.

after a bit of testing it seems that whichever motor is connected to pin c.5 is the only motor that works.

any ideas why this is??

I don’t think anyone on LMR

I don’t think anyone on LMR has ever figured out how to get hpwm working on the Picaxe. The Picaxe manual references a ‘HPWM motor driver datasheet’, which has never been released.

I did find this post on the picaxe forum that may help, if you are determined to use the hpwm command.  However, you should be able to get PWM working just fine with the pwm and pwmduty commands. There are many examples of this on this site.

I second

I have posted this answer at least 5 times now to folks trying the HPWM in picaxe and I will give you the same answer.

HPWM is the holy grail of picaxe. No one has ever done it. Not a single LMR member has ever done it, period. If you get this figured out, you will be the first. To cut to the chase, there will be almost no help in figuring this out, but all the glory will go to you when you do.

Ah…I haven’t looked at the

Ah…I haven’t looked at the secion in a while, but it does look to be updated. Maybe not the holy grail after all? The manual is v7.4 dated 3/2011

Take a pic of your setup and

Take a pic of your setup and post it. Make sure it’s clear and we can see where all of the lines are going.

Edit: what are you expecting to occur ? When you say whatever motor is connected to c5, I assume you men whatever motor that pin controls. From the info that you’ve given so far, this is to be expected as you are only changing the duty cycle and not the output pin.

 

After reading the picaxe manual2,

it looks like your code should be more like:

 

main:

 

 – hpwm pwmfull_f,pwmhhhh,10,200,500

hpwm 2,0,0,200,500 – according to the manual the 3rd value should be 0 when using pwmfull

pause 1000

– hpwm pwmfull_f,pwmhhhh,10,200,800

hpwm 2,0,0,200,800

pause 1000

goto main

 

In full mode you will get modulation on either D, when A is active(active is whatever you set it as, High or Low), or modulation on B, when C is high. When A is active, B and C will be inactive and when C is active, A and D will be inactive.

As I read it, you would be better off using single mode for motor control.

Man…

God, I want to see someone get this working…

**This may help. **

This may help.  https://www.robotshop.com/letsmakerobots/node/25880