Communicating USB to Serial with FT232

We are trying to communicate with a USB device using the FT232RL chip, for which we bought a breakout board from Sparkfun SparkFun FTDI Basic Breakout - 3.3V - DEV-09873 - SparkFun Electronics.

We have hooked the breakout board to our B402 thru the bsom eval board and have connected to Serial1 wires. We have also hooked up the DTR output to GPIO1. Our ft232 board is connected to our computer usb port for the time being.

So far we have been successful in transmitting bytes from our computer to the SoM and vice versa, so we are atleast wired up correctly. Our application requires that before we communicate, we pull DTR low, which must be done by our SoM. I am not sure how to achieve this as the DTR breakout seems to be an output communicated from the usb side, not from the SoM side. We have successfully set DTR from our computer, but not from the SoM.

Has anyone used this chip before, or could recommend a chip that can do the job?

1 Like

I’m not completely sure I understand your use case, but I’m a little worried the FT232 and the device you want to control are the same “side”. Normally the FT232 connects to your computer USB. If your other device also is normally connected to a computer, you can’t connect it to the FT232.

Similarly, if you put a USB hub between two FT232 devices, they will physically turn on, but won’t ever communicate with each other, because they’re intended to be communicated from the computer, not from each other. That’s also why you can connect multiple FT232 devices to a single computer and they don’t conflict with each other.

2 Likes

In the original purpose of DTR this is a signal that would be set by the Data Terminal (DTE - the host of the connection - i.e. the computer).
FTDI-USB-boards usually (logically) see the computer as the DTE (host/owner of the connection) and the attached device as the Data Communication Equipment which should react to the readyness of a Data Terminal to engage in a communication.

Currently, to communicate with this USB device, we would use a computer, we would like to replace the computer with a SoM. We have access to the communication protocol that a computer would use to communicate with the device and believe that it is possible to implement on a SoM because it is very similar to what we have done before. The trick is we need to have our SoM pull this DTR pin low to initiate this communication.

If I can’t pull this pin low, perhaps there is a way to replicate this via some bytes transferred that would trick the device into thinking that DTR was pulled low. Would this be a feasible strategy?

Is there a different chip that we could use to achieve this behavior?

Can you clarify which USB device you are talking about?

Unlike UART RX/TX-communication USB is not symmetric.
While in RX/TX communication each device on either end of the “bus” can be client or server for USB you need an “USB host” (more capable device) to facilitate the communication (with “dumber” devices).
The B402 falls in the latter category and cannot take on the role of a USB host.
Nor would I expect your (unknown) “USB device” to be able to act as USB host either.

You’d need a device that can act as a USB host an run some sort of FT232R driver.

2 Likes