AVR910 optoisolated

 

AVR programmer is device to upload firmware into AVR chips.

The first AVR programmer I built was well-known 3-resistors LPT programmer. However, in order to upload firmware from my notebook, I need a programmer with USB interface. The second important requirement is optoisolation. 

After playing a little with Prottoss programmer, I found that all software USB solutions for AVR are low-speed devices, which can handle no more than 800 bytes/second transfers. However, if you have luck depending on usb host chip installed on motherboard and it’s drivers, a faster transfers can be achieved ( up to 5KB/sec). 

Unfortunatelly my notebook could not handle fast transfers. Also adding optoisolation either to USB or SPI side would be difficult. So I desided to switch to USR to RS232 adapter I build earlier, and AVR910 programmer with RS232 interface.

The result is fast ( ~10 seconds for ATMega8 in CVAVR and <5 seconds in AVRProg ) and cheap optoisolated programmer with ability to power device from USB and switch to RS-232 mode to communicate with AVR device.

Two H11l1 fast optocouplers are used to achieve 115200BPS speed. 

P10AU-0505ELF DC/DC converter is used to power programmer and AVR device. Please note, that this converter does not have stable 5V output. I had to add a diode to drop output voltage from 5.6V to ~4.8V to prevent damage of AVR chips.

74LS32 was added to support switch with single switching pair. You can aviod it if you use switch with more mechanical contancts or do not need RS232 mode.

The output from PB2 pin is ~1MHz pulses which can be used to clock target while programming.

Firmware and Proteus schematics

Note: You have to uncomment right section in firmware depending on oscillator frequency you are using.

Firmware contains small modification for provide ~1MHz clock output on PB2.

Статья опубликована на сайте Радиокот http://radiokot.ru/circuit/digital/pcmod/46/