Shop OBEX P1 Docs P2 Docs Learn Events
Open baud mode with Propeller and Stamps? — Parallax Forums

Open baud mode with Propeller and Stamps?

gilabitegilabite Posts: 20
edited 2012-05-07 17:59 in Propeller 1
Hello Ive been browsing the forums trying to figure out how to use open baud mode to make a serial network between a Propeller as a master and several Stamps as slaves. Ive found some posts that seem to say that it works and then others that say that using the required protection resistor for the Propeller and the pull up resistor for the network ends up turning it into a voltage divider, which is what I seem to be experiencing. I can get it working for the Stamps, but the voltage divider kills the signal to the Propeller. The grounds are shared so its not that. Hoping I can do this without spending money because Im broke right now :(

Comments

  • kwinnkwinn Posts: 8,697
    edited 2012-05-06 22:03
    It should work. I have not connected a propeller to a stamp but I have connected it to other 5V uC's and serial I/O chips. All I used was a 3.3K resistor on the prop serial input pin and a 100 - 220 ohm resistor on the serial output pin.

    If you are trying to use a single serial line to connect a prop and several uC's you will need to add a little circuitry so the prop 3.3V output can drive that 5V line. That could be as simple as an npn transistor and pullup resistor. It really depends on how you want to connect things.
  • gilabitegilabite Posts: 20
    edited 2012-05-06 22:16
    I was trying to do this but with the Propeller thrown in.

    Capture.PNG


    I have a 3.3K resistor on the Propellers pin and thats what seems to turn the circuit into a voltage divider. If I used the transistor method would that work with a one wire setup like this or would it just work one way?
    802 x 629 - 75K
  • AribaAriba Posts: 2,690
    edited 2012-05-06 22:52
    You need a pullup much higher than 1k Ohm. This should work:
    SerBus1.gif


    Andy
    855 x 303 - 9K
  • gilabitegilabite Posts: 20
    edited 2012-05-07 15:17
    Thanks Andy that seemed to get it working. Only problem I have now seems like it maybe from the BS2_Functions object on the Propeller. I have a simple test program on the Propeller setup to count and send the count to the Stamp for the Stamp to display in a debug window. For some reason the Stamp only shows the first number place up until the count gets around 200 then it shows the last two digits for a time then it switches back to single place again.
  • AribaAriba Posts: 2,690
    edited 2012-05-07 17:59
    Can it be that you only send and receive one byte for every count? One byte has a value range of 0..255.
    If you need higher numbers you need to implement some sort of a protocoll on the serial bus. Something like a start byte then 4 bytes for the value and perhaps an ending byte. If you want it more reliable also a checksum can be implemented for every "frame".

    Andy
Sign In or Register to comment.