Shop OBEX P1 Docs P2 Docs Learn Events
building USB device — Parallax Forums

building USB device

igorigor Posts: 3
edited 2008-08-19 14:50 in Propeller 1
Can Propeller be programmed to send data to a PC via USB interface?
My purpose is to build a USB device (sensor) on the basis of Propeller Demo Board·or PropStick USB.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-17 15:13
    The built-in USB interface of the Demo Board or the PropStick USB can be used for serial data. Any serial I/O driver (like Simple_Serial or FullDuplexSerial) can be used. The transmit pin is #30 and the receive pin is #31. The only potential problem is the use of DTR to reset the Propeller. Whenever DTR is toggled (like to open or close the serial port from the PC) the Propeller will reset. This is normally used for programming purposes. For most applications, this is not a problem.
  • DroneDrone Posts: 433
    edited 2008-08-18 03:41
    Hi Igor,

    Mike's suggestion is the easiest. However, If you don't want to use your Prop-Plug USB programming device as your interface; in other words, you prefer a dedicated USB interface to/from the PC, then pick up one of these USB/UART boards (link below). They're only $15 USD compared with $25 for the Prop-Plug which uses the same part (FTDI FT232). But you can't program the propeller with this board as it is missing the reset circuitry that mike mentioned (probably simple to add, refer to the Prop-Plug schematic in the manual). The Windows driver for this board is the same as the driver used with Prop-Plug. So you'll just get another virtual serial port on the PC for the new USB connection:

    www.sparkfun.com/commerce/product_info.php?products_id=718

    Don't forget the Parallax Serial Terminal (PST). PST is a useful tool for debugging via the serial port. Look in the downloads area of the Parallax Propeller site.

    Regards,

    David
  • GiemmeGiemme Posts: 85
    edited 2008-08-19 12:38
    Hi

    there is another ftdi breakborad with DTR pin. The DTR pin will allow the propeller to autoreset when a new software is downloaded.

    http://www.sparkfun.com/commerce/product_info.php?products_id=8772

    Regards
    Gianni
  • hippyhippy Posts: 1,981
    edited 2008-08-19 13:42
    BradC created a driver which only requires a USB socket and three resistors. That can communicate back to a PC over USB using a virtual serial port but cannot be used for downloading.

    propeller.wikispaces.com/USB+Slave
  • DroneDrone Posts: 433
    edited 2008-08-19 14:50
    Hi Giemme,

    Yes the Sparkfun board you mention does break-out the DTR, and it can be used (in-theory) to reset the propeller. However, there are major differences between the Sparkfun board and the prop-plug:

    1. The two boards are powered differently, and have different header pin-outs. Compare the schematics for both the prop-plug and the Sparkfun board keeping in-mind while referencing the FTDI FT232R data-sheet that the prop-plug uses the FT232RQ QFN-32 physical package while the Sparkfun board uses the larger FT232RL SSOP-28 package.

    2. The passive components and one transistor included on the prop-plug are not included on the Sparkfun board. Of primary concern is the lack of the transistor, which isolates the prop-plug reset from a physical reset switch you probably have on your propeller board.

    The SparkFun FT232 break-out board I mentioned in my previous post in this thread breaks out DTR as well. The break-outs are 01." spaced in two dimensions, that lends itself to perhaps making daughter cards that plug into the SparkFun board for use with different processor types. Is it worth the effort, probably not.

    Perhaps the the $25 USD price for the prop-plug is about ~$8 too-high IMHO and may pose barrier to entry compared with the $20 cost of the propeller proto-board, especially for multi-seat educational labs. As of post-date the cost for the FT232RQ itself is $2.65 in qty.-1000, $4.50 qty.-1 (Mouser), before negotiation. The price (not cost) for a propeller chip in qty.-1000 is $8.05.

    Rgds, David
Sign In or Register to comment.