ATTiny2313A EEPROM issue w/ Arduino as ISP

Hello all,

I am having a heck of a time here. We have an ATTiny2313A with an Arduino UNO as ISP.

The chip works and programs wonderfully with a simple program like Blink.

I wrote a program which works flawlessly on a Pro Mini - so I know the code is good.

Arduino-tiny is the core being used.

At first, the IDE (1.6.5) threw out “EEPROM.h: No such file or directory”

Okay - no prob, grab the eeprom.h file from
C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\include\avr
and put it in
C:\Users\MyName\Documents\Arduino\hardware\tiny\avr\cores\tiny

No go, the IDE now gets passed the .h error, and hits me up with “error: ‘EEPROM’ was not declared in this scope” … Which if it took the h file, it should have been - one would think.

Any suggestions?

Thank you,

Actually, I'd recommend to use Dr. Azzys core instead. It supports most major ATtinys, including Attiny2313 and ATtiny4313. The core is always up to date, and if you have any issues, or finds a bug; he usually answer within a few hours. That core also got a working EEPROM library. Check it out at

Very cool! Thank you Hansibull! Mad Karma for you son!

Turns out the code I wanted to use is too big anyway.. But EEPROM works!

You would have had to copy the entire EEPROM folder into (location of core's boards.txt)/libraries - architecture specific libraries like EEPROM need to be in the core's libraries folder. And indeed, my version is just a copy of the one from the default core. That seems to work for any AVR.

2k is really tight for Arduino - Arduino isn't that efficient with flash space, particularly at the low end, since there's a lot of stuff that requires a fixed amount of space (ie, to set up millis, and the code for digitalRead/digitalWrite, serial, etc).

There are other ATtiny's with serial - the ATTiny841 has 2 (there's also a cheaper 441), with 11 IO pins + reset and 3 timers (6 PWM pins), and the ATTiny1634 has 2 as well, with 17 IO pins + reset, 2 timers, and the 828 has one - and 27 IO pins + reset, ADC on every pin. Actually, all of these have ADC on all or most pins. Unfortunately they're all SMD only, no nice DIP packages - though I happen to sell breakout boards for them :wink: assembled and bare boards )