Microcontroller › AVR › Need help with raspberry pi 2 usb to serial port communication to iboard avr
- This topic has 1 reply, 2 voices, and was last updated 6 years, 1 month ago by
Abhishek.
-
AuthorPosts
-
March 6, 2018 at 2:50 pm #4719
akhil
ParticipantHi. 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:
- 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.23savrdude: 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 mismatchavrdude: 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 modeavrdude done. Thank you.
- 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 abortedavrdude 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:mavrdude: 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? Can't seem to upload the attached pdfs of the iboard kit I am using with rpi 2December 27, 2018 at 7:56 am #14988Abhishek
Participantyou need to unbrick AVR and note that fuse values must be properly calculated from the datasheet…this is a common error
- avrdude -c ponyser -P /dev/ttyUSB0 -e -p m16 -U lfuse:w:0xff:m -U hfuse:w:0xc9:m -F
-
AuthorPosts
- You must be logged in to reply to this topic.