Shop OBEX P1 Docs P2 Docs Learn Events
simultaneous PC communication with multiple propellers — Parallax Forums

simultaneous PC communication with multiple propellers

DIYedInTheWoolDIYedInTheWool Posts: 2
edited 2010-09-12 21:11 in Propeller 1
Hi. I'm just getting started with the propeller doing breadboard projects and the like and have had a lot of fun. I would like to write a windows program in c++ that communicates with multiple prop chips. Timing information is not critical in the signals being sent back and forth. From the PC I just want to send and receive commands to/from N propeller chips.

I don't have much experience with this type of device communication from a PC, but think basic communication is not too hard through the serial port. I guess I could add on a bunch of RS-232 PCI cards to a PC to communicate with multiple propellers, but that seems clunky and not too scalable.

I'm currently exploring doing it through USB but I would probably like to avoid drifting off into windows driver development if at all possible due to a general impression that it is a major headache.

I am wondering if I could have multiple FT232RQ (e.g. prop plug) usb to serial interfaces connected at the same time. Do the FTDI VCP drivers allow for mapping of multiple interfaces to a bunch of com ports?

Anybody have any insights or different/better solutions? Thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-12 14:51
    Each FT232 has a unique USB address, so multiple FT232 chips would provide multiple serial ports, one each.

    That may not be what you want. You might want to have a network where all the Props are connected to one serial port on the PC and they take turns talking to the PC. There's an example of such a network for Stamps in the Nuts and Volts Columns. Try #55 and #56. Use the Resources tab on the main Parallax webpage and click on the link to the Nuts and Volts Columns.
  • T ChapT Chap Posts: 4,223
    edited 2010-09-12 14:51
    What I do is put a MAX3430 RS485 chip on each Prop board with a dual RJ45 connector per board. Then for the computer side, a small board with FT232RL>MAX3430 and a single RJ45 with terminator Resistor on that board. For terminating the last Prop, put a resistor on a RJ45 plug and put it in the last unit. Then you configure packets to send out a start byte, an ID byte, and OP codes to tell the correct unit what to do. In some cases the OP code tells the unit to respond with some data. This is a easy to do chipset and the code can be as simple or complex as you want it. You can also send out the CHKSUM with each packet and have the receiving Prop check it, and respond with the desired response.
  • TimmooreTimmoore Posts: 1,031
    edited 2010-09-12 15:11
    I fairly regularly have multiple prop boards plugged into a PC via USB when I debug multi-prop systems. Each prop shows up as a com port, since its only for debug I haven't attempted to optimize the configuration. I just have 2/3 USB COM ports and connect various PC apps to a com port. You need to have apps that can have com ports above 4, e.g. my system is currently using COM port 15 and 16 for 2 prop systems, and since I am connecting to the standard pin 30/31 if I want to program 1 system I need to be careful but otherwise they are standard COM ports and standard PC COM interfacing works.
  • DIYedInTheWoolDIYedInTheWool Posts: 2
    edited 2010-09-12 15:49
    Thanks, guys, for the unique USB/com port info and for helping me get oriented. Mike that nuts and volts article was spot on.
    T Chap wrote: »
    What I do is put a MAX4030 RS485 chip on each Prop board with a dual RJ45 connector per board.

    This sounds much better. I spent some time looking for the MAX4030. Did you mean the MAX4830 off of this datasheet?
  • T ChapT Chap Posts: 4,223
    edited 2010-09-12 16:09
    I appologize for the error, MAX3430 and I get them direct from Maxim-ic. I think it takes one small call and that's it. One thing about these type chips, you do need to have a pin for the enable, and the pin does have a lag time for turning on and off. In your code, just put a slight delay between turning the enable on and sending a signal. I have Eagle files for the schematic and board for the USB>RS485 if you need it. This IC allows 127 devices.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-09-12 16:21
    I build all my prop boards with d9 RS232 connectors and with pins 1,4,6 joined, and 7 and 8 joined. 9 is not connected. So only pins 2,3 and 5 are used. Many boards have two D9s, one for comms, and one for download then comms.

    Then I use USB to serial cables, which you can get on ebay for under $2 each. Plug in as many as you like to your PC and windows sorts out which com port they will use. Then open terminal programs (or code your own software) and talk to each of those serial ports.
  • TubularTubular Posts: 4,718
    edited 2010-09-12 17:00
    There is also a FTDI chip that has one serial cable, but breaks out into 4 serial ports on the board. http://ftdichip.com/Products/ICs/FT4232H.htm

    cheers
    tubular
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-09-12 21:11
    I have used the FT2232 dual USB to serial and it works fine. I have had two PropTools running talking to two Prop pcbs this way. So the quad version Tubular mentions should work fine too.
Sign In or Register to comment.