high speed motor with h-bridge
willie
Posts: 3
·I am writing a program to run high speed moter with h-bridge. In the program I understand the motor runs on a
pulse out comand to hold the motor at say 1000 for five seconds would you, pause for 5000? and to send the motor to low to stop it would, pulsout I/O pin , 0 to stop the motor? Also using var word would I use the var. in place of the I/O pin number.·Any help would be appreciated,·I am tring to have this program ready for class monday.
thanks
Willie
·
pulse out comand to hold the motor at say 1000 for five seconds would you, pause for 5000? and to send the motor to low to stop it would, pulsout I/O pin , 0 to stop the motor? Also using var word would I use the var. in place of the I/O pin number.·Any help would be appreciated,·I am tring to have this program ready for class monday.
thanks
Willie
·
Comments
Welcome to the Parallax Forums!
Please post the code that you are currently using and any schematics if you have them available.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
' {$PBASIC 2.5}·········low speed for five seconds, I picked 150 then runs the other direction at a higher
·r VAR Word··············speed·I set it at 1000 for five five seconds then it must stop for five seconds then loop
·x VAR Word·············
·OUTPUT 0················ I added schematic with attachment manager.
·OUTPUT 1
·r= 0························ Thanks Willie
·x=0
·main:
·PULSOUT 0,150
·DEBUG CR, "150"
·IF r=5000 THEN back
·GOTO main
·back:
·PULSOUT 1,1000
·DEBUG CR, "1000"
·IF x=5000 THEN halt
·GOTO back
·halt:
·PULSOUT 0,0
·PULSOUT 1,0
·IF r+x=5000 THEN main
·halt
In short, I think you need an "HWPM" signal generator -- these do exist, that convert a PULSOUT speed setting signal into the repetitive HWPM duty cycle signals.