Just want to make sure this code doesn't fry my board before i try it
noobmuncher
Posts: 124
I just pulled apart a Christmas present of pass which is an old "RAD Robot" I have. I am using a SN754410 Quad Half H-Bridge IC www.sparkfun.com/commerce/product_info.php?products_id=315 to power the opening and closing of the arms and the leaning forward and backwards of the torso. So I have it wired up to my propeller education kit via the pin layout described here www.hobbyengineering.com/appHBridge1A.html however I am really afraid of frying it with the code I have. I have hooked this up on the BS2 before and it worked fine, but with that I just told two of the 4 signal pins to send HIGH commands and the others to have LOW and then just changed it. With the propeller I am a bit confused by the dira and the outa commands. I just need pins 27 and 25 to receive HIGH while 24 and 26 LOW and conversely.
If some one can help with this very simple problem that would be great, I am just afraid of having something get fried ha ha.
Thanks!
If some one can help with this very simple problem that would be great, I am just afraid of having something get fried ha ha.
Thanks!
Comments
as you didn't attached your code I can only say a little
DIRA is to set the DIRection of an IO-Pin
OUTA is for setting the IO-pins voltage
I enjoyed porting the BS2-example-code to SPIN
best regards
Stefan
Pin (of the SN754410) :
1: Vdd
2:P27
3: Motor 1 A
4: Vss
5: Vss
6: Motor 1 B
7: P26
8: Negative terminal on the battery
9: Vdd
10: P25
11:Motor 2 A
12: Vss
13: Vss
14:Motor 2 B
15: P24
16:Positive terminal on the battery
and the code (among many, that i have now tested) is
PUB LedsOn
repeat
dira[noparse][[/noparse]24..27] := %1111
outa[noparse][[/noparse]24..27] := %0101
waitcnt(clkfreq + cnt)
outa[noparse][[/noparse]24..27] := %1010
waitcnt(clkfreq + cnt)
Thank you so much, Happy Holidays!
Thanks again
Clock Loop mentioned that the SN754410-chip needs a SUPPLY-voltage of minimum 4.5V
so supplying it with 3.3V is too low
The IO-Pins start with zero not with 1
To do more analysing you have to provide a schematic of how you wired EVERYTHING
This means connections from Prop to SN754410 and SN754410 with the motor
With ALL pins numbered and named.
best regards
Stefan