Need help with raspberry pi 2 usb to serial port communication

Status
Not open for further replies.

akmittra

New Member
Hi. Currently, I am working on getting the raspberry pi 2 to communicate with my iboard avr via a usb-to-serial-port adapter cable for the main purpose of controlling the dc motors already connected to the iboard avr(atmega16). I have already installed the packages for avrdude and enabled the python serial port on rpi 2.

After installing the avrdude libraries, As instructed, I tried both siprog and ponyser and got the following results:

  1. avrdude -c ponyser -P /dev/ttyUSB0 -e -p m16 -U lfuse:w:0xff:m -U hfuse:w:0xc9:m -F
    avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.10s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x000102
avrdude: Expected signature for ATmega16 is 1E 94 03
avrdude: erasing chip
avrdude: AVR device not responding
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.23s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xff:
avrdude: load data lfuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying …
avrdude: verification error, first mismatch at byte 0x0000
0x14 != 0xff
avrdude: verification error; content mismatch

avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode

avrdude done. Thank you.

  1. avrdude -c siprog -P /dev/ttyUSB0 -e -p m16 -U lfuse:w:0xff:m -U hfuse:w:0xc9:m -F
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.08s

avrdude: Device signature = 0x1e9403
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: To protect your AVR the programming will be aborted

avrdude done. Thank you.

In both options , I had to include -F to override the signature check otherwise, I was getting this:
avrdude -c ponyser -P /dev/ttyUSB0 -e -p m16 -U lfuse:w:0xff:m -U hfuse:w:0xc9:m

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Overall, the problem now seems to be with reading the lfuse for some reason. Any thoughts?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…