Shop OBEX P1 Docs P2 Docs Learn Events
Communication propeller <-> BS2 — Parallax Forums

Communication propeller <-> BS2

HoffaHoffa Posts: 46
edited 2008-01-13 13:42 in Propeller 1
Hi

I want my Propeller to communicate with my BS2. Someone who have an "helloworld"-example in both directions?

/hoffa

Comments

  • HoffaHoffa Posts: 46
    edited 2008-01-12 12:22
    Someone who know how to connect them to make it work?
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-12 12:34
    Sorry I have no BS2 knowledge at all.

    If you need a full-duplex line you should connect the transmit pin of the BS2 (I think there must be something like that) using a 10k resistor with any Propeller Pin (maybe with the exception of 28,29,30.31) and the receive pin of the BS2 with any other Pin of the Propeller. If you are a paranoic like me - or you tend to mix up lines - you may use a 1k resistor here, too.

    Then you decide for a bit rate (say 2400, to not overextend the BS2

    OBJ ser : "SimpleSerial"
    PUB main
      ser.start(1, 2, 2400)
      REPEAT
        ser.tx(ser.rx)
    


    It will not work perfectly... Thats for you to find out why...
  • HoffaHoffa Posts: 46
    edited 2008-01-13 12:09
    Do I have to connect the grounds on BS2 and propeller?
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-13 13:04
    Hmpf... yes smile.gif Thank you!

    BTW: First parameter of ser.start is RCV (the 10k resistor line, to protect against the 5V from the BS2)
    Second parameter is XMIT (outputting 3V only, but it will work for the BS2 Stamp)

    Note that in many cases the lines will get "inverted" by external logic (MAX 232, transistors,...)
    As we neither do this with the Propeller nor with the Stamp we can just use the standard settings.
    (MINUS*MINUS = PLUS)

    Post Edited (deSilva) : 1/13/2008 1:15:17 PM GMT
  • LeonLeon Posts: 7,620
    edited 2008-01-13 13:42
    Hoffa said...
    Do I have to connect the grounds on BS2 and propeller?
    Yes!

    Leon


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
Sign In or Register to comment.