Shop OBEX P1 Docs P2 Docs Learn Events
Propeller to USB via FT232 BM — Parallax Forums

Propeller to USB via FT232 BM

mcstarmcstar Posts: 144
edited 2007-08-17 13:28 in Propeller 1
I'm figure out how·to interface a propeller to a device that is connection to a USB to Serial chip (FT232BM).· The device is a motor controller whose protocol I have access to. I have written software in C# to communicate with the device and that works great.· Now I'd like to replace the computer running C# with a propeller. My question is, can you just connect the USB on the proto board to that on one of these chips and send serial data from the Prop?· I don't really understand the USB protocol and I've read somone on this forum that a Protoboard cannot serve as a USB master.· Is this a problem or will the communication just work?

My hope is that I can just connect the Protoboard to the motor controller, power them both up·and start sending commands via the Full-Duplex Serial Driver.· Does anyone know if this will work? Has anyone else tried to do something like this?
Some information about the motor controller (mentions the FT232 chip) is here
http://home.comcast.net/~dprutchi/er1_rcm.pdf·for those interested.

Any inputs appreciated.

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-08-16 19:55
    No you cannot. It is not a matter of electricity but of intelligence smile.gif An USB master has got much more of that than a slave... however there are nice an comprehensive descriptions of the protocols involved, if you are interested. They generally start with: "Let the intelligent master chip do the dirty work" smile.gif If it would be easy some of our gurus wold have presented some software long ago...
  • mcstarmcstar Posts: 144
    edited 2007-08-16 20:05
    What a shame that there is not some really basic "Just send and recieve data" mode for 2 USB slave devices directly connected. What's interesting about this, is that the output from the FT232 and input into the motor controller is nothing more than a standard serial COMM. It may be easier to just solder wires directly to the 8 serial communication lines and wire up a MAX232 to send the data directly.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-16 20:58
    You can use the FTDI Vinculum chip (as used in the Parallax Datalogger) to act as a USB host for a USB to serial adapter. It's not as simple as just sending the data. The Propeller talks to the datalogger using FullDuplexSerial, watches for a USB to serial adapter (has to be an FTDI one) to be connected, then configures the USB to serial adapter, then can send and receive data. Look at the datalogger documentation for a description.

    It's clearly much much simpler just to connect the Propeller I/O pins to the logic level I/O on the "other side" of the FT232. It's probably powered by 5V and you'll need some protective series resistors. You'll also need to disconnect the FT232 since it will interfere with the Propeller I/O. Note: The FT232 has logic level I/O to the motor controller. Unless there's a MAX232 somewhere in there, you don't need to add one. In fact, you'll damage the Propeller or the motor controller if you do since the MAX232 produces voltages that can damage 3.3V devices like the Propeller.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-16 21:05
    Pages 7 & 8 of the VDAP Firmware Manual from Vinculum (FTDI) discusses talking to a USB to serial adapter using the firmware in the Parallax Memory Stick Datalogger. Have a look at the Parallax webstore page for this.
  • mcstarmcstar Posts: 144
    edited 2007-08-17 13:28
    Thank you so much Mike, that's a great idea! I suppose you don't know till you know, but I had no idea that the data logger was a usb host. In fact, until I started researching this problem a few days ago, I didn't realize there was a difference between the USB host and the slave devices. I really appreciate you being so knowledgeable in this. I've got a 2nd propeller on the way right now that I plan to dedicate to this project. Now, I plan on ordering one of the data loggers too. That seems like such an awesome chip for only $35.

    Thanks again
Sign In or Register to comment.