Author Options:

Compiling the Blink Sketch? Answered

When i compile the Blink sketch on a 328 it verifies OK.
Compile the same blink sketch on a ATtiny85 verifies OK.
Compile the same blink sketch on a ATtiny2313 it troughs an error every time. These are the same" family " of processor.
When you download the 85 board files the 2313 board files come with it. 
Same results from 23, 1 and 1.01 IDE's.

I used an LPT programmer and can read the READ ALL files from the 2313 using Pony Prog. So there is a connection there.
I just can not write the blink sketch to the 2313 cuz of the compile error.

There is a lot of tutorials on how to program using this method, that i have read everyone i could, but to resolve the compile error i have not found an answer to.
I would switch to an 85 but not available locally.

Anybody come across this error before?



1.) ADD THE LINE #include to the TOP of the file "main.cpp" you RENAMED from main.cxx
2.) ADD a file called Arduino.h in the SAME directory, with the line
#include "WProgram.h" and nothing else.

Now it all compiles. And I can get some real work done.


k this, its lost part of my post.
PM me and we'll email the right info. You're nearly there.

What format does the file need to be in. Not able to type directly into the 45_85folder. If i make a new folder, still not able to type directly into it.

If i type WProgram.h into the aruino IDE i probably can save that way.

Whats the best way to put a file in there?

The link I sent links to this

I haven't done what you're trying to do, so all I can do is suggest a path for you !


Ya thanks.

That's actually the page i am referring to in my last question.

OK, I'mtrying it on my PC at work for you right now ;-)

OK. I can do it on my system, using their instructions. I can get the 2313 to appear in my boards list.

What have you done ?

I navigated to my sketchbook path - mydocuments\arduino, where I created a folder hardware
I got the 45 series zip files, and unzipped the folder into my sketchbook hardware directory.

Then I downloaded the 2313 files, and unzipped THEM into

My Documents\Arduino\hardware\attiny45_85\cores


Up a bit to
My Documents\Arduino\hardware\attiny45_85
and edit boards.txt to add


then it worked....


Yes i have that exactly the same also.
How many different 2313 ic selections do u have?

Did you go to the 1.01 IDE
select ATtiny2313 board
load the blink sketch

What do you get? Error ?

Just 1 error? is it the same error as in my example picture?
if you verify the blink for the 45_85 does it error?

Just one processor I meant.

I get identical errors to you.


Mine also shows 1 choice for the 2313. The references online talk about choosing what 2313 you want to use. 1 Mhz or 8 Mhz. That would be 2 chip choices.
I have also seen where the 2313 has many choices like the 45_84 does.
I have not found any down load to back up the pictures of the choices.

Where did you down load from?

But the 45_85 no error.

The error we get is the problem i am trying to figure out.
An Arduino sketch can be converted into a hex?
Then the hex loaded into PonyProg to load into the 2313?

Every tutorial online shows a successful programming of the 2313. I really wonder tho.

See my reply at the TOP of the thread.