The Arduino IDE is wonderfully easy to work with and is to be praised as highly as possible for opening up the world of embedded programming to a wider audience – even as a well-seasoned bit basher who relishes the difficult stuff, I love the simplicity of the Arduino IDE.
Of course, it is designed for the 328P, MEGA2560 and now SAM3XAE processors in the Uno, Mega and Due respectively. Note the absence of anything "tiny" in that list. It's easy to fix – some very clever folk have added the tiny variants to the IDE, all you need to do is download a new “boards.txt” file (and some other stuff) from https://github.com/damellis/attiny/archive/master.zip
and put it in the right place.
Hmm...note the absence of anything “24” in that new list...add the following to the newly installed boards.txt file:
attiny24.name=ATtiny24 (internal 1 MHz clock)
attiny24-8.name=ATtiny24 (internal 8 MHz clock)
attiny24-20.name=ATtiny24 (external 20 MHz clock)
Now you need a hardware programmer – something to plug the chip into so that the IDE can talk to it. Those funky Arduino people have even made that easy too – connect your Uno / Mega / Due and load the “Arduino as ISP” sketch. Next get a breadboard and wire the '24 (or 44 or 84) as follows:
Name / Physical Pin
VCC / 1 => Arduino 5v
GND / 14 =>Arduino GND
RESET / 4 => Arduino pin 10
MOSI / 7 => Arduino pin 11
MISO / 8 => Arduino pin 12
SCK / 9 => Arduino pin 13
Some folk will tell you you need a 10uF capacitor between RESET and GND or various resistors here and there, but it works perfectly on my
desk without either. Those 6 wires above are all you need.
Next select the appropriate board as the target, upload your sketch and off you go. It's really easy. Of course the 24 has severely restricted hardware compared with "proper" Arduinos, so don't expect a lot of the libraries to work (especially Serial!) but it's brilliant for bit-banging with more legs than either a 25/45/85 or a spider.
Should be able to see a video of it in action http://youtu.be/A-JMPvDHwXI
or read more about it on my philipbowles.com/blog
(when I get round to posting!)