Shop OBEX P1 Docs P2 Docs Learn Events
BS2px on BOEusb and PSC connection problem — Parallax Forums

BS2px on BOEusb and PSC connection problem

RickyCRickyC Posts: 26
edited 2006-10-27 07:04 in Robotics
Allan,
I started a new thread regard the connection between BOEusb with PSC. I got reply from Chris that baud rate have to change as difference between BS2 and BS2px. I'll try and if you have any good suggestion, please do teach me. I found the PSC green LED only flashing without reply on debug window.
My project actually·is to connect·a·PSC to a computer via Bluetooth. So, I have BOEusb w/BS2px, a PSC, a eb500-ser and a bluetooth adapter which support Bluetooth Serial Port.
Thks
Ricky·

Comments

  • ZootZoot Posts: 2,227
    edited 2006-09-23 15:20
    I think what Chris was referring to is that the UNITS for different baud rates are different from Stamp to Stamp. It's generally easiest to use conditional compilation for things like Baud rates, freqout, pulsin, pulsout, etc.

    Here's the standard code for baud rates. When you want to use a given baud, use the constant, rather than an actual number:

    ' Baud rates
    #SELECT $STAMP
      #CASE BS2, BS2E, BS2PE
        T1200       CON     813
        T2400       CON     396
        T4800       CON     188
        T9600       CON     84
        T19K2       CON     32
        TMidi       CON     12
        T38K4       CON     6
      #CASE BS2SX, BS2P
        T1200       CON     2063
        T2400       CON     1021
        T4800       CON     500
        T9600       CON     240
        T19K2       CON     110
        TMidi       CON     60
        T38K4       CON     45
      #CASE BS2PX
        T1200       CON     3313
        T2400       CON     1646
        T4800       CON     813
        T9600       CON     396
        T19K2       CON     188
        TMidi       CON     108
        T38K4       CON     84
    #ENDSELECT
    
    SevenBit        CON     $2000
    Inverted        CON     $4000
    Open            CON     $8000
    
    



    So in your code, if you want to use the PSC's higher baud rade, use "T38K4" in your SEROUT commands. The actual value of "T38K4" will depend on the actual stamp downloaded to, but you won't have to change your code for different stamps. See the Pbasic manual for more info about conditional compilation and see the SEROUT command reference for the table that shows the different "units" used by each stamp for baud rates and the like. Does this help?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • RickyCRickyC Posts: 26
    edited 2006-09-25 04:25
    Thks a lot, Zoot and I will try.
    Ricky
  • RickyCRickyC Posts: 26
    edited 2006-09-29 05:10
    I can control servoes now by change Baud to 1464 that the defaut rate of PSC. However, I still can not control PSC via PSCI v0.9h. PSCI can not pick up Verson no. of PSC. Can anybody tell me how?
    thks,
    ricky
  • ZootZoot Posts: 2,227
    edited 2006-09-29 05:14
    Do you mean you used 1646, which would be 2400 Baud (default for the PSC) on your BS2px?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-29 20:17
    Okay,
    ·
    ·· Assuming this is a USB PSC, then you have to have the USB Driver installed before you can talk to it from the PSCI software.· The driver will assign a COM Port number to the device, and this is the one you need to use in the PSCI software when opening the port for it.· If you’re on a laptop you may or may not need to reduce the latency timer setting in the Advanced Port Settings in the Device Manager.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • RickyCRickyC Posts: 26
    edited 2006-09-30 07:42
    Yes, that right.
    rickyyeah.gif
    Zoot said...
    Do you mean you used 1646, which would be 2400 Baud (default for the PSC) on your BS2px?

  • RickyCRickyC Posts: 26
    edited 2006-09-30 07:59
    No, PSC is serial (#28023) and BOE is USB·in this thread as attached photo. I use the com port of BOE connected but PSCI can not pick up version no. 1.4 as I can see on Stamp Editor. On the other hand, I have·a PSCusb if direct connect to my computor then PSCI works very good.· I wonder why?
    Thks
    Ricky
    Chris Savage (Parallax) said...
    Okay,
    ·
    ·· Assuming this is a USB PSC, then you have to have the USB Driver installed before you can talk to it from the PSCI software.· The driver will assign a COM Port number to the device, and this is the one you need to use in the PSCI software when opening the port for it.· If you’re on a laptop you may or may not need to reduce the latency timer setting in the Advanced Port Settings in the Device Manager.

    640 x 480 - 145K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-30 16:16
    The PSCI software will only talk to the PSC directly, not through the BOE.· Since you have a serial PSC you don’t have a convenient way to connect serially to the PC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • RickyCRickyC Posts: 26
    edited 2006-10-04 13:02
    Thks, Chris and wonder if you have any constructive advices ?

    Ricky
    Chris Savage (Parallax) said...
    The PSCI software will only talk to the PSC directly, not through the BOE.· Since you have a serial PSC you don’t have a convenient way to connect serially to the PC.

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-04 14:25
    RickyC,
    ·
    ·· My best advice is that if you really intend PC control then you should get the USB version of the PSC which will connect directly to PC and allow you to directly use the PSCI software.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • RickyCRickyC Posts: 26
    edited 2006-10-05 05:33
    Chris, back to the old story. I want to save the PSCI file to BOE and run by itself without cable between. I can control PSC very well if it is direct connected to PCSI.idea.gif Thks, Ricky
    Chris Savage (Parallax) said...
    RickyC,
    ·
    ·· My best advice is that if you really intend PC control then you should get the USB version of the PSC which will connect directly to PC and allow you to directly use the PSCI software.

  • RickyCRickyC Posts: 26
    edited 2006-10-12 17:15
    Chris, any new suggestions ? sad.gif
    shakehead.gif·RickyC said...

    Chris, back to the old story. I want to save the PSCI file to BOE and run by itself without cable between. I can control PSC very well if it is direct connected to PCSI.idea.gif Thks, Ricky
    Chris Savage (Parallax) said...
    RickyC,
    ·
    ·· My best advice is that if you really intend PC control then you should get the USB version of the PSC which will connect directly to PC and allow you to directly use the PSCI software.

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-12 20:12
    Ricky,
    ·
    ·· There is no file to save…You will need to copy the values from the PSCI Software into DATA statements in your code and play them back that way.· I have no other new suggestions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-10-13 07:53
    Gents -

    One could stuff the commands in an external EEPROM for more portability, if that's helpful.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-24 21:59
    If you were still interested in controlling the PSC from a C Program there is a post in our Completed Projects Forum that may help you.· Take care.

    http://forums.parallax.com/showthread.php?p=611904

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • RickyCRickyC Posts: 26
    edited 2006-10-27 07:04
    Thks Chris,
    I have changed my board to SSC-32 with a Wiport Wi-Fi and·they work fine. I can now control my robot without a wire in between that you can not support in this area. Once I finish my project, I'll study your suggestion.
    rgds,
    Rickyyeah.gif
    Chris Savage (Parallax) said...

    If you were still interested in controlling the PSC from a C Program there is a post in our Completed Projects Forum that may help you.· Take care.

    http://forums.parallax.com/showthread.php?p=611904

Sign In or Register to comment.