Pages: [1]   Go Down
Author Topic: Programming Attiny4313 for use as lcd controller  (Read 1684 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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:
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:
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:
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.
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Deep south of Italy
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2955
The quieter you become, the more you can hear
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: