Shop OBEX P1 Docs P2 Docs Learn Events
USB interface question — Parallax Forums

USB interface question

retromicroretromicro Posts: 24
edited 2014-08-18 16:54 in Propeller 1
Hi

I've bought some raw Propeller chips and was wondering if I could program them with an interface that I made up for my Arduino projects.

Here's the interface

http://www.ebay.com/itm/1pcs-PL2303-USB-To-RS232-TTL-Converter-Adapter-Module-/251082091781?ssPageName=ADME:X:AAQ:US:1123

And here's how I modified it to get the DTR pin to reset the AVR

http://www.xappsoftware.com/wordpress/2012/04/16/how-to-upload-sketches-to-arduino-uno-chip-using-pl2303-usb-to-rs-232-converter/

Does it look like this would work ok without damaging the microcontroller ?

Thanks

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2014-07-11 15:50
    You will need to find the DTR pin and wire it also (or you can use RTS if that is easier to get at).
    Then you will need to build the circuit as per the PropPlug (ie the serial resistors and the transistor reset circuit).

    This one might be a better bet, but you will still require the propplug cct to be added
    http://www.icstation.com/product_info.php?products_id=3451#.U8Bp5qB--t9
  • retromicroretromicro Posts: 24
    edited 2014-07-12 00:33
    Thanks for the reply.

    I'm puzzled though as the modification that I referred to in the second link actually brings out the DTR connection from the interface, which I know successfully resets Arduino circuits. So, I'm not sure why I'd then need to build a transistor reset circuit ?
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-07-12 04:23
    I looked at the schematic in the second link which did not show the reset being connected to the DTR.

    However, the reset circuit is normally required. It operates on the opposite edge of DTR which permits swapping programs under windows. There are many threads about it.
    Some have got by with just using a series cap, but to save problems the transistor circuit is better.
    Any general purpose NPN transistor will do the job. Be careful of the pinout eg the P2N2222 and 2N2222 have different pinouts in the TO92 case!

    Don't forget the series resistors for Tx & Rx - the TX from the usb chip is usually outputting 0-5V and the prop is a 3V3 device. BTW we run at 115,200 baud, 8N1.
  • abecedarianabecedarian Posts: 312
    edited 2014-07-13 00:27
    Cluso99 wrote: »
    I looked at the schematic in the second link which did not show the reset being connected to the DTR.

    However, the reset circuit is normally required. It operates on the opposite edge of DTR which permits swapping programs under windows. There are many threads about it.
    Some have got by with just using a series cap, but to save problems the transistor circuit is better.
    Any general purpose NPN transistor will do the job. Be careful of the pinout eg the P2N2222 and 2N2222 have different pinouts in the TO92 case!

    Don't forget the series resistors for Tx & Rx - the TX from the usb chip is usually outputting 0-5V and the prop is a 3V3 device. BTW we run at 115,200 baud, 8N1.

    If VCCIO is connected to the 232RL 3V3OUT, outputs (TX, RX, DTS, DTR and such) are driven with 3v3 compatible levels, right, and wouldn't need the buffers used on the QS board and similar, right?
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-07-13 06:31
    If VCCIO is connected to the 232RL 3V3OUT, outputs (TX, RX, DTS, DTR and such) are driven with 3v3 compatible levels, right, and wouldn't need the buffers used on the QS board and similar, right?
    Yes, but most of thecheaper usb to serial use 5V from what I have seen.
    The series resistor is also a safety thing too. Depending on how you power the prop and the usb chip, its possible to have power on the prop without power on ghe usb chip. This has caused problems when using an FT232RL usb chip as the prop will partially power the usb chip via the TX pin and resistor. Symptoms are continuous resets at short intervals.

    While the prop is pretty resilient, you dont want to damage it.

    BTW Dont forget to power all power pins and ground all grounds on tne prop chip! And decoupling caps too. There are no caps required on the xtal and the xtal should be 18-20pF.
  • retromicroretromicro Posts: 24
    edited 2014-07-13 14:09
    Cluso99 wrote: »
    Yes, but most of thecheaper usb to serial use 5V from what I have seen.
    The series resistor is also a safety thing too. Depending on how you power the prop and the usb chip, its possible to have power on the prop without power on ghe usb chip. This has caused problems when using an FT232RL usb chip as the prop will partially power the usb chip via the TX pin and resistor. Symptoms are continuous resets at short intervals.

    While the prop is pretty resilient, you dont want to damage it.

    BTW Dont forget to power all power pins and ground all grounds on tne prop chip! And decoupling caps too. There are no caps required on the xtal and the xtal should be 18-20pF.

    Thanks for the constructive replies. I'll let you know how I get on.
  • retromicroretromicro Posts: 24
    edited 2014-08-15 07:02
    I should have asked what value of resister to use in the TX and RX lines.

    I've seen values between 1k and 150 ohms suggested.

    Should I also include one of the same value in the DTR/ Reset line ?

    Thanks
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-15 07:46
    For safety, yes put a 1K or enen a 4K7 in both rx and tx lines for just in case your usb/serial is 5v instead on 3v3. There is no point in putting one in the DTR line as the transistor protects this problem.
  • retromicroretromicro Posts: 24
    edited 2014-08-18 09:57
    Hi

    I've now built my DIY Prop Plug using the Prolific-based USB Serial interface board that I bought from eBay. I followed the general principles of the Prop Plug schematic but used 4.7K ohm resistors in the serial wires and a 2N3904 for the reset line.

    Despite advice from the vendors that these boards do not work with Windows 8, I have mine working fine on Windows 8.1 X64 with some drivers that I found some time ago. If anyone wants them, send me a PM.

    Here it is. Not sure why the interface is upside down though.

    Thanks
    1024 x 765 - 101K
    1024 x 765 - 92K
    815 x 319 - 47K
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-18 16:54
    Excellent news. And welcome to the forum :)
Sign In or Register to comment.