servo controller and bs2sx
Hello stampers.
I have a bs2sx and its working fine. I bought·a psc (rev. b)·but i can't get it to work. here is what i have done.
Set·the power to vdd. (jumper on the BOE)
Connected the serial cable (X15).
Set the power to the PSC with 7.2 volts.
Switched on the power of the bs2sx (position 2)
switched on the power of the psc. (red led lights up)
switched on the servo power of the psc (servo's move to start position)
Then i tested the stamp code to get the firmware version. ( stamp reacts normal) but I don't get the firmware version. (every time the serout command runs i see the green light on the psc blink).
Then i thought maybe the baudrate is not oke. So I tried to changed the baudrate, that also did not work.
Then i thougt lets just write a program to move one servo, that also did not work.
Then i thougt lets try the other PSC (i bought 2) but this one react the same, i can't imagine that both are broken. SO basicly the PSC doesn't react to the command sent by the stamp.
Does anybody know what the problem is ? I'm getting desperate here. I want my hexapod to move its bud
Bas
·
I have a bs2sx and its working fine. I bought·a psc (rev. b)·but i can't get it to work. here is what i have done.
Set·the power to vdd. (jumper on the BOE)
Connected the serial cable (X15).
Set the power to the PSC with 7.2 volts.
Switched on the power of the bs2sx (position 2)
switched on the power of the psc. (red led lights up)
switched on the servo power of the psc (servo's move to start position)
Then i tested the stamp code to get the firmware version. ( stamp reacts normal) but I don't get the firmware version. (every time the serout command runs i see the green light on the psc blink).
Then i thought maybe the baudrate is not oke. So I tried to changed the baudrate, that also did not work.
Then i thougt lets just write a program to move one servo, that also did not work.
Then i thougt lets try the other PSC (i bought 2) but this one react the same, i can't imagine that both are broken. SO basicly the PSC doesn't react to the command sent by the stamp.
Does anybody know what the problem is ? I'm getting desperate here. I want my hexapod to move its bud
Bas
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
I used the examples from the psc documentation (pdf).
'{$PBASIC2.5}
Sdat PIN 15
Baud CON 396
buff VAR Byte(3)
FindPSC:
DEBUG "FindingPSC", CR
SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?",CR]
SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3]
DEBUG "PSCver:", buff(0), buff(1), buff(2), CR
STOP
Change "BAUD CON 396" to "BAUD CON 1021" and it should work.
Baud··· CON·· T2400 + Open
If you do it this way, change the SEROUT line to remove the $8000 (since it's part of the Baud defintion)
Find_PSC:
· DEBUG "Finding PSC", CR
· SEROUT Sdat, Baud, [noparse][[/noparse]"!SCVER?", CR]
· SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3]
· DEBUG "PSCver:", buff(0), buff(1), buff(2), CR
· STOP
While I stand by the notion that conditional compilation is the best long-term route, you can get yourself going by changing the Baud constant in your program from 396 (BS2) to 1021 (BS2sx).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Post Edited (Jon Williams) : 4/5/2005 2:12:53 PM GMT