Difference between revisions of "Ftdi"

From ThorstensHome
Jump to: navigation, search
(conclusion of the day)
Line 1: Line 1:
Ok for [[programming electronics]] I got myself an [[ftdi]] chip. I want to be able to invert the TX/RX/... signals so I can get some experiments working that I have on a paper. There is a [http://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer%27s_Guide%28FT_000071%29.pdf good overview] what the bytes in the EEPROM mean. I can read its EEPROM by working through [http://elettrolinux.com/utilities/159-ftdi-gnulinux-talks-with-ftdi-chips this tutorial].
+
Ok for [[programming electronics]] I got myself an [[ftdi]] chip. I want to be able to invert the TX/RX/... signals so I can get some experiments working that I have on a paper.
 +
 
 +
To do this
 +
* download http://www.ftdichip.com/Drivers/D2XX.htm
 +
* download http://svn.icmb.utexas.edu/svn/repository/trunk/zpub/sdkpub/usbkey_dlpd/macosx/d2xx/Samples/EEPROM/write/main.c
 +
* compile it using
 +
gcc -o write main.c -L/root/Downloads/release/build/x86_64/ -lftd2xx -lpthread -ldl -lrt -Wl,-rpath,/usr/local/lib
  
= reprogram it =
 
To reprogram the EEPROM of the ftdi, use the software ftdi_eeprom.
 
* download the software
 
wget http://www.intra2net.com/en/developer/libftdi/download/ftdi_eeprom-0.3.tar.gz
 
* unpack it
 
tar xvzf ftdi_eeprom-0.3.tar.gz
 
cd ftdi_eeprom-0.3
 
* build it
 
./configure && make -j4 && make install
 
* find out your ftdi's serial ID:
 
hwinfo --usb
 
[...]
 
Serial ID: "A7006Ys2"
 
[...]
 
* configure ftdi_eeprom to use your serial id:
 
sed -i "s/^serial=.*/serial=\"A9VQ459E\"/" example.conf
 
* read your chip's eeprom:
 
ftdi_eeprom --read-eeprom example.conf
 
* find the file name where the eeprom is stored in:
 
ls -ltr
 
[...]
 
-rw-r--r-- 1 root root  128 Dec 15 12:59 eeprom.new
 
* verify that it is really an eeprom
 
# hexdump -C eeprom.new
 
00000000  00 40 03 04 01 60 00 00  a0 2d 08 00 00 00 98 0a  |.@...`...-......|
 
00000010  a2 20 c2 12 23 10 05 00  0a 03 46 00 54 00 44 00  |. ..#.....F.T.D.|
 
00000020  49 00 20 03 46 00 54 00  32 00 33 00 32 00 52 00  |I. .F.T.2.3.2.R.|
 
[...]
 
  
 
= conclusion of the day =  
 
= conclusion of the day =  
Line 35: Line 13:
 
= See also =
 
= See also =
 
* http://svn.icmb.utexas.edu/svn/repository/trunk/zpub/sdkpub/usbkey_dlpd/macosx/d2xx/Samples/EEPROM/write/main.c
 
* http://svn.icmb.utexas.edu/svn/repository/trunk/zpub/sdkpub/usbkey_dlpd/macosx/d2xx/Samples/EEPROM/write/main.c
 +
* http://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer%27s_Guide%28FT_000071%29.pdf - good overview what the bytes in the EEPROM mean.
 +
 
[[Category:Projects]]
 
[[Category:Projects]]

Revision as of 10:51, 16 December 2012

Ok for programming electronics I got myself an ftdi chip. I want to be able to invert the TX/RX/... signals so I can get some experiments working that I have on a paper.

To do this

gcc -o write main.c -L/root/Downloads/release/build/x86_64/ -lftd2xx -lpthread -ldl -lrt -Wl,-rpath,/usr/local/lib


conclusion of the day

Seems we need this code and this (ftd2xx) library

See also