Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
09.02.2010 at 19:32:55
News: Server upgrade went fine, you are now at the new system


Pages: 1
Arduino IDE & ATtiny (Read 4531 times)
Lee
YaBB Newbies
*
Offline

Arduino rocks

Posts: 31

Arduino IDE & ATtiny
16.09.2007 at 20:14:55
 
Will it be/is it possible to use the Arduino IDE to code for ATtiny? (without a bootloader)

I read about changing the preferences.txt for using a Arduino sketch without a bootloader but this still targets ATmega , so i read the Hacking section about needing to change the Arduino core for other targets , having looked in that Arduino folder i'm left clueless, what files need changing?

I understand that Arduino is very similar to C but i am only just starting out in programming & electronics and like the simplicity & integration of Arduino IDE, trying to get Arduino to target the ATtiny is way beyond me right now.

For clarification what are the steps required & the files that need changing?
All the files?
Parts of specific files?
Has anybody done this already?

Lee
Back to top
 
 
View Profile   IP Logged
mellis
YaBB Administrator
*****
Offline



Posts: 3006
Cambridge, MA
Re: Arduino IDE & ATtiny
Reply #1 - 17.09.2007 at 12:59:50
 
If you look in the lib/targets/arduino sub-directory of the Arduino application directory, you'll see the source code for the Arduino core.  It needs to be modified to work with the ATtiny instead of the ATmega.  It might actually require a few more changes for some of the ATtiny's, because they don't have any RAM.  

What are you trying to do?  Does it have to use an ATtiny?
Back to top
 
 
View Profile | WWW   IP Logged
Lee
YaBB Newbies
*
Offline

Arduino rocks

Posts: 31

Re: Arduino IDE & ATtiny
Reply #2 - 17.09.2007 at 18:58:18
 
mellis wrote on 17.09.2007 at 12:59:50:
What are you trying to do?

Vaguely, i wish to make modular components such as individual sensors, controls, actuators, etc that can be grouped to form larger physical interfaces or devices.

mellis wrote on 17.09.2007 at 12:59:50:
Does it have to use an ATtiny?

The requirements for above example mean ATmega is maybe over sized and over spec & cost becomes an issue for a large number of them,I was thinking of ATtiny45 in 8 pin, if there is a ATmega of similar size that would do.

I literally have not programmed or tried electronics before purchasing Arduino & just about understand the Arduino examples, just to give you an idea of my ability & knowledge, hence asking the initial question.
So most of what i have in mind is just ideas right now.

Back to top
 
 
View Profile   IP Logged
Cheater
God Member
*****
Offline



Posts: 593
Brisbane, Australia
Gender: male
Re: Arduino IDE & ATtiny
Reply #3 - 18.09.2007 at 06:04:55
 
If your as lazy as I am then I'd just buy a stack if Arduino Mini's. Smiley
Back to top
 
 
View Profile | WWW   IP Logged
Lee
YaBB Newbies
*
Offline

Arduino rocks

Posts: 31

Re: Arduino IDE & ATtiny
Reply #4 - 18.09.2007 at 17:50:48
 
Cheater wrote on 18.09.2007 at 06:04:55:
If your as lazy as I am then I'd just buy a stack if Arduino Mini's. Smiley


I am that lazy. Grin
The Arduino Mini is too large for the applications i have in mind, too expensive for the numbers i have in mind & also has the bootloader which i think would stop me from commercializing them if i wanted, but thanks!

I noticed that ladyada has just been putting up some tuts so i shall look thru them & see how i get on.
Back to top
 
 
View Profile   IP Logged
westfw
God Member
*****
Online



Posts: 1750
SF Bay Area (USA)
Gender: male
Re: Arduino IDE & ATtiny
Reply #5 - 18.09.2007 at 19:49:39
 
The difference in cost between an ATmega chip ($2.50) and an ATtiny chip ($1.25) really isn't that much unless you're talking HUGE quantities, and in any case is likely to be dwarfed by the other costs in your device.   The ATmegas are available in tiny MLF packages (smaller than a dip-8 by a significant amount), which should address physical size issues.

The core arduino environment is not  very hard to port to other CPUs, but it might be more useful to point out that by the time you're capable of doing that, you'd probably also be capable of writing apps for the other CPU in "raw gcc" that didn't require any of the arduino environment.
Back to top
 
 
View Profile | YIM   IP Logged
Lee
YaBB Newbies
*
Offline

