avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] new USB-based programmer with Igor USB


From: Jeff Epler
Subject: [avrdude-dev] new USB-based programmer with Igor USB
Date: Tue, 25 Nov 2003 08:17:28 -0600
User-agent: Mutt/1.4i

Because "it could be done", I tried out the avr-based USB device code
written by Igor Cesko, and quickly had a very versatile, USB-controlled
device. (http://www.cesko.host.sk)

With 8 available I/O pins, I realized that one use of the device might
be as a usb-attached AVR programmer using SPI.

My initial design used only the basic I/O capabilities of Igor's firmware,
with one USB packet for each pin change or pin read.  It was terribly
slow, taking over 10 minutes to program and verify a 270-byte program.
But it proved the concept was sound.

The problem was the number of packets: even running over-clocked at
12MHz, the Igor USB takes a considerable length of time to handle one
USB request.  But it takes 128 pin changes or reads to do a 4-byte SPI
packet, and multiple packets to write one byte of flash.  So I added
to Igor's firmware a command to perform 8 consecutive bits of SPI I/O
(getting rid of 31 out of every 32 requests) and the time to program
dropped to 30 seconds, which is an acceptable speed for me.  Removing
support for the status LEDs removed another 10 seconds from programming
time, showing that the number of USB packets is still the greatest
concern.

The software on the host computer uses libusb and a small wrapper suited to
the Igor USB firmware.  This means that it should be portable to any OS
which supports libusb (libusb.sf.net lists Linux, BSD, and OS X;
libusb-win32.sourceforge.net apparently supports Microsoft Windows).

If there is interest, I'll make the avrdude patches (against 4.0.0,
unfortunately) and modified Igor USB firmware available on the web.

The big picture:
    HOST COMPUTER
       |
       | (USB cable)
       |
    at90s2313 with modified Igor USB firmware
       |
       | (5-wire cable)
       |
    any supported AVR MPU

The little picture:
    Igor USB*           Programmed MPU**
   ___________         ________
   | PD3 (D0)|---------| RST  |
   | PD5 (D1)|---------| SCK  |
   | PD6 (D2)|---------| MOSI |
   | PB3 (D3)|---------| MISO |
   |_________| GND ||--| GND  |
                       |______|
*  Unlisted pins as required for Igor USB firmware
** Igor USB only drives the connected pins during the programming process
   so these can be used for other purposes when not programming even if
   the cable remains in place

Jeff Epler
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]