Shop OBEX P1 Docs P2 Docs Learn Events
Connecting BS2 to BS1 — Parallax Forums

Connecting BS2 to BS1

ArchiverArchiver Posts: 46,084
edited 2003-10-23 13:26 in General Discussion
I have a BS2 that I am trying to connect to a BS1. On the BS2 I have
the following test code in a loop


serin 8, 396, [noparse][[/noparse]MyByte]
Debug DEC MyByte, CR


on the BS1 I have the following in a loop

serout 3, T2400 (B0)
Pause 100
let B0 = B0 + 1

The trouble is that on the BS2 I receive data but it's all garbled. I
tried to reduce the baud rate to 1200 but no luck.

I have connected the two devices by putting a 10K resistor between
BS2 Pin8 and BS1 Pin 3.

Is this the right approach?

P.S.

I'd rather not use the open drain method mentioned in the Parallax
manual. I eventually want to substitute a PIC for the BS1 and it
doesn't support open drain in it's serin/serout parameters.

The code above is from memory too, so please ignore any obvious
typos. :-)

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-10-23 13:26
    It seems like your project should work ... I know that you CAN connect
    the two; I have a BS1 "slave" running a simple process for a BS2
    "master" on my desk right now (for the December Nuts & Volts). Now, I
    am using and open drain connection in the project, but I removed my
    pull-up and switched to a driven mode with no problems.

    Here's how I define baud rate parameters on the BS2 side:

    #SELECT $STAMP ' baud rate parameters
    #CASE BS2, BS2E, BS2PE
    T1200 CON 813
    T2400 CON 396
    #CASE BS2SX, BS2P
    T1200 CON 2063
    T2400 CON 1021
    #ENDSELECT

    Inverted CON $4000
    Open CON $8000

    Baud CON T2400


    ...and on the BS1 I am using a baud rate parameter of T2400.

    Note that my project has data going both directions (the BS2 can send
    commands to and request data from the BS1) so (like you) I changed the
    link to a 1K to make sure that a programming error on my part doesn't
    lead to a busted pin.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office



    Original Message
    From: myfakeuser [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=W-5MOwODlgVhsYGd-2rrZcqgtqZLUbQ2WmKU334kb-zEKZ1Vy7vqvoy4VcI4YL2h9cwJ0Tr50Evipu6Ojq0]MyFakeUSer@H...[/url
    Sent: Thursday, October 23, 2003 6:12 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Connecting BS2 to BS1


    I have a BS2 that I am trying to connect to a BS1. On the BS2 I have
    the following test code in a loop


    serin 8, 396, [noparse][[/noparse]MyByte]
    Debug DEC MyByte, CR


    on the BS1 I have the following in a loop

    serout 3, T2400 (B0)
    Pause 100
    let B0 = B0 + 1

    The trouble is that on the BS2 I receive data but it's all garbled. I
    tried to reduce the baud rate to 1200 but no luck.

    I have connected the two devices by putting a 10K resistor between
    BS2 Pin8 and BS1 Pin 3.

    Is this the right approach?

    P.S.

    I'd rather not use the open drain method mentioned in the Parallax
    manual. I eventually want to substitute a PIC for the BS1 and it
    doesn't support open drain in it's serin/serout parameters.

    The code above is from memory too, so please ignore any obvious
    typos. :-)







    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
Sign In or Register to comment.