「BitBang Mode AVR-Writer on Mac」の編集履歴(バックアップ)一覧に戻る
% ls -l /usr/local/lib/libftd2xx* -rwxr-xr-x 1 root wheel 212748 2 24 01:47 /usr/local/lib/libftd2xx.0.1.6.dylib lrwxr-xr-x 1 root wheel 36 2 24 01:50 /usr/local/lib/libftd2xx.dylib -> /usr/local/lib/libftd2xx.0.1.6.dylib % ls -l /usr/local/include/(ftd*|Win*) -rwxr--r-- 1 root wheel 2230 2 24 01:49 /usr/local/include/WinTypes.h -rwxr-xr-x 1 root wheel 23433 2 24 01:48 /usr/local/include/ftd2xx.h
(成功例) % cd D2XX/Samples/BitMode % make % ./bitmode ucMode = 0x0 % cd D2XX/Samples/Simple
% make % ./simple Device 0 Serial Number - A9005bvI Opened device A9005bvI ^CClosed device
(失敗例) % cd D2XX/Samples/BitMode % ./bitmode FT_Open(0) failed = 3 % cd D2XX/Samples/Simple % ./simple Device 0 Serial Number - A9005bvI Error FT_OpenEx(3), device
sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext
(アンロード&テスト) sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext % cd D2XX/Samples/BitMode % ./bitmode ucMode = 0x0
sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext
mkdir mac_bitbang cd mac_bitbang wget http://www.nmj.sakura.ne.jp/suz-avr/serjtag/serjtag-0.3.tar.gz # wget http://www.geocities.jp/arduino_diecimila/bootloader/files/serjtag-0.3.tar.gz wget http://ftp.twaren.net/Unix/NonGNU/avrdude/avrdude-5.3.1.tar.gz # MD5 (avrdude-5.3.1.tar.gz) = 58c2be9f7a864b930ed9e6f1858f5cc7 # MD5 (serjtag-0.3.tar.gz) = 7228de34ad8221598401cd631dd6f55e tar xvzf avrdude-5.3.1.tar.gz tar xvzf serjtag-0.3.tar.gz cd avrdude-5.3.1 patch -p1 < ../serjtag-0.3/avrdude-serjtag/src/avrdude-5.3.1-usb910.patch patch -p1 < ../serjtag-0.3/avrdude-serjtag/src/avrdude-5.3.1-avr910d.patch patch -p1 < ../serjtag-0.3/avrdude-serjtag/src/avrdude-5.3.1-serjtag.patch patch -p1 < ../serjtag-0.3/avrdude-serjtag/src/avrdude-5.3.1-ft245r.patch patch -p1 < ../serjtag-0.3/avrdude-serjtag/src/avrdude-5.3.1-baud.patch mv ser_posix.c ser_posix.c.ORIG grep -v B3000000 ser_posix.c.ORIG > ser_posix.c ./configure CFLAGS="-g -O2 -DSUPPORT_FT245R" LIBS="-lftd2xx" make ./avrdude -v
色 | Arduino | tiny2313V | mega88 | mega88p | |
赤 | 5V | Vcc | 20 | 7,20 | |
黒 | Gnd | GND | 10 | 8,22 | |
青 | (X3:2) | SCK | 19 | 19 | |
緑 | (X3:1) | MISO | 18 | 18 | |
黄 | (X3:3) | MOSI | 17 | 17 | |
白 | (X3:4) | RESET | 1 | 1 |
#arduino diecimila programmer id="diecimila"; desc = "FT232R Synchronous BitBang"; type = ft245r; miso = 3; # CTS X3(1) sck = 5; # DSR X3(2) mosi = 6; # DCD X3(3) reset = 7; # RI X3(4) ;
~/tmp/mac_bitbang/avrdude-5.3.1/avrdude -C ~/tmp/mac_bitbang/avrdude-5.3.1/avrdude.conf -c diecimila -p t2313 -vv -B 4800 ~/tmp/mac_bitbang/avrdude-5.3.1/avrdude -C ~/tmp/mac_bitbang/avrdude-5.3.1/avrdude.conf -c diecimila -p t2313 -vv -B 4800 -U flash:w:main.hex:i
Q. Cannot open a port even though installation has been successful. A1. This is possibly due to the FTDI serial driver holding the port with your VID and PID. Solution is to uninstall the serial driver (see www.ftdichip.com knowledgebase on how to do this). To completely eradicate the possibility of this occurring in future it is recommended a new VID and PID is used to distinguish between devices. A2. Another possibility is an incorrect VID/PID. Try changing your application to use the FT_SetVIDPID API call to quickly determine if this is the case.