avrdude-dev
[Top][All Lists]
Advanced

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

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


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

This is my first AVR project.

I have built a board which uses an ATMega8 and an FTDI FT232BM USB to serial converter chip.

For normal operation, the FT232BM serial TXD and RXD are routed to the appropriate serial port pins on the ATMega8.

For programming, I have routed four pins from the FT232BM to RESET, MISO, MOSI, and SCLK, so I can use the bit bang mode of the part for programming operations.

I have started work on a programming library under Windows with Cygwin, that encapsulates the FTDI driver DLL with the routines for sending and receiving data over the SPI interface. I've verified I can put the ATMega8 into serial programming mode, read the device signature, erase the chip, and read/write fuse bits. So I'm pretty confident the low-level SPI interface works well.

At this point, I was going to start building actual Flash and EEPROM programming routines. The end goal would be a standalone "updater" program specifically for the project/device I'm building.

However, might it be possible to modify avrdude to use my routines for the low-level SPI protocol? I'd avoid massively reinventing the wheel...

I don't have any experience with avrdude itself, this being my first AVR project. Nor would I have any familiarity with the avrdude source code structure, or how it might be modularized to accommodate replacing its existing low-level routines with mine. (Of course I have a long background in C programming and microcontrollers, just new to AVR and avrdude.)

Right now, my library is hard coded for the ATMega8 and the particular pin mapping from the FT232BM USB chip to the SPI interface. It would be fairly easy to make the pin mapping configurable.

Anyway, I'm at a point where I need to decide what is easier: write my own special purpose, limited functionality programmer on top of my library, or figure out how to add my library to avrdude and get all the creamy richness of a mature programmer code base. If I did the latter then my "updater" program would simply be a script that invokes avrdude with the right command line parameters.

Suggestions?

-Johnathan





reply via email to

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