"FTDI Bitbang method" with the Arduino-IDE

Kimio Kosaka

 


"FTDI Bitbang method" (Burn the bootloader without extarnal AVR writer) could run with the Arduino-IDE on Windows-XP.


Japanese    English


In July, 2008, I reported "burn the bootloader without external AVR writer" it's called "FTDI Bitbang method". but it was not able to cooperate with Arduino-IDE.

However, it could run via arduino-IDE . We can use "FTDI Bitbang method" from Arduino-IDE menubar [Tools]--[Burn Bootloader].

I describe below the method on the Windows-XP.


  1. About how to cooperate with Arduino-IDE.

    Normally, Arduino-IDE send command(upload the scketch, burn the bootloader) to avrdude.exe. cf: Fig.1

    I made an avrdude_wrapper. A work of this wrapper is below.
    This wrapper steal the command from Arduino IDE and analyze it. When the commands include FTDI Bitbang scripts, this wrapper rewrite and send these commands to avrdude.exe of Serjtag. When not include it, this wrapper send these commands to avrdude.exe of Arduino IDE. cf: Fig.2.


    avrdude_wrapper

  2. Setting environment and Installing avrdude_wrapper
    1. Install avrdude-serjtag

      Install avrdude-serjtag according to this tutorial Burn the bootloader without AVR-Writer

      In this case you must put the "avrdude-serjtag" folder under the "C:\Program Files" folder.


    2. Put the Arduino-IDE folder (arduino-0015) under the "C:\Program Files"folder。

    3. Move an avrdude.exe of Arduino-IDE

      Move C:\Program Files\arduino-0015\hardwear\tools\avr\bin\avrdude.exe into

      C:\Program Files\arduino-0015\hardwear\tools\avr\etc\ folder.


    4. Edit C:\Program Files\arduino-0015\hardware\programmers.txt

      Add scripts as below into programmers.txt.

      bitbang.name=FTDI Bitbang
      bitbang.protocol=diecimila -Pft0 -B4800

    5. Install avrdude_wrapper

      Download avrdude_wrapper.zip and extract it. (avrdude.exe and avrdude.c appear)

      Copy avrdude.exe into C:\Program Files\arduino-0015\hardwear\tools\avr\bin\ folder.


  3. Burn the Bootloader
    1. Wiring for Bitbang operation.

      connecting


    2. Start the Arduino-IDE and click [Tools]-->[Burn Bootloader] on menubar.

      "w/ FTDI Bitbang" appear as below.

      bibang_on IDE


    3. Start burn

      Click on "w/ FTDI Bitbang". And it start. Wait until this working will be finished, several minutes.

      When it was finished, it is displayed as below in the message area of Arduino-IDE. But it is not an error.

      avrdude.exe: BitBang OK
      avrdude.exe: pin assign miso 3 sck 5 mosi 6 reset 7
      avrdude.exe: drain OK
      ft245r: bitclk 4800 -> ft baud 2400
      ft245r: bitclk 4800 -> ft baud 2400
      avrdude.exe: BitBang OK
      avrdude.exe: pin assign miso 3 sck 5 mosi 6 reset 7
      avrdude.exe: drain OK
      ft245r: bitclk 4800 -> ft baud 2400
      ft245r: bitclk 4800 -> ft baud 2400

  4. Test uploading
    1. Disconnect USB-cable form the Dicimila. or Duemilanove etc
    2. Remove the wires of Bitbanging.
    3. Connect an USB-cable again.
    4. Upload sample sketch "Blink".

  5. Demonstration Video

I distribute "avrdude_wrapper" under GPL.

[Return]

upload 2009.05.05

Creative Commons License