Shop OBEX P1 Docs P2 Docs Learn Events
Communication between BS2 & PSC suddenly doesn't work anymore... — Parallax Forums

Communication between BS2 & PSC suddenly doesn't work anymore...

PengatomPengatom Posts: 21
edited 2005-09-28 00:15 in BASIC Stamp
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, cool.gif·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

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-09-26 12:27
    Pengaton -

    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
  • PengatomPengatom Posts: 21
    edited 2005-09-26 13:08
    I'm just using the code downloaded from crustcrawler. I haven't changed anything on it. and it worked fine yesterday. but when I tried it today, it just stops.

    I atteched the whole code if it helps anyone understand the problem...

    regards

    Pengatom
  • mmmm Posts: 56
    edited 2005-09-26 14:22
    Try closing your debug window and see if it starts working reliably again. I am having a similar problem which just started with 3 different stamps and closing debug has solved my problem. I'm still investigating this further and so far I haven't found anything that has changed on my PC.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-26 14:50
    Is your BOE switch in position 2?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PengatomPengatom Posts: 21
    edited 2005-09-26 17:30
    I've tryed closing the debugger, restarting the program, restarting the computer. I have even tryed it on another computer. Nothing.
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-26 18:25
    Where is the PSC plugged into?· If it's plugged into one of the servo headers on the BOE then that's most likely your problem.· This was just covered in another thread where this was happening.· If it's in the servo headers it will be getting over voltage.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • mmmm Posts: 56
    edited 2005-09-26 18:37
    Your problema is different from mine then. I found the solution to my problem, someone had changed my debug preferences and once put back to it's original configuration it no longer fails to program.
  • PengatomPengatom Posts: 21
    edited 2005-09-26 19:26
    With servo headers you mean x4/x5 right? and in the BOE rev b that I'm using, the PSC is getting Vin instead of Vdd?
    I think you might be on to something, couse I just blew the capasitor on the PSC tongue.gif

    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...
  • doggiedocdoggiedoc Posts: 2,239
    edited 2005-09-26 20:49
    Pengatom-

    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-26 22:30
    Also if you've already connected it to Vin and burned it out, of course it's not going to work on the Rev C. with Vdd anymore.· =)· Your blown cap should've been the first clue.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PengatomPengatom Posts: 21
    edited 2005-09-27 08:48
    I've had this HexCrawler for over a year. Everything has worked fine, powering the PSC with Vin from a 9v battery.
    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...
  • doggiedocdoggiedoc Posts: 2,239
    edited 2005-09-27 11:01
    Pengatom said...

    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. sad.gif I think you have bigger fish to fry. (No pun intended)


    Doc
  • PengatomPengatom Posts: 21
    edited 2005-09-27 22:06
    well, I made one like that I think?
    Couse I need it when I charge te battery... Or maybe I misunderstood you...
  • doggiedocdoggiedoc Posts: 2,239
    edited 2005-09-28 00:15
    Well.... momma always said, "A picture is worth a thousand words."

    rcbattery.jpg


    That's how I did it.

    Doc
Sign In or Register to comment.