1
\$\begingroup\$

I am struggling with making a usb programmer for Atmega. I couldn't get my hands on a proper FT232L or something like that, but I did manage to find a serial to usb converter like this. This gets detected like a normal com port and is able to make work modems and printers. Will that do serial programming? There are serial programmers around which I have seen, work with ponyser as the programmer in the makefile. How do I make one?

Edit Through lsusb I have found out that the converter has a pl2303 inside (compatible with ft232r) so how do I do the programming now?

\$\endgroup\$

3 Answers 3

3
\$\begingroup\$

PC serial port programmers basically use the "handshake" (RTS/CTS DTR/DCD) pins of a serial port as a small parallel port. It often doesn't work with USB "virtual com port" devices because the USB device distorts the timing. The conventional wisdom is that USB adaptors "don't work" with PC serial port bitbang software that is expecting a hardware COM port (8250 UART), but I'm not 100% certain that someone hasn't gotten it working with a PL2303.

If you have an AVR chip preprogrammed with a serial bootloader, you could use your serial adapter (with a rs232->5v level shifter) to load programmer firmware onto the AVR, then use that AVR as a programmer (with appropriate firmware) to program other AVRs.

You can buy ATmegas with the arduino serial bootloader preloaded, or maybe you know someone with a programmer (or an arduino) who can burn a serial bootloader onto an ATmega for you?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I have a parallel port programmer but the problem is there are only usb ports on newer computers \$\endgroup\$
    – Rick_2047
    Mar 10, 2011 at 2:32
  • 2
    \$\begingroup\$ @Rick_2407 with your parallel programmer, a borrowed computer and a blank AVR, you could burn the firmware (arduino.cc/playground/Code/MegaISP) for a serial-port programmer onto an AVR. You can then use that AVR and a USB-serial dongle to program other AVRs. \$\endgroup\$ Mar 10, 2011 at 6:49
  • \$\begingroup\$ @unixbigot that is my exact setup right now \$\endgroup\$
    – NickHalden
    Jul 8, 2011 at 13:29
3
\$\begingroup\$

AVR "serial" programming is in fact done over SPI. It's possible to bit-bang SPI using an FT232, which is why they're often used for this purpose.

There is an old trick to bit-bang SPI over the flow control lines of a real serial port. You might be able to achieve something similar with your USB converter.

http://www.ele.uva.es/~jesus/avrprg/powerless.html

\$\endgroup\$
3
  • \$\begingroup\$ But this is bit-banging, how will a converter do bitbaning. Is there a way to check if the bitbanging is working? \$\endgroup\$
    – Rick_2047
    Mar 9, 2011 at 16:11
  • \$\begingroup\$ You need some custom software at the PC end to use the RTS/DTS lines as general purpose IOs \$\endgroup\$ Mar 9, 2011 at 16:19
  • \$\begingroup\$ I did an lsusb from ubuntu and I can confirm it is a PL2303 from inside. This is pin compatible with FT232R. So the connections inside have to be exactly like a normal connection. Can I achieve bitbanging through that? i.e without editing the circuit inside \$\endgroup\$
    – Rick_2047
    Mar 9, 2011 at 16:23
3
\$\begingroup\$

I would suggest starting with a parallel port programmer. They are very easy to make and are rock solid. Of course you will need a PC with a parallel port.

Or if you can find someone with a working programmer (or a PC with a parallel port) you can build yourself an USBasp. It is easy to build and works with avrdude.

Having a (temporary) programmer you can also make an AVR910 programmer but as you can see on the page there is a little mess in the documentation. It takes normal RS232 (5V levels; use a MAX232) on one end and outputs AVR serial programming protocol on the other. There is even AVRospII - a nice Windows GUI for the thing. Some years ago we made several such programmers out of cell phone RS232 cables.

\$\endgroup\$
1
  • \$\begingroup\$ I second the idea of using a borrowed programmer (or a borrowed computer that works with the programmer you have) to make a USBasp or other avr-based programmer. Here's the one I built, complete kit was only €20 - shop.tuxgraphics.org/electronic/detail_avrusb500.html. Heck you can get a USBasp for $13 on ebay now. \$\endgroup\$ Mar 10, 2011 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.