MATLAB Answers

FTDI FT232RL USB-Serial port converter giving junk data continuously

21 views (last 30 days)
Sreedu
Sreedu on 1 Mar 2011
Hi,
I know this is not related to MATLAB. But I hope it will be posted here. I have a UI which accepts data through serial port. Since I do not have a serial port I use FT232RL chip to create a virtual COM port. I did not program the chip, but am using the default settings. When I connect the UI to the virtual COM port I continuously get junk data (like A5 B5 B5 A5 B5......etc). This comes a s soon as I connect to the port. Beacuse of this I cannot give commands through the port and get the data I require. Is this a problem with the chip or because I did not program it? The FT232RL is USB powered and acts ad USB to RS232 converter.

Answers (1)

Walter Roberson
Walter Roberson on 1 Mar 2011
Is this data coming through as soon as you connect the USB connector, before you turn on the device? If so then you probably have some kind of short in your USB connections or possibly in how you wired the FT232RL (did you use a socket or solder it directly?)
You have not said anything about what the UART portion of the chip is connected to. If that device is producing bogus signals perhaps because of a free-floating line with no pull-up, then that signal would get transmitted.
As we don't know anything about what is connected to the UART, we don't know whether the data is being transmitted with parity. Serial ports usually assume 8 bits no parity these days, but the transmitting device might have different ideas.
If the stream of data consisted of just A5 A5 A5 then that is a common pattern which consists of alterating binary 0's and 1's. For such patterns the baud rate setting is usually correct: if the baud rate setting was wrong then you get different relatively recognizable patterns that can often give you a hint about what the correct speed is; those patterns are, however, difficult to describe but obvious at a glance with sufficient relevant experience. (It has been too many years for me since I last needed to recognize these.)
  4 Comments
Bob
Bob on 15 Jul 2011
My experience with the FTDI chips are that they are very robust. My guess is you are looking at "reverse polarity" where the input to the chip is "low marking", but the chip expects to see a high voltage as logic "1". If you have a scope, check this, otherwise just throw an inverter on the signal and then feed it to the FTDI. Buad rate and polarity are the typical issues. Hope that helps ...

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by