Shop OBEX P1 Docs P2 Docs Learn Events
FullDuplexSerial behavior on floating pin - rxcheck is > -1 — Parallax Forums

FullDuplexSerial behavior on floating pin - rxcheck is > -1

Landon CoxLandon Cox Posts: 2
edited 2008-04-10 18:26 in Propeller 1
I'm working with the FullDuplexSerial object and the propeller proto board. I've started the serial object on 5 sets of pins, two sets are in use: one set has an actual device attached (a GPS) and one set has a level converter connected to a serial port on my laptop. The other 3 sets have nothing attached to them. For testing, I'm bridging all ports to the port connected to my laptop...when bridging just the GPS connected port, it works fine. The other ports pass the rxcheck (return >-1) even though nothing's connected to them.

When I use the serial object rxcheck, I'm getting values > -1 for all the rx pins that are are not connected to anything indicating that data was received. For the one that's connected to a GPS, I get the correct rxcheck statuses back, including a -1 when the GPS is not transmitting.

Question is: what's the right way to handle floating pins and FullDuplexSerial? I will use all 5 sets with FullDuplexSerial, but at any one time, one or more sets may not be connected. Can I just tie up the rx pins to 3.3V permanently...then when a device is connected, it will have to pull it down like normal serial streams start bit when it transmits? I'm not sure what the right way to handle this electrically is, so I don't have to do anything special except connect a device and when not connected, it won't look like data coming in on those pins.

Thanks for any help.

Comments

  • HarleyHarley Posts: 997
    edited 2008-04-10 17:45
    Not knowing the drive capability of devices connected to the prop receive pins, I'd guess from what you've mentioned that something as simple as a pull-up resistor to 3.3v would suffice. Resistor could be 10K or higher, my first guess. Just something to maintain it at an 'idle' level.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • Landon CoxLandon Cox Posts: 2
    edited 2008-04-10 18:20
    thanks for the response. I was thinking something similar but wasn't sure whether there might have been a "propeller" way to pull it up when the pin is set for input or something to that effect.

    Thanks again,

    Landon
  • AribaAriba Posts: 2,687
    edited 2008-04-10 18:26
    The problem is that a floating pin is read mostly as a LOW, but the idle state of the RX pin should be HIGH.
    Just connect a pullup resistor of around 10 kOhm on every RX pin to 3.3V, and your problem is solved.

    Andy
Sign In or Register to comment.