[Top][All Lists]

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

Re: [avr-gcc-list] usb programmer

From: Jason Kyle
Subject: Re: [avr-gcc-list] usb programmer
Date: Wed, 23 Jul 2003 08:29:01 +1200

At 15:07 22/07/2003 +0200, Joerg Wunsch wrote:
As Jason Kyle <address@hidden> wrote:

>>If all else fails, how about using an USB-to-RS232 dongle, plus an
>>AVR910-style serial programmer?

>I can't think of any reason why an STK500/AVRISP protocol programmer
>wouldn't work either.

Me neither, except i thought they are more complex/expensive than a
simple AVR910-style one (which includes pAVR, if i'm not mistaken).

Yes, that's true. The AVR910 protocol was originally implemented on an AT90S1200 (i.e. no SRAM) and hence programs one byte at a time and acknowledges. Now this makes it painfully slow since the 2 characters sent in an ack may take several ms to arrive back at the programming software due to OS delays and also the software itself. If you were to program a mega128 you'd have time to walk the dog before it finishes!

STK500 protocol sends 256bytes at a time (and at 115.2kbps) so there are 255 less ack transmissions made than AVR910 sending the same amount of data, this alone makes the programmer way way faster.

To put this in context with usb-serial adapters, there are a few manufacturers and they don't all do exactly the same thing when it comes to forwarding received data to the PC. All of them have some kind of receive FIFO and if it isn't full (e.g. 2 byte ack from an AVR910) they will have a timeout delay of some number of ms (early FTDI usb-serial chips were 16ms, later ones are variable down to 1ms) so we have slower programming than over a standard 16550 UART serial port. Depending on the usb-serial adapter you might have a lot of free time on your hands :)

So although STK500 is a more complex protocol it would be the best choice for use over a usb-serial adapter.

Jason Kyle

reply via email to

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