avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] CODE for FTDI bit-bang support


From: Wouter van Gulik
Subject: Re: [avrdude-dev] CODE for FTDI bit-bang support
Date: Tue, 26 May 2009 10:47:43 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Hi all,

There are already different patches for AVRDUDE to support programming via FTDI devices:

Bit bang mode
http://savannah.nongnu.org/patch/?4330

SPI/MPSSE based
http://savannah.nongnu.org/patch/?6502

Although both maybe a bit old. It would be nice if these patches could be updated and incorporated into AVRDUDE.

HTH,

Wouter


Hi all,

I wrote some code you might be able to adapt & use in AVRDUDE. I'd been using AVRDUDE to flash programs into my AVR's through the PC's built-in parallel port (bit-bang). Loved it. Used the AVR's built-in serial download (SPI-like) capability. Then I was hoping to do something similar with my laptop & other PC's that don't have parallel ports, using instead a plain old FTDI UM245R / FT245R. But AVRDUDE doesn't seem to support that. Searching old messages with Google indicated it hadn't worked out in the past. Well, last night I made it work, and work FAST. Flashing AND VERIFYING with read-back a 160 byte program took about 3 seconds total. Some of that was sleep time, e.g. in between flash pages, so could be reduced if you understand how to poll the AVR for readiness etc. This method uses very few round trips to the FTDI chip, so it should scale up to larger programs very well.

I was able to do it using nothing but the AVR, the FTDI, and 3 series resistors that might not even be needed (for current protection). The FTDI UM245R costs about $19 in a 24-DIP module with USB connector. It's used in Synchronous Bit Bang mode, which seems to be also supported by the recent 232-type chips.

The code is in C# but the algorithm should easily adapt to C++ or other languages. It uses the standard FTDI D2xx DLL on Windows.

Reply if you think this would help with AVRDUDE, or just want to talk about it. Personally I'd like to use AVRDUDE for this task instead of my own code, as I like AVRDUDE's terminal capability, and fuse programming etc.

--
Mark Hubbard: cb 750 at com cast no spam dot net


_______________________________________________
avrdude-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avrdude-dev





reply via email to

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