avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [patch #4330] Adds experimental FTDI bit bang mode interfa


From: Johnathan Corgan
Subject: [avrdude-dev] [patch #4330] Adds experimental FTDI bit bang mode interface
Date: Fri, 19 Aug 2005 14:06:08 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

URL:
  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4330>

                 Summary: Adds experimental FTDI bit bang mode interface
                 Project: AVR Downloader/UploaDEr
            Submitted by: jcorgan
            Submitted on: Fri 08/19/05 at 14:06
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

A new programmer type, 'ftbb', has been created.  Within avrdude.conf, you
can now create a new programmer definition with type 'ftbb':

programmer
  id       = "ezdop";
  desc     = "AE6HO EZ-Doppler";
  type     = ftbb;
  baudrate = 230400;
  reset    = 5;
  sck      = 3;
  mosi     = 2;
  miso     = 1;
;

The baudrate parameter maps to the bit bang interface baudrate.  The above
definition has been added to avrdude.conf.in, copy and edit as needed.

Due to the check for a valid pin number between 1 and 17, the pin definitions
correspond to the FTDI data bus pin + 1.  For example, with an FT232BM, 'reset
= 5' means you are telling avrdude that RESET has been wired to the bit bang
bus D4.  Thus valid values are 1 - 8 to correspond to bit bang bus D0-D7.

No support exists yet for specifying the port via -P.  The bit bang code is
hardwired to use FTDI device number zero.  You will still have to invoke the
command line parameter '-P ft0', and if this is missing or set to something
besides 'ft0', the program will error out.

I've tested all the basic operations from the command line and from the
terminal mode, with success, using an ATMega8 and an FT232BM.  I have no
experience yet with the FT2232 part so I don't know if it would be supported
at all.  FT245BM should work with no differences.

As has been mentioned previously, this implementation is *very slow*.
Transmitting a byte to lower SCK, reading a byte to get MISO status,
transmitting another byte to raise SCK to clock in, MOSI, etc., results in a
ping-pong effect on the USB bus.  But this is required to return the data the
AVR is clocking out the MISO line to the calling routine.  The FTDI USB
latency timer does not seem to function in bit bang mode, so experimenting
with this value hasn't made any difference.

I'll be working on an update to this implementation to clock out an entire
command in a single USB packet for commands that don't need a response; this
will at least improve things like writes.

Finally, the support exists for Cygwin only, and dynamically links to the
FTDI FTD2XX DLL.  The Makefile.am changes have the location of the FTD2XX.h
and FTD2XX.lib files (supplied by FTDI) hard coded; you'll need to fix these
up to correspond to the location in your build environment.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 08/19/05 at 14:06  Name: PATCH-avrdude-ftbb-050813.diff  Size:
11.53KB   By: jcorgan
Patch to CVS 2005-08-18
<http://savannah.nongnu.org/patch/download.php?item_id=4330&item_file_id=5049>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4330>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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