Strange issue with UART/USB connection on Professional Development Board

I'm developing a product that uses a Prop 1 and it needs to have a UART/USB connection to a PC at times, but will mostly be running independently w/o a connection.

I'm just using the Propeller Serial Terminal object and calling the RXCount method to see if any characters are present on the port.

When I have my project connected to the PPDB with a USB cable connected it works as expected. However, when I remove the cable my code seems to think there are random characters there.
   Repeat While PC_PST.RXCount>0
      Receive_Char(PC_PST.CHARIN,PC_PORT)
      !Outa[DEBUG_LED]

When I run disconnected, my Debug_Led goes crazy. SO, it's like the RX Pin is floating and confusing the RXCount method. I have been able to resolve this by pulling Pin 31 low with a 10K resistor and it seems to be happy.

In production, I will be using the Propeller FLiP module and have not set that up yet, but wondering if I should design a pullup there also.

Comments

  • msrobotsmsrobots Posts: 2,655
    edited 2019-07-06 - 05:12:46
    Yes a small pullup/down on 31 does help.

    If something is connected it should be high, so pulling down with 10k should also give you the information IF there is a connection.

    The main problem might be output on pin 30, I do not have a flip so I can't test it, but a known issue with the USB circuit used for a lot of parallax boards is that having no PC connected and sending data out, powers up the FTDI usb chip over its rx line powered by the P1 tx and - hmm - resetting the P1.

    The only solution I knw of is to cut the connection from usb to reset and put a jumper there, jumper on for programming, jumper off for running mode.

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • jmgjmg Posts: 13,609
    JimFouch2 wrote: »
    .... SO, it's like the RX Pin is floating and confusing the RXCount method. I have been able to resolve this by pulling Pin 31 low with a 10K resistor and it seems to be happy.

    In production, I will be using the Propeller FLiP module and have not set that up yet, but wondering if I should design a pullup there also.

    The FLiP SCH shows P31 wires to FT231X.TX pin, which will idle high when USB is connected.
    Less clear is what that pin does when USB power is removed - looks to remove power from FT231X ?
Sign In or Register to comment.