Wed 20 Feb 2008 05:00:40 PM UTC, original submission:
I have an FT232RL USB <-> RS232 converter attached to my computer.
Trying to program ATMega8 through it gives some really strange results.
Here is my pinout:
Tx -> Reset
RTS -> SCK
DTR -> MOSI
CTS <- MISO
Exactly an ponyser/siprog excepting that RTS, DTR and CTS lines from/to
FT232RL are inverted. To fix that I use that programmer configuration
in avrdude.conf
#-----------------------
programmer
id = "invdasa";
desc = "serial port banging, reset=!rts sck=!dtr mosi=!txd
miso=!cts"; type = serbb;
reset = ~3;
sck = ~7;
mosi = ~4;
miso = ~8;
;
#------------------------
Now the interesting part begins. Loading from win32 works just perfect
with such a command:
avrdude -p atmega8 -P com4 -c invdasa -i 10 -B 10 -b 9600 -U
flash:w:display.hex
(-B and -b parameters are not needed, it works fine without them, but I
use them to fix timings).
But loading from GNU/Linux gives a strange error:
avrdude -p atmega8 -P /dev/ttyUSB0 -c invdasa -i 10 -B 10 -b 9600 -U
flash:w:display.hex
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
[skipped]
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Avrdude versions on both cases are same: 5.5. Trying to connect DSR
line to RTS gave nothing. Ponyprog under win32 works grate. May be
this is a bug in Posix version. It'll be very nice to fix that.
P.S. I tried to invert RTS, DTR and CTS lines in hardware by connecting
an inverter (74HC04), so the programmer became exatly ponyser/siprog.
Under win32 that did a thing, now I can use avrdude without special
editing of config, just specifying ponyser/siprog in -c option. But
still unfunctional in GNU/Linux. Moreover, siprog is dasa2 in uisp
util, it is't working too.
|