Go Down

Topic: Programming Attiny4313 for use as lcd controller (Read 1 time) previous topic - next topic

aogaski

Hello, i signed up onto this forum because i could really use some fresh ideas. Iv been trying to load an LCD and keypad controller program(google: I2C LCD and keypad controller using ATTiny2313) onto an attiny4313 chip i just bought so that i can free up some pins on my Arduino mega 2560(its quite a big project).

I have loaded the Arduino isp program onto the mega and i have the tiny on a breadboard with the VCC, SCK, MISO, MOSI, Reset and GND pins wired correctly.

First of all avrdude is being very unreliable, it wont always make a connection it just gives me this.

Code: [Select]
avrdude: stk500_recv(): programmer is not responding

The heartbeat led on the mega then stops and i have to reset and try again. When it finally does respond this happens.

Code: [Select]
avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


If i use the -F overide (providing it actually works again) This happens.

Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.12s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
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 "0xE4"
avrdude: writing lfuse (1 bytes):

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

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

Reading | ################################################## | 100% 0.04s

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

avrdude done.  Thank you.



I also tried skipping the fuse bit and i get a similar error.

Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.12s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
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 "I2C_LCD.hex"
avrdude: input file I2C_LCD.hex auto detected as Intel Hex
avrdude: writing flash (2036 bytes):

Writing | ################################################## | 100% 5.68s

avrdude: 2036 bytes of flash written
avrdude: verifying flash memory against I2C_LCD.hex:
avrdude: load data flash data from input file I2C_LCD.hex:
avrdude: input file I2C_LCD.hex auto detected as Intel Hex
avrdude: input file I2C_LCD.hex contains 2036 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 6.19s

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

avrdude done.  Thank you.


Dead chip? Anyone got any ideas? Thank you.

Senso

Have you disabled the auto-reset?
If not when you open avrdude it will reset your mega and it wount work, also I dont know if you can use the new Arduinos as ISP's due to the other Atmega that is serving as the USB-serial bridge.

aogaski

My board isnt actually a proper arduino its based on the older mega but with a 2560 chip, it uses ftdi. I will try what you said about reset.

BrainBooster

i think you are getting errors because of the different device signature, the 4313 signature should be 0x1e 0x92 0x0d
did you changed avrdude.conf?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy