Shop OBEX P1 Docs P2 Docs Learn Events
Baud question with serial obj — Parallax Forums

Baud question with serial obj

bigirvbigirv Posts: 37
edited 2011-12-17 06:42 in Propeller 1
Do I have to use the same table the bs2 uses for the common baud rates when I use the serial driver objs on the prop. ex the baud rate argument for the serin command would be 16572 for a baud rate of 4800, or would i just put 4800 when the obj asks for the baud rater. That was the mistake I was making when I was trying to get my prop send a message to my bs2 chip.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-12-16 13:59
    All the Propeller serial drivers I've used just need the baud rate.

    Welcome to Propdom (the Kingdom of Propellers). Let us know if your having trouble.
  • bigirvbigirv Posts: 37
    edited 2011-12-16 14:20
    ok heres another question either the quick start board to jumper to bread board on the bs2 h/w board isnt geting a good connection or the voltage just isnt driving the signal strong enough to be received just using a straight jumper wire nuthing else also I tryed it with 2 quick start boards and nuthing happened. Going to work on it some more tonight but got to DD for my units Christmas Party.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-12-16 15:31
    You can not just connect a Stamp I/O pin to a Propeller I/O pin. You may damage the Propeller I/O pin if you do. The Stamp operates with a 5V power supply and all the I/O pins provide a 5V signal for a high logic level. The Propeller operates with a 3.3V power supply and its I/O pins operate at 3.3V and expect 3.3V signals for inputs. There are protective diodes on the I/O pins to prevent voltages higher than 3.3V from getting into the Propeller and destroying it. These diodes can burn out (thus allowing damage to the internals of the Propeller) if too much current flows through them (500uA or more). What you need to do is connect a 3.3K resistor rather than a jumper between the Propeller I/O pin and any 5V logic device (like the Stamp). The resistor will limit the current from the Stamp to what the diode can handle indefinitely.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-12-16 15:33
    You'll want to use a series resistor on the line from the BS2 to the Prop. The BS2's 5V could (and like will) damage the Prop. I usually use a 10K resistor. I think the lowest common resistor value that is still safe is 3.3K.

    I've found my Prop to Prop serial lines work better with a pull-up resistor. I'm not sure about the pull-up idea with Prop to Stamp communication. I think you end up with a voltage divider with a pull-up and a series resistor.

    You could also post your code for us to look over.

    Edit: Mike bet me to it.
  • bigirvbigirv Posts: 37
    edited 2011-12-16 21:59
    isnt the pull up circuit in the bs2 doc?
  • Clock LoopClock Loop Posts: 2,069
    edited 2011-12-17 00:13
    Mike Green wrote: »
    You can not just connect a Stamp I/O pin to a Propeller I/O pin. You may damage the Propeller I/O pin if you do. The Stamp operates with a 5V power supply and all the I/O pins provide a 5V signal for a high logic level. The Propeller operates with a 3.3V power supply and its I/O pins operate at 3.3V and expect 3.3V signals for inputs. There are protective diodes on the I/O pins to prevent voltages higher than 3.3V from getting into the Propeller and destroying it. These diodes can burn out (thus allowing damage to the internals of the Propeller) if too much current flows through them (500uA or more). What you need to do is connect a 3.3K resistor rather than a jumper between the Propeller I/O pin and any 5V logic device (like the Stamp). The resistor will limit the current from the Stamp to what the diode can handle indefinitely.

    Don't forget along with the 3.3k resistor as the jumper, you will need a wire jumper to connect the grounds of the stamp and the propeller.

    Use a wire jumper to connect the GROUNDS of both boards to each other.
    This is a very common mistake, that will cause the problem you show.
    (but this might have saved yer bs2 5v from frying yer propeller 3.3v, initially, if you did forget the ground jumper)
  • bigirvbigirv Posts: 37
    edited 2011-12-17 06:42
    I think the prop is fine, but I am going to do a test on all IO's on bother quick start boards just to be sure. Thanks for all of the help.
Sign In or Register to comment.