FTDI Friend Datasheet by Adafruit Industries LLC

View All Related Products | Download PDF Datasheet
adafrult learning system '- BLfiCK—normms‘bq—A’dsrrur'xfirl 435m 0 In”! MI I) I GWS mummm @- 434mm: -®¢i‘xi flbnx ' 64m? n mums-1i n A: :WEEN ‘
FTDI Friend
Created by lady ada
Last updated on 2019-07-17 08:21:26 PM UTC
* adafruit learning system 34*“ rm] Friend' t»; Adam“ szD a an "I. q dbcxs
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. But the Friend can do much more!
For example, you can change the signal and power lines to be either 3.3V or 5V. Arduino-derivatives and XBees use
the RTS line for programming but what if you need that DTR line? Its there for you.
By default, we've set it up so that it matches our FTDI cables. The 6th pin is RTS (as of Arduino IDE v18 this will work
perfectly for uploading to 'inos), the power wire is +5V and the signal levels are 3.3V (they are 5V compliant, and
should work in the vast majority of 3.3V and 5V signal systems).
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 3 of 23
* adafruit learning system
Installing FTDI
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 (https://adafru.it/aJv) if you
haven't already installed it for another project. If you are using Linux, the driver is already built in to the operating
system (handy!)
Next up, plug it into your computer! If you are using Windows you may hear a sound from the computer and a little
popup bubble in the bottom right corner of the screen that says Found New Hardware FT232R USB UART.
After a few seconds, the new hardware wizard will start. Select "No not this time" and click Next>
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 4 of 23
Faund New Hardware Wizard Welcome to the Found New Hardware \Mzam thdnw: wtlt Search ru cument and wasted inltwele by \aoktng 00wa annual, an m: havdwave mtatlatmn ED, a! on the Window: Update Web stte {wtm you! vermwon] Read out Ema-2y goltcy Ean wtndws connect |n thdam Update to seatch In: sunware7 0 yes, the llme Univ 0 Yes, new and 91er {Intel mnnecl a device @. Elck Next ta cummue Fund New Hardware Wizard 1m wtzavd heips ynu mtau Snflwave rm FTZ32R USB uem L") nyuu. haldwue came wilh m inslallalion co an "app, disk, intuit il um, What dw you want the wtzatd In M O Imtatl Ah: sartwate automattcatly [Recommended] 0 nslefllyp'g altetotgpggit pcatt’an [Adygneedj Elck Next ta cummue
At the next screen, select Install from a list or specific location
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
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 5 of 23
F and M Harm- Mn“ Browse Fm ramu Pleas: chum: ynuv 8:. ® Beach [or Ih: has! MY Dncuments ‘ If Wampum ‘ 3 MY Natwokalazes . g ardunu E and“ : \Dacumen fi ass ‘2 E ulls Chaos: this uuim l. |hs “we you ohms Tu wait any suhfnldavs. dwcka n‘us 5m ahuve‘ Faund New Hardware Wizam Completing the Found New Hardware Wizard The wwwd Ha: brushed \mlal‘ng “we snflwue ’01 e USB Sanal Eunvevlav The hadwav: you mulled wwl nnl wnrk unm yuu Vesta" yum mwulev Elck Fmsh m c‘use Aha wizard
It should copy some files and then come up with this window. Click Finish
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
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 6 of 23
Faund New Hardware Wizam 1m mam naps ynu \nflal‘ Suflwave to. USB Sella‘ Port ‘5) lUuul havdwue came wilh m inslallalion co an "app, disk, mu il nun, What dw you wait lh: wlzavd In M 0 install m: software automatic-31v [Ranammended] @ jnsla" up"; a lws| av 3596M; \pcau’on [Adyqnced] Elck Next m cummue F and M Harm- Mn“ Browse Fm ramu Pleas: chum: ynuv 8:. ® Beach [or Ih: has! MY Dncuments If My Cumpulev 3 MY Natwovk Places g ardunu E and“ : \Dacumen fi ass ‘2 E ulls ODm'Assalch \ «In Chaos: this uuim l. |hs “we you ohms Tu wait any suhfnldavs. dwcka n‘us 5m ahuve‘
Browse to the same folder again…
And it should complete successfully!
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 7 of 23
Faund New Hardware Wizard Compleiing Ihe Found New Hardware Wizard The ward has hnlshed manng the sultwae rm 3 USB Senalet rm: mom: ynu ms|s|led wwl "at wnrk unm yuu 12:13“ Jan! computer Elck meh m chm: he want j; hum! New Hardware >< vuur="" new="" hadwae="" is="" instaled="" m1="" night="" nut="" wk="" pmperiy="" mtil="" you="" reheat.="">
You may need to reboot the computer.
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 8 of 23
* adafruit learning system ('3 r‘ n Terminal _. bash — 80x16 Last logm: Sat sep 15 15:45:14 on mp1 moms to Dummy ' murmm~ max |s /M/Eu.’ law/cu.Buhb‘cLPhunfiarlawml Nev/c mm» (aw/cufimetoum—Hudm — xusv/cuamsmatwnmm adarruicv mu: murmm~ mu: | Erle gdn mew IMmIna‘ Tug: flalp lafliadaeladiafla~laptop:~s ls mev/ttyusa- lanyada@\aayafla~laptopz-s [l
COM / Serial Port
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.
For Linux/Unix type ls /dev/ttyUSB* into a terminal window, you should see a device file called something like ttyUSB0
If you are using Windows, go to the Device Manager (From the Start Menu, select SettingsControl Panel. Double
click on System and select the Hardware tab. Then click on the Device Manager button)
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 9 of 23
5,. Device Manage! El: fiction mm Hdv e-MEEI 296 :9 man. ENWEOGEN r? 5 cumumm-sand pavtmuhws E j Comma m e u'sk dives E E Dlsplay adaplau r? .J. DVD/CD—ROM dum II & man Interface Deuces g «3 IDE ATA/AYAPI mnxmuers g Q 15:: 139 ms hast cuntrclh: 17 Qt meavds r: " m: and nthu pmrmng dances l: Monkovs m - Netwmk adaflas 17 mum Netwovk ms Enumevatov VT Okhev dewcx E Potts (COM & LPY) 3 cmuunmom um (com) 9 Funny pmam) II a Pvnzessovs kg a 5532 IEEE 1354 Dev‘ces E 0 mm, was: md game cmmilm '7 it Stavaw Vdumas r: system dances if Unlvevsal Serial m5 continues
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.
Then right click and select Properties
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 10 of 23
USE Ser [Purl (c M5) Prupemes Gama] Pm! saunas [Dy-m; new: Edam: \a v Em [Nuns— E‘wcumo‘ \Non: v 3mm: Advanced swing; rnr COM30 com EM umber: coma V “mm; Se‘ec‘ \owev setwlvs tv meat Derfwmance pvob‘ems a hw mavens. sum Mina smug; rm Fails pufmmanne. halve (Ms): \«uas v "mini (am) We v am Optnns Mmuamus Optmns Se‘er) \nwev semngs m mm vesgmse vmh‘ems sum “m,” Lemmy um ("my 15 v 5"“ ”W” D (mm! Ii Paws on El "”5"“ Event on suwse lemuval El Mmmm ma “meal (mac): n v _ ' is Cl C! Mmum Wm mam (mac): 7 053* Madam
Click on the Port Settings tab, and click on Advanced…
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.com/ftdi-friend Page 11 of 23
* adafruit learning system FTDI Cab‘e / Adapter AVR Programmer
Whats the difference between an 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. Using the bootloader is safer: there's no way to mess with the fuse settings (which could brick the
chip) but you only get 30K of memory since 2K is used by the bootloader. Not a big deal, but if you are working on a
big project which requires tons of flash space, you may need it
FTDI Cable / Adapter AVR Programmer
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 12 of 23
For a lot more information about AVR programmers and bootloaders, I strongly recommend reading this short
article (https://adafru.it/aI4)
Note that to program an AVR you need an AVR programmer (like a USBtinyISP (https://adafru.it/aI4) ), but to upload
using the bootloader you need a computer-serial connection (such as an FTDI cable). Unfortunately, they are not the
same device! If you're not a microcontroller wiz, I suggest going with the bootloader (FTDI) method. Its as fast (or
faster), allows you to debug as well, and theres virtually no way to damage/brick the chip by messing with the fuses. If
you're familiar with microcontroller programming, and you have a programmer, then feel free to go that direction.
AVR programmers are more powerful in that you can program any AVR, even blank ones from the factory. But
that also means you have a pretty good chance of 'bricking' the chip!
FTDI adapters can send any serial data back and forth including updating AVRs with a bootloader on them. But
you need to get that bootloader on there first, which basically requires an AVR programmer.
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.com/ftdi-friend Page 13 of 23
* adafrult learning system Ya ‘arqi' ssvnnq Cm defeph Jumper shorls, and resume fivDOD +3u UCC u a Man: Slqna} logic level mu [Balms 9“ Pin 6 signal - v1 FTUI Frier‘wj from adah‘uit‘ A ‘ n s V I? A
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 (https://adafru.it/aVA) . (see also this post (https://adafru.it/aWU)
and this link for using an FTDI adapter instead of an Arduino (https://adafru.it/aWV) )
If you have an FTDI friend or other breakout where you can get to the DTR line, I found a way to do it that requires
soldering a wire but no AVRDUDE/driver messing. The trade off is that it is really slow - good for maybe burning a
bootloader on, not good for day-to-day AVR development
Turn over the FTDI friend, and solder a dot of solder onto the DTR pin on the bottom left.
Solder a wire onto it, making sure you dont short it to the gold square just to the right. We'll use a white wire.
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 14 of 23
u : ‘arqe sun/fl > JE'anlv ‘uhpsr “my dfld 'E-saNe" mggqu w. MM ,5“ DgD .2“ Signal Iaqic'lnwv 3BR“ s\9nal hm TDI Friend. ram allayuw ’wflfifi
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.com/ftdi-friend Page 15 of 23
WINDuw5kp1emazmmd (X: .n. nq‘t‘laflvada\iurfludh fiurfllldr: .an‘r [ind m. unnumr—r m mm.» mm m mm. M» rim stk=Vl~r3 :‘mflmm h «an Parr. m. in . . rummm ,um. an rm sum 54 Lan 1m» /wm.lancn mun-1w“. Wm. v er (la: «n pnnvvmg «mu. re mum _zmuu11u )unuwxlhnl‘: u." H mm) 3:37:31‘ cab Frank ‘ Iznn fllrrra Blrrafila°rrr mm 1"|Vmu- , rr 12w nun mum/«um Zmflmju\hin aunt-m. n 541 u w ‘ 41 mm.- m ‘mu izmumm tun \uwjnfle nu "urul‘t n...-- mm. c; n; ms tr magi .(l n xfl mlsn=cr haul) [ Ulnmmi mmm mm" mm’fllnxhiw ,rh’dmmlnnd . mm’m mm mm ' 41 mm ‘ n Ml“, ."mnmlfi 1., nus): rxd lvu;n='cr$ ts 1 g [c c: uimuw 9 “mm: hirmaurdude, “mm 'unf
Now you have to make a text edit to your avrdude.conf.
If you've installed WinAVR (https://adafru.it/aI2) or similar (say for Mac (https://adafru.it/aI1) or
Linux (https://adafru.it/aWW) ) , it'll be in something like C:\WinAVR\bin\avrdude.conf or C:\WinAVR\etc\avrdude.conf if
you aren't sure where it is, but you have avrdude installed, you can runavrdude -c xyzwhich will dump the programmer
list, if you look to the right, the name of the conf file will be printed
A common reason for wanting to program an AVR is to put the Arduino bootloader on there, in which case, you may
not have WinAVR installed. Luckily, avrdude is there, its just 'hidden' in the IDE package (for Mac users,you need to
actually "explore" the App) if you're running windows, go to the folder where you have the IDE installed and go into the
hardware\tools\avr\etc folder to open up avrdude.conf
OK! Now that you have avrdude.conf open, find the string ponyser, then add the following bold text right before hand
so the avrdude.conf looks like this:
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 16 of 23
Save the file.
# some ultra cheap programmers use bitbanging on the
# serialport.
# PC - DB9 - Pins for RS232:
# GND 5 -- |O
# | O| <- 9 RI
# DTR 4 <- |O |
# | O| <- 8 CTS
# TXD 3 <- |O |
# | O| -> 7 RTS
# RXD 2 -> |O |
# | O| <- 6 DSR
# DCD 1 -> |O
# Using RXD is currently not supported.
# Using RI is not supported under Win32 but is supported under Posix.
# serial ponyprog design (dasa2 in uisp)
# reset=!txd sck=rts mosi=dtr miso=cts
id = "ftdifriend";
desc = "design ftdi adatper, reset=dtr sck=tx mosi=rts miso=cts";
type = serbb;
reset = ~4;
sck = ~3;
mosi = ~7;
miso = ~8;
# serial ponyprog design (dasa2 in uisp)
# reset=!txd sck=rts mosi=dtr miso=cts
id = "ponyser";
desc = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
type = "serbb";
reset = ~3;
sck = 7;
mosi = 4;
miso = 8;
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 17 of 23
,3 ‘ .5- “Mann. 1.2”“: * adafruit learning system
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. (https://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.
Save programmers.txt
Its time to wire it up!
Connect the Black (Ground) wire to the ground of your chip
Connect the Red (VCC) wire to the power/VCC/5V pin of your chip
Connect the White (DTR) wire to the Reset pin
Connect the Orange (TX) wire to SCK pin (Arduino pin 13)
Connect the Blue (CTS) wire to the MISO pin (Arduino pin 12)
Connect the Green (RTS) wire to MOSI pin (Arduino pin 11)
Start up the IDE and select the COM port of the FTDI friend
ftdifriend.name=FTDI Friend bitbang
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 18 of 23
askemh sep153 \ Arduinn 0018 Ann meat cum Archwe 5mm fix Encodm kRe‘oad senal Mnrltar anshRm Baum EEHEI pnn mm Bunthadav sketchjepwa \ Arduino can; file Eda sum Aulu Formal cum Anhwe Sketch F‘x Encoding a Rahad Sand Monika! GIHSHVHM Buavd t Sand Pwt b w! AW 15? w! AVRISP mklI w! usannylsp wl Padld vavemm w] Ardmm as 15? ‘. ‘ FYDI Fr m1 blrbaH-J Eum
Make sure you have the right Board selected, for whatever you want to burn. Then select Burn BootloaderFTDI
It will take a really really long time to program the chip, about two hours!
Its taking forever because its programming very inefficiently. It takes 4 bytes to program one byte of the AVR, and data
is sent as a single bit in two USB packet, each packet takes 3 milliseconds and an AVR has 32768 bytes = 262144 bits.
262144 bits * 2 packet/bit * 3 ms/packet * 4 bytes/byte = 6291456 ms = 6300 seconds = 104 minutes! If you used a real
AVR programmer, it would take maybe 15 seconds so thats why its nice to have one.
Do this before you go to bed or watch a movie! The L (pin 13) LED will be on 'solid' while its 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:\arduino-0018\ I cd to C:\arduino-0018\hardware\tools\avr.
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 19 of 23
WINDOWSEyslemJkad x: ml mum“. umu )mr‘lunn: 1‘“;me Arthur“) UHJXVIArlIHmwdm-JL durum" vwwhul? x» c eu,\.m~m..|e.wu L mun lend Mum-(I .9”: Nu MUN pm pm um. fxevh use *p pm" I 1m Paws we "mm MHFt’mfi-fifl [r[r\finrd m w umm m: aurflnd? (nnf "ma 7 mm Mn nuwlndv‘,rnnf'113fifi] l;tc\au~dude.ccnl mm] m: m~m.a.~,rm.r-m :nurdudr ran [etc aurdnde nl-1fl4_1] m. M luv-,1 1:171:11 m. e “mamas“ ..I...I. ,.m.r ‘IR'MI WINoow5kp1em32kmd x2 mud" 7mm ha (luar run]:\aur/b)n\aurdud .ere 7c :ti\aurdude.conf 7: nan» r \. con-1|. .- «Lne'JaJZKP .9”: mm v‘eulu» AI‘ALJAJJJE‘I and ”my u. N, apt )vILVrn 1.qu ummnunnunmmnunum:mmmmunuunuuuuuuuuuunuuuuuuuuu Juu- u .hgumm Snarure une'tsm .hg: salemnd aurflnd .hg dune. Ihank run. ml“ ' » u...1- u
You should get a note that No AVR part has been specified (not that it Can't find programmer id "ftdifriend")
Great, now its time to program!
Connect the Black (Ground) wire to the ground of your chip
Connect the Red (VCC) wire to the power/VCC/5V pin of your chip
Connect the White (DTR) wire to the Reset pin
Connect the Orange (TX) wire to SCK pin
Connect the Green (RTS) wire to MOSI pin
Connect the Blue (CTS) wire to the MISO pin We suggest verifying the wiring! We'll verify the connection by
running avrdude -c ftdifriend -P \\.\COMxx -p atmega328p Replace the \\.\COMxx with the COM port you found
in the earlier part of this tutorial via the Device Manager. If you're using linux or mac, the COM port should be
/dev/cu.usbserialXXX or /dev/ttyUSBx to match the name. For the device, we're testing with an Atmega328p
chip which is found in the latest Arduinos. If you're using some other chip, substitute the name right after the -p
If you are using the avrdude in the Arduino IDE, you'll need to use bin\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.hex is the hex file you want to burn in) For example, if you want to burn a bootloader on, make it easy on
yourself by copying the file from use:
bin\avrdude.exe -C etc\avrdude.conf -c ftdifriend -P \\.\COM46 -p atmega328p -U
(you can also copy your file to C:\ so its not so long to type. Hit return and grab a beer, it'll take about 5 minutes per
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 20 of 23
mnlgxwwmnxaurmm .ere 7c :ti\aurdude.conf 7: mm» )* n r \. un‘n. p unnurqlzl‘p u Au. . mm.-muxmuumm w 74‘. um» “mm 153 arméq 3.1.“ aurdud .112: mm dance initlallzefl and readv tn 3: ept )nscru nu 1mmnunnunnunmmmmnunuuuuuuuuuuuuuuuuuuunuuuuuuuu IFM'. a new . qnanu Vlnp‘ifim ”Mud Nfilk. mm: memory I: haven wanna. an em.» Lyme um he pun rmrfl 1., (Ilsahle LIuL Aeaulre. 3“”.le the 4‘ um”... aurfllldr—,e/r‘ “mum rm“ aurflnd .hg. I": (buy mpm nu \ \ardumuxmnunadn-s itm?ga\MTmegaan[,JFi armmws w“ Mud mpm nu . \. \ardlunn\bcntlnaflh \acméya NIH:§\H"OI,J ,2. sun. «mama: a" In»! My aurflnd "mung Hash (mm hytes mamanunmmum:mmuuummmmmamanuuwuuuuuuuuuuvuuuuuu mu- 312 ,1 e; a n 1. u» my. ihyimr [ln'h mm“, A'mvrt , , m-duinn hnur]undm~'\nrmr a Mn. , tnegid hex In .1 data [ln'ln data Iran mum .in , ~ ,mnmm. handwrlm-«xarm wt" gaEO(‘I,1bE,atnesi32 «ml in Am Mum-1 mm M m7 axrnmwnam u p. :»
byte of data you want to write&verify)
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 21 of 23
* adafruit learning system
You can get the schematic and layout files over at GitHub (https://adafru.it/aWX), they're licensed CC
Fritzing object in the Adafruit Fritzing Library (https://adafru.it/aP3)
© Adafruit Industries https://learn.adafruit.com/ftdi-friend Page 22 of 23
© Adafruit Industries Last Updated: 2019-07-17 08:21:26 PM UTC Page 23 of 23

Products related to this Datasheet

Available Quantity: 44
Unit Price: 20.4