Atmel AVR Infrared Downloader. Part 1. Host-side.

This project makes firmware upgrades easy: The target has an Infrared receiver and the data is sent via IR. The IR transmitter is based on V-USB.

The host-side consist of host-program for Win32 PC using Libusb-Win32, device based on ATmega8 using firmware-only USB driver by Objective Development and infrared hardware unit.

AVR IR Downloader: Host-device

Host program was compiled using Lazarus Freepascal. Device firmware was compiled using WinAVR (AVR-GCC).
The implementation uses custom device class, required simple inf file and libusb driver on PC.

Infrared data transmission uses USART facility and Timer2 for 38 kHz modulation signal generator. Baudrate 2400bps is based on the IRM-8510N data reception ability which is 400us for the shortest length logic signal.

AVR IR Downloader: IR receiverAVR IR Downloader: IR transmitter

With a single infrared led, both host and target side can wirelessly communicate at about 6,5 meters. Final board uses 6 infrared led, can handle 15 meters length approximately.

Data packet size was limited 128 byte length because of ATmega8 SRAM at host-side was limited at 1 kbyte size. During development phase we planned to increase till 1~2 kbyte length but we avoided it. Actually it can be increased to optimize the transfer process using a bigger SRAM AVR series. All transmission packets were implemented using CRC16 for error detection.

Schematic Diagram: Host-device

AVR IR Downloader: Host-device Shematic Diagram
Click to enlarge

Host-Side Features are:

  • Device firmware is implemented as custom class device.
  • Atmel AVR uC memory operations: read, write and erase.
  • Memory supported: flash, eeprom and fusebits (extended also).
  • Error detection during transmission through infrared implements CRC16.
  • Data packet size 128 byte length, can be increased in future development.
  • Can handle data transmission at about 15 meters max.
  • usbpoll cannot be run while USART data transmission. USART handling is the highest priority routine to maintain infrared communication consistency between host and target side.
  • Developed for all Atmel AVR series but still partially tested (different SCK frequency of specific AVR series depend on the target-side system).
  • Maximum target memory operation can handle is 32640 byte (32 kbyte). It depend on the packet id max. which is 255 with data packet size 128 byte length.

Schematic Diagram: IR transmitter circuit

AVR IR Downloader: IR transmitter circuit

Schematic Diagram: IR receiver circuit

AVR IR Downloader: IR receiver circuit

In the following part of the description we will get acquainted with the circuit of the target device which carries out reception of the data and microcontroller In-system programming.

Download

Host-side: schematic diagrams, software for microcontroller and PC: 20081008.host.side.zip

Shematic Diagrams: IR transmitter circuit, IR receiver circuit 20080726.ir.circuit.zip

IR LED, datasheet
2N3906 transistor, datasheet
Quad 2 input OR gate, datasheet

Links

avrirdownloader.wordpress.com

You may have to register before you can post comments and get full access to forum.
EMS supplier