Communication between BS2 & PSC suddenly doesn't work anymore...
Pengatom
Posts: 21
Hello
After sitting the whole entire weekend programming my HexCrawler, everything worked great yesterday.
But today when I took it to school for show off, ·I didn't work anymore??
In the start I try to set the baud to 38k4, but it seems·like the BS2·can't read the version from the PSC, and stops there.
from this code
I only get this:
·and then it just repeat this forever
Anyone knows what the h... is wrong ?
After sitting the whole entire weekend programming my HexCrawler, everything worked great yesterday.
But today when I took it to school for show off, ·I didn't work anymore??
In the start I try to set the baud to 38k4, but it seems·like the BS2·can't read the version from the PSC, and stops there.
from this code
Fix_Baud: Chk2k4: Baud = 396 + $8000 DEBUG "Checking PSC with 2400 Baud",CR SEROUT PSC, Baud, [noparse][[/noparse]"!SCVER?",CR] SERIN PSC, Baud, 500,Chk38k4 , [noparse][[/noparse]STR buff\3] DEBUG "Found PSC version: ", buff(0), buff(1), buff(2), CR JackUptheBaud: DEBUG "Setting Baudrate to 38k4",CR SEROUT PSC,Baud,[noparse][[/noparse]"!SCSBR",1,CR] SERIN PSC,6,300,Chk2k4,[noparse][[/noparse]STR buff\3] DEBUG "Baud reply: ", buff(0), buff(1),DEC1 buff(2), CR Baud = 6 + $8000 SBcont: GOTO Fix_Baud Chk38k4: Baud = 6 + $8000 DEBUG "Checking PSC with 38400 Baud",CR SEROUT PSC, Baud, [noparse][[/noparse]"!SCVER?",CR] SERIN PSC, Baud, 500,Chk38k4 , [noparse][[/noparse]STR buff\3] DEBUG "Found PSC version: ", buff(0), buff(1), buff(2), CR
I only get this:
Checking PSC with 2400 Baud Checking PSC with 38400 Baud Checking PSC with 38400 Baud Checking PSC with 38400 Baud Checking PSC with 38400 Baud ...
·and then it just repeat this forever
Anyone knows what the h... is wrong ?
Comments
Sure - if you are transmitting at 38.4 KBPS and want to go back to 2400 (as you would want to do in repeating the program - GOTO Fix_Baud), you will have to SET BACK the 2400 baud rate while you at transmitting at 38.4 KBPS. You can't just arbitrarily transmit at 2400 baud and expect the PSC to recognize it after you have told it otherwise, unless I'm misunderstanding the somewhat obsure and undocumented program flow.
Regards,
Bruce Bates
I atteched the whole code if it helps anyone understand the problem...
regards
Pengatom
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
This is an older BOE, it doesn't come with the switch. The BOE that has the switch now holds a Javelin stamp...
I've changed te BS2 also... nuthing
Changed PSC... nuthing
Post Edited (Pengatom) : 9/26/2005 5:42:44 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I think you might be on to something, couse I just blew the capasitor on the PSC
But I've tryed it on the BOE rev c, with the Vsvo jumper in the Vdd position, and I still can't get anywhere...
Everyting works like a charm with the Javelin connected to the PSC btw...
I too have been playing with a hexcrawler lately. One thing that I noticed is that if I leave the battery (7.2v 3000mAh R/C) to the PSC after a day or two of just sitting - even switched off - it is dead. Replace or recharge the battery and all works just fine.
... or you may have an issue with your BS2....
Just my perspective -
Doc
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Yesterday, when I took it with me to shcool, suddenly it doesn't work anymore.
I've tryed closing the debugger, restarting the program, restarting the computer. I have even tryed it on another computer. Nothing.
I've tryed to download the program on another BS2 with a different PSC on a BOE rev C also... nuthing
And meanwhile everyting is working with the Javelin connected to any of the to PSC's (from a BOE rev C that is)
Then I rearranged som cables, without turning the powersupply off, THEN the cap on the PSC blew.
So off course nothing will work with this one now, but it should have worked with the BS2 earlier...
P.S. I'm not using a 7,2v battery pack to power the servos while testing, I'm using a powersupply, couse I'm having the same problem with the battery pack uncharging with te PSC switch in OFF position...
My solution was to wire a MALE wire connector to the PSC terminals. I salvaged it from a R/C truck I disassembled but I bet you can find them at Radioshack. I just unclip the battery when I turn it off. Sure makes it a lot easier than disconnecting the wires from the terminal connecters on the PSC every time.
Unfortunately it doesn't sound like you have a dead battery problem. I think you have bigger fish to fry. (No pun intended)
Doc
Couse I need it when I charge te battery... Or maybe I misunderstood you...
That's how I did it.
Doc