Shop OBEX P1 Docs P2 Docs Learn Events
PSC Issue — Parallax Forums

PSC Issue

James AndersonJames Anderson Posts: 52
edited 2006-07-10 18:44 in Robotics
I bought a psc a few moths ago and never really used it for much. Now i ran a program to tell me the version # but i Dont get any thing. The Red light is on and ive checked all connections. any Ideas?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.startrek.com
www.starwars.com
www.google.com

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-04 22:10
    wanna-be -

    Care to provide the program, so we can take a look at it?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-05 00:44
    '{$STAMP BS2}
    '{$PBASIC 2.5}
    Sdat PIN 15
    Baud CON 396
    buff VAR Byte(3)

    FindPSC:
    DEBUG "finding PSC" , CR
    SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?",CR]
    DEBUG "PSC ver: ", buff(0) , buff(1) , buff(2),CR
    STOP

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-05 02:12
    Hello,

    ·· That may be your problem right there.· That program never receives the version information back from the PSC.· It just displays an empty array.· Please consult the documentation for the full code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-05 04:00
    Thanks for pointing that out, the "problem" is fixed. I feel like an idiot but... Oh well.
    blush.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek
  • kingspudkingspud Posts: 128
    edited 2006-07-10 05:57
    FIXED???????????????· How????????

    Can you please add the correct code so we can all see what you did to change it.

    Thanks

    Joe
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-10 06:40
    Joe -

    In the listed code:

    DEBUG "finding PSC" , CR
    SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?",CR]
    'Add SERIN here (see below)
    DEBUG "PSC ver: ", buff(0) , buff(1) , buff(2),CR

    no SERIN was being done to fetch the version number to fill "buff", so the DEBUG dsiplay was listing an empty array.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-10 15:58
    Here is my revised code:
    FindPSC:
    DEBUG "finding PSC" , CR
    SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?",CR]
    SERIN Sdat, Baud, 500, FindPSC , [noparse][[/noparse]STR buff\3]
    DEBUG "PSC version: ", buff(0) , buff(1) , buff(2),CR
    STOP

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek
  • kingspudkingspud Posts: 128
    edited 2006-07-10 16:05
    I added the line but I still only get line after line of finding PSC!

    I am using the BS2px24 chip and I can't seem to find the correct baud setting.

    Anyone know what to use for this chip??

    Thanks

    Joe
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-07-10 18:44
    2400 baud: 1646
    (see code posted in Basic Stamps forum thread)

    All baud parameters are also listed in the help file of the editor, in table format.

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
Sign In or Register to comment.