Shop OBEX P1 Docs P2 Docs Learn Events
Can you use an Arduino Uno as a prop plug substitute — Parallax Forums

Can you use an Arduino Uno as a prop plug substitute

Can you use an Arduino Uno as a prop plug substitute? The Arduino uses an ATmega16u2 for USB communications. By using, a jumper wire to hold the ATmega328 in reset (GND) you can bypass the ATmega328 and get serial communication from the ATmega16u2 on pins 0 and 1. In addition, the DTR line is available at c5 (100n). Looking at the prop plug schematics it looks like you would just need to add a transistor and resister to invert the DTR line and create an RC

So after making those changes (holding atmega328 in reset and jumper wire from DTR with transistor to invert DTR), would the Arduino Uno work like a prop plug for programming the propeller chip? Would the propeller IDE recognize the atmega16U2 for serial communication?

Comments

  • I've used Wixel's as a prop plug substitute, so this should work. The IDE connects to the prop over a serial port, and the Arduino's FTDI chip presents itself as one.
  • I think the UNO pins 0 and 1 will present 5V serial logic values which will need to be divided down for the propeller IC.
  • To adapt 5V logic levels to the propeller, you really only need a large enough resistor in series.
    cgracey wrote: »
    The whole chip needs to run on 3.3V, nominally. We've applied 5V to see what would happen, but it didn't improve performance. I think·I remember it just getting a little warm. This should not be done, though, because the Propeller's CMOS process specifies 3.6V as the absolute maximum operating voltage.

    To input from a 5V system, a series resistor in the 1k-100k range is probably·the best approach.·There are parasitic catch diodes on every pin of the device which will clamp incoming out-of-range voltages to within ~0.4V of the VSS and VDD rails. This will force the resistor to drop 1.3V (5.0V-(3.3+0.4)) for an incoming high signal.

    To output to a 5V system might be a simple matter if the threshold voltage is TTL (~1.4V) or CMOS (2.5V). You can connect straight in. For bidirectional pins, just use a series resistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • yetiyeti Posts: 818
    edited 2018-10-08 13:22
    There already are 1k resistors between RX/TX of the Uno's ATmega16U2 and the ATmega328's TX/RX.

    How to handle DTR ia a different story. Do it like the PropPlug?
    —▷ PropPlug schematics (page 5)

    I prefer to use modules with FT232R or CP2102 for such tasks.
  • Back when I had a workshop area (in a cupboard ...) I tried to use a Atmega168 as a http://www.recursion.jp/prose/avrcdc/ kind of thing. I could never get the timings right to get the Prop to enter the programming mode - got fed up (quickly) and steamed a FTDI chip off of something and used that. the simple scope I had then showed pulses (I did try the DTR + edge & - edge variations)

    I had used it at 8MHz so it would run at 3.3V to try and keep things friendly

    Moved jobs ... moved house (twice) ... must get back to making things.
  • DTR is also not strictly necessary, as long as you have a nice reset button and two functioning hands. Although getting the timing right takes a while to master. I have used this method so far and it works out somewhat well. Sadly, the only program I know has predictable upload timing is PropTool, and only when you compile the program using (ctrl+F8) or load a .eeprom, which then allows you to simultaneously click "Load RAM/EEPROM" and release the reset button on the prop for a very reliable upload.
  • Wow...It didn't realize you can simulate the DTR (reset) signal by hand. I am going to have to give that a try.
Sign In or Register to comment.