Shop OBEX P1 Docs P2 Docs Learn Events
BS2e to BS2 comunication — Parallax Forums

BS2e to BS2 comunication

kevinb2050kevinb2050 Posts: 56
edited 2008-08-19 01:25 in BASIC Stamp
Hi trying to learn how to comunicate between 2 basic stamps - have used sample circuit in basic stamp editor (serin - serout "hello world") but am getting no where - have a BS2e as master and a BS2 as slave any ideas would be appreciated

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-08-18 01:01
    Look at SERIN and SEROUT in PBASIC, there's a hook-up diagram, examples, etc.
  • kevinb2050kevinb2050 Posts: 56
    edited 2008-08-18 01:19
    if you mean the PBASIC editor this is where i got the hook-up circuit from - I have noticed that the editor has a 1k resistor between P1 and P1 of the stamps yet the Basic stamp reference manual does not have any resistor between thes pins - further the sample code shows on the master serial out is P1, flow control is P0 and on the slave serial in is P0 and flow control P1 - i thought that data transfer would be on the same pin/wire and flow control on the other wire
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-08-18 02:06
    If they were going to communicate ("converse") with each other, it'd be easier for me to remember that P0 is an output and P1 is an input (or vice versa, whichever) for consistency.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-08-18 02:21
    Hi Kevin, the example code taken from the IDE help file has an error, as you pointed out the SO and SI should be connected to each other. Make the following correction in SERIN_SEROUT2.BS2·so that it will·match the wiring in the diagram.

    SI············· PIN·····1·············· ' serial input
    FC············· PIN·····0

    Jeff T.
  • kevinb2050kevinb2050 Posts: 56
    edited 2008-08-18 02:33
    thanks guys for the help - it is so nice to know that i am not as dumb as others think i am lol
    NOTE to paralax PLEASE FIX the error
  • kevinb2050kevinb2050 Posts: 56
    edited 2008-08-18 02:37
    Me again - still not sure why they would have a 1k resistor on the serial wire between the 2 stamps as shown on the help file - think i will leave this out
  • FranklinFranklin Posts: 4,747
    edited 2008-08-18 02:45
    Yeah, go ahead. If you blow up your stamps Parallax will sell you new ones. It's there for protection.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-08-18 02:45
    Hi, the resistor will protect your stamp...keep it in there.

    Jeff T.
  • kevinb2050kevinb2050 Posts: 56
    edited 2008-08-19 01:25
    There is another error in the sample code from the editors help file
    Help file SERIN is ok but help file SEROUT has the following error

    SERIN SI/FC, Baud, [noparse][[/noparse]letter] - the "/" should be the other way "\"

    as well as the pins are wrong in the slave code should be as bellow
    SI PIN 1 ' serial input
    FC PIN 0

    Thanks for all the help guys - my 2 stamps are having a great time talking to each other
    Now to work on BS2's talking to a SpeakJet Chip lol
Sign In or Register to comment.