FTDI Friend Created by lady ada Last updated on 2016-10-17 08:28:54 PM UTC
Guide Contents Guide Contents Overview Installing FTDI Drivers COM / Serial Port Name FTDI vs. AVR Programmer Whats the difference between an FTDI cable/adapter & AVR programmer? Programming Blank AVRs Programming the Arduino Bootloader Using the Command Line AVRdude Downloads © Adafruit Industries 2 3 5 11 15 15 17 22 24 27 https://learn.adafruit.
Overview Long gone are the days of parallel ports and serial ports. Now the USB port reigns supreme! But USB is hard, and you just want to transfer your every-day serial data from a microcontroller to computer. What now? Enter the FTDI Friend! The FTDI Friend is a tweaked out FTDI FT232RL chip adapter. Sure, like the well-known FTDI cable, it can provide power to your project and there are 4 signal lines for sending data back and forth.
3.3V and 5V signal systems). © Adafruit Industries https://learn.adafruit.
Installing FTDI Drivers Step #1 is to plug in your FTDI adapter and install the driver (in case it isnt on there already). If you have an FTDI cable proper, there is already a USB A connector on the end. If you have an FTDI adapter, you'll need a standard mini-B cable, pretty much everything uses these so steal your camera's or cell phone's data cable. If you are using Windows or Mac OS, you may need to need to download the FTDI driver (http://adafru.
After a few seconds, the new hardware wizard will start. Select "No not this time" and click Next> At the next screen, select Install from a list or specific location © Adafruit Industries https://learn.adafruit.
At the next screen make sure Include this location is selected and browse to the folder that contains the driver you downloaded. Select the folder and click OK It should copy some files and then come up with this window. Click Finish © Adafruit Industries https://learn.adafruit.
Almost immediately, another window will pop up, this time it will say USB Serial Port. As before, click Install from a list or specific location Browse to the same folder again… © Adafruit Industries https://learn.adafruit.
And it should complete successfully! You may need to reboot the computer. © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
COM / Serial Port Name OK now we will verify that the driver installed properly. Under Mac, in the Terminal window, type in ls /dev/cu.* which should give the following responses or so The name we are looking for is /dev/cu.usbserial-XXXX where the X's are going to be unique for each cable. Copy and paste the name into a text file so you'll remember it for later.
If you are using Windows, go to the Device Manager (From the Start Menu, select Settings→Control Panel. Double click on System and select the Hardware tab. Then click on the Device Manager button) © Adafruit Industries https://learn.adafruit.
Look for an entry under Ports (COM & LPT) that says USB Serial Port (COM) the COM number may vary but it should be something like COM3 or COM4 the COM number may be as high as COM99 so just look for the USB serial port. The COM stands for "communication", and each one has a unique number, known as the COM Port number. In this case the COM Port number is COM3. If you don't see the COM port verify the cable is plugged in, and check that you installed the VCP FTDI driver.
Make sure Set RTS On Close used to be required for people using the Arduino IDE before like version 18 or so. Now you dont need it so make sure its not selected! © Adafruit Industries https://learn.adafruit.
FTDI vs. AVR Programmer Whats the difference between an FTDI cable/adapter & AVR programmer? FTDI Cable / Adapter AVR Programmer There are two ways to program an AVR microcontroller. One is to reprogram the entire chip using an AVR programmer. The other is to use a bootloader that is pre-programmed onto the chip that allows the chip to re-program itself. An AVR programmer is more powerful: you can really mess with anything on the chip and the entire 32K of memory is available.
If you use an AVR programmer to write to chip with a bootloader on it, you'll overwrite the bootloader so just be aware of that! © Adafruit Industries https://learn.adafruit.
Programming Blank AVRs So even though I said FTDI adapters are not for programming 'raw' AVRs, it turns out you can 'convince' the chip to do it with a bit of manipulation. One way that is documented so far doesnt require soldering but it does require updating the AVRDUDE software and installing a different driver (http://adafru.it/aVA) . (see also this post (http://adafru.it/aWU) and this link for using an FTDI adapter instead of an Arduino (http://adafru.
use a white wire. Plug in wires into the FTDI breakout, black is ground, blue is CTS, red is VCC, orange is TX and green is RTS. © Adafruit Industries https://learn.adafruit.
Now you have to make a text edit to youravrdude.conf. © Adafruit Industries https://learn.adafruit.
If you've installed WinAVR (http://adafru.it/aI2) or similar (say for Mac (http://adafru.it/aI1) or Linux (http://adafru.it/aWW) ) , it'll be in something likeC:\WinAVR\bin\avrdude.conf or C:\WinAVR\etc\avrdude.
# | O| <- 6 DSR # DCD 1 -> |O # # Using RXD is currently not supported. # Using RI is not supported under Win32 but is supported under Posix.
Programming the Arduino Bootloader Don't forget, if you have two 'duinos, you can turn one into an ISP programmer,check out this tutorial which runs much faster than the below. (http://adafru.it/aVI) You can burn chips right from the Arduin IDE with one more edit, open up the programmers.txt file (its in hardware\arduino in the IDE installation) and add the following text to the bottom. ftdifriend.name=FTDI Friend bitbang ftdifriend.communication=serial ftdifriend.protocol=ftdifriend Save programmers.
Connect the Blue (CTS) wire to the MISO pin (Arduino pin 11) Start up the IDE and select the COM port of the FTDI friend Make sure you have the right Board selected, for whatever you want to burn. Then select Burn Bootloader→FTDI Friend It will take a really really long time to program the chip, about two hours! Its taking forever because its programming very inefficiently.
programming. When it goes out you're done. Its very slow but if you're in a pinch, it may come in handy! Using the Command Line AVRdude Now if you open up a terminal and try running avrdude -c ftdifriend If you are using the avrdude installation thats inside the Arduino IDE, you can open up a cmd terminal and cd to the directory where you have the IDE installed and then go to hardware\tools\avr. Then you can run bin\avrdude.exe -C etc\avrdude.conf -c ftdifriend so for example, my installation is in C:\ardu
If you are using the avrdude in the Arduino IDE, you'll need to usebin\avrdude -C etc\avrdude.conf -c ftdifriend -P \\.\COMxx -p atmega328p etc. Once you have the hashbar show up nicely, that means you are talking to the chip all right. Yay! You can now program the chip using the -U flash:w: command. Press the up arrow to get back the command you wrote and tack onto the end a-U flash:w:firmware.hex (where firmware.
© Adafruit Industries https://learn.adafruit.
Downloads You can get the schematic and layout files over at GitHub(http://adafru.it/aWX), they're licensed CC attrib/sharealike Fritzing object in the Adafruit Fritzing Library (http://adafru.