I've been trying to program my ATmega644p using a C232HM-DDHSL-0 programmer which is based on the FT232H chip.
I've edited the .avrduderc in my home directory to include the following, which I've adapted from /etc/avrdude.conf:
programmer
id = "C232HM";
desc = "C232HM-MPSSE";
type = avrftdi;
usbvid = 0x0403;
# Note: This PID is reserved for generic H devices and
# should be programmed into the EEPROM
# usbpid = 0x8A48;
usbpid = 0x6014; // changed from 0x6010 after checking "lsusb"
usbdev = "A";
usbvendor = "";
usbproduct = "";
usbsn = "";
#ISP-signals // Modified according to datasheet
reset = 5;
sck = 2;
mosi = 3;
miso = 4;
;
I've been able to communicate with the MCU using avrdude using
sudo avrdude -c 2232HIO -p m644p -P /dev/ttyUSB0
where the output to terminal is:
Unknown type 6 (0x6) //Remainder pins - 1,2,7,8,9,10 not declared
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e960a
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Ouput with -vvvv option enabled: http://pastebin.com/z3K8RYJP
However when I try to flash a simple .hex file, it stalls while writing flash:
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e960a
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "int1.hex"
avrdude: input file int1.hex auto detected as Intel Hex
avrdude: writing flash (164 bytes):
Writing |
Output with the -vvvv option enabled: http://pastebin.com/EmmuCsxN
I've also installed the D2XX drivers from FTDI and followed the steps as outlined in this guide, but to no avail: (see comment for links)
It seems that I'm unable to write to the MCU, so my first guess would be I've mis-configured the programmer. Any help would be much appreciated. Thanks!
EDIT: Just noticed that I was using the different command to communicate with the MCU :(
EDIT2: I fixed it using this config:
programmer
id = "C232HM";
desc = "C232HM-MPSSE";
type = avrftdi;
usbvid = 0x0403;
# Note: This PID is reserved for generic H devices and
# should be programmed into the EEPROM
# usbpid = 0x8A48;
usbpid = 0x6014;
usbdev = "A";
usbvendor = "";
usbproduct = "";
usbsn = "";
#ISP-signals
reset = 4;
sck = 1;
mosi = 2;
miso = 3;
;