avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] Serial programming AVR with FTDI FT232BM Bit Bang Mode


From: Johnathan Corgan
Subject: Re: [avrdude-dev] Serial programming AVR with FTDI FT232BM Bit Bang Mode
Date: Sat, 13 Aug 2005 16:46:27 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Michael Holzt wrote:

As you've probably seen, i'm currently working on adding serial bitbang and
moving bitbang code into a more general approach. It might be a good idea to
add your adapter as just another flavor of bitbanging...

I haven't looked at your patch yet, but I suspect there would be a "abstraction mismatch" with how my code works. See my previous post on how the bit banging mode of the FT232BM is designed. One doesn't toggle bits so much as build a buffer of data to send as a batch.

The lowest level primitive in my library is 'ftavr_send_32bits_fast' which builds a 64 byte buffer, based on a supplied 32 bit command value, to send over the USB bit banged This is used for sending commands one at a time, when one doesn't need to read the result, e.g., erase_chip().

Another one is 'ftavr_send_32_slow', which sends 32 bits over SPI and returns the value clocked out by the AVR. This is very slow over USB but is how commands like set_spi_pgm_mode(), read_signature_byte(), read_fuse_bits_low(), etc., are implemented.

I'm in the middle of implementing an arbitrary length data send, which expands a supplied buffer of data into the necessary bit bang bytes (per my previous email) and sends them over USB. This would be the case if you wanted to send multiple commands back-to-back with no delay in between.

Do you have some working code and schematic of your approach?

Working code, yes. The schematic is basically the FT232BM reference design with TXD, RXD, RTS, and DTR pins wired to an ATMega8 MISO, MOSI, SCLK, and RESET pins.

-Johnathan




reply via email to

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