218Views19Replies

Author Options:

Compiling the Blink Sketch? Answered

Picture of

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?
  

19 Replies

user
steveastroukBest Answer (author)2012-09-05

GOTCHA !

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.

Steve

Select as Best AnswerUndo Best Answer

user

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

Select as Best AnswerUndo Best Answer

user
WWC (author)steveastrouk2012-09-05

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?

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)WWC2012-09-05

The link I sent links to this
http://toasterbotics.blogspot.co.uk/2011/08/using-arduino-with-attinys.html

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

Steve

Select as Best AnswerUndo Best Answer

user
WWC (author)steveastrouk2012-09-05

Ya thanks.

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

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)WWC2012-09-05

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

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)WWC2012-09-05

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

THEN

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

attiny2313.name=ATtiny2313
attiny2313.upload.using=arduino:arduinoisp
attiny2313.upload.maximum_size=2048
attiny2313.build.mcu=attiny2313
attiny2313.build.f_cpu=1000000L
attiny2313.build.core=attiny2313

then it worked....

Steve

Select as Best AnswerUndo Best Answer

user
WWC (author)steveastrouk2012-09-05

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
verify

What do you get? Error ?

Select as Best AnswerUndo Best Answer

user
WWC (author)steveastrouk2012-09-05

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?

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)WWC2012-09-05

Just one processor I meant.

I get identical errors to you.

Steve

Select as Best AnswerUndo Best Answer

user
WWC (author)steveastrouk2012-09-05

Ah OK
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.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)WWC2012-09-05

See my reply at the TOP of the thread.

Steve

Select as Best AnswerUndo Best Answer

user
WWC (author)steveastrouk2012-09-05
user
steveastrouk (author)WWC2012-09-05
user
WWC (author)steveastrouk2012-09-05