Strange issue with UART/USB connection on Professional Development Board
JimFouch2
Posts: 26
in Propeller 1
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.
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.
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
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
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 ?