HB-25 Motor Controller Code
Joe Fishback
Posts: 99
I have two HB-25 motor controllers and I trying to fiqure out some of the code. In the attached file that is from Parallax - "HB-25 Motor Test.bs2", I have a question. I understand how it works except for the·" Initialization " part. When the Basic Stamp powers up all the pins are inputs. The code says
·Do : LOOP UNTIL HB-25 = 1
What makes Pin 15 ( variable HB-25 ) equal 1 ?· Does the HB-25 controller sends back a signal on power up and if so how?
·Sorry I forgot to attach, here is the attachment
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
Post Edited (Joe Fishback) : 4/8/2009 1:35:27 PM GMT
·Do : LOOP UNTIL HB-25 = 1
What makes Pin 15 ( variable HB-25 ) equal 1 ?· Does the HB-25 controller sends back a signal on power up and if so how?
·Sorry I forgot to attach, here is the attachment
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
Post Edited (Joe Fishback) : 4/8/2009 1:35:27 PM GMT
Comments
The HB-25 has an internal pull-up on the signal line. When powered up we can detect this and quickly initialize the HB-25. So when the pin is detected as HIGH the initialization begins. Until then it just sits in that loop. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
Thanks, now I know.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-