Arduino rocks

Posts: 31

Re: Arduino IDE & ATtiny
Reply #6 - 18.09.2007 at 23:41:38
 
westfw wrote on 18.09.2007 at 19:49:39:
The core arduino environment is not  very hard to port to other CPUs, but it might be more useful to point out that by the time you're capable of doing that, you'd probably also be capable of writing apps for the other CPU in "raw gcc" that didn't require any of the arduino environment.


You are right,There are AVR tutorials i shall read over and i'll continue to use Arduino for prototyping as intended.

Edited:

That last sentence undervalues the Arduino somewhat, so i must say that Arduino & it's resources including this forum have been invaluable to me & the Arduino environment facilitates so much more.

Back to top
 
 
View Profile   IP Logged
Easty
Full Member
***
Offline



Posts: 106
Bagshot, UK
Re: Arduino IDE & ATtiny
Reply #7 - 24.02.2009 at 00:14:10
 
Probably way out of my depth here but I found this if it's of any use...?

http://accrochages.drone.ws/en/node/38
Back to top
 
 
View Profile   IP Logged
GorillaCoder
YaBB Newbies
*
Offline

Arduino rocks

Posts: 32

Re: Arduino IDE & ATtiny
Reply #8 - 24.02.2009 at 01:38:58
 
My 2 bits. Start out writing your code for the Arduino. Once it is working, then start working on porting it to an attiny. Perhaps by staying with Arduino, and porting the arduino software to the attiny. Or perhaps by moving your code to avrstudio or winavr or gcc.

By starting with arduino you'll be able to start learning. Then learn a bit more. And then a bit more. Pretty soon you'll know enough to get where you really want to go.
Back to top
 
 
View Profile   IP Logged
trialex
God Member
*****
Offline



Posts: 522

Re: Arduino IDE & ATtiny
Reply #9 - 24.02.2009 at 04:30:51
 
I know that it would be "diluting" the whole arduino concept, but I too would love to see an offshoot of the arduino, where you could prototype using the existing atmega8/168/328, then just simply change the "target board" to be a tiny45/2313 and have it spit out a compatible hex code.
Back to top
 
 
View Profile   IP Logged
oncle
YaBB Newbies
*
Offline

weeeee

Posts: 1

Re: Arduino IDE & ATtiny
Reply #10 - 03.03.2009 at 12:02:53
 
I'm glad this discussion was started--it's a very important issue!

I work with ATtinys because they're cheap and small, ideal for my projects (connecting them to RGB LEDs!). There's an unfortunate distinction between programming these chips with the GNU AVR toolchain (avr-gcc, avr-libc, avrdude, etc.) and programing Arduino boards.

The Arduino libraries can and should be made to work fine with any number of chips and programmers, without bootloaders and bulky boards. There's really no reason not to. True, different chips have different numbers of pins, feature sets, etc., but much of this can be abstracted and accounted for. I'm surprised it hasn't happened yet. It's very useful, as Arduino has all kinds of great libraries written for it that won't work as-is in the GNU toolchain.

It can be done in two different ways. The Arduino environment can be modified to accommodate other chip/programmer possibilities, or those of us using different chips can figure out the right Arduino code to include/modify to use without the environment. I guess we'll see what I get around to--the latter choice seems like less work!

Really, you should try Atmel chips without the Arduino board, it's cheap, tiny, and fun!
Back to top
 
 
View Profile   IP Logged
bohne
God Member
*****
Offline

LumiNet rocks

Posts: 557

Re: Arduino IDE & ATtiny
Reply #11 - 07.03.2009 at 14:30:24
 
I ported the arduino core to an attiny84. This should work with all attinyx4 chips like the 24/44 and 84.

The Arduino IDE does not support attiny chips. Upload (sketches) is not possible, so I had to change some Java classes of the IDE. The modified Java code supports all attiny chips and all atmega chips.

I plan to publish my sources but since there are modifications in the Java files for the IDE, users have to compile their own IDE.

project details: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
Back to top
 
« Last Edit: 07.03.2009 at 15:49:02 by bohne »  
View Profile | Skype/VoIP | ICQ   IP Logged
Pages: 1