|A flock of three ATTiny85's and an ATTiny 2313 with a lone ATMega328 outside.|
|There is some text telling you which the name of the chip (ATTiny85) on there,|
but my camera couldn't pick it up. I tried to edit it for better viewing.
You have already realized that you can't use the ATTiny chips in Arduino. This is because it doesn't have the cores for the chips. A core in this context is a bunch of code and text that tells Arduino which pins are which, how fast the clock can go, how to upload the program, which functions the chip knows... basically it's an in-depth profile of the chip. I'm going to go over the installation of two cores. The first one is for the ATTiny85. It is the eight-pin chip in the picture.
So first, download this core file: attiny45_85.zip (I got it here. Thanks MIT!) You can unzip it with you favorite unzipping program and look around in it if you want. Now you have to find your Arduino sketchbook folder. You can do this by opening Arduino (I'm assuming you have it) and opening preferences. On a Mac, this can be done by Cmd-Comma. Right at the top should be the words "Sketchbook Location."
|Yours will probably not be on the desktop. I moved mine there|
a while ago. You can change the location with the "Browse" button.
Hmmm... no hardware folder. Time to make a folder! I think Windows has a hardware folder built in somewhere, but I'm not sure whether the process is the same. My old laptop broke a while ago :'-(. Now, drag the unzipped attiny45_85 folder in to the hardware folder. You should have the same folder tree.
|Oooooh, all sorts of fun stuff.|
Reopen Arduino and look in the boards menu. There should be six new boards on there! Three ATTiny45 and three ATTiny85 options. Each has a different programmer. I use "ATtiny85 (w/ Arduino as ISP)" the most, but only because I only have ATTiny85 chips and I haven't bought a dedicated programmer.
EDIT: I just found the comment from Maverick informing me of an important oversight: Arduino 1.0 is a lot different file-wise than the older versions. Files like "WProgram.c" don't necessarily exist anymore. To fix that, Maverick came up with this fix:
- Go to you sketchbook folder (mine's called 'arduinosketchbook', easier to remember)
- Navigate to the /hardware/attiny45_85/cores/attiny45_85/ folder.
- Make a new file called "Arduino.h" and just put this line into it:
- From there, just follow the rest of the directions (Restart the IDE, select Arduino as ISP for
I hope this worked as well for you as it did for me. I will be making post for programming this chip, how to install a ATTiny2313 core, and showing some projects I've used them in.