Using Atmel's little 8 pin AtTiny85 microcontroller as a standalone is a great alternative to the larger 28 pin AtMega328 mounted on an Arduino Uno board. I have switched from one to the other by various means, but what I found easiest was using Sparkfun's Tiny AVR Programmer. Couple that with the AtTiny85 and a supplemental folder dropped into the Arduino IDE, and a no-fuss, versatile, inexpensive programming method is born.
This project was accomplished on a pc with a Windows system; a similar tutorial for Macs (though with less explanation) can be found here:
Step 1: What You Will Need
--A computer/laptop, with knowledge whether it is 32 or 64 bit
--The Sparkfun Tiny AVR Programmer. You can purchase one for under $20 here:
--An Atmel AtTiny85 microcontroller. You can purchase one for under $3 here:
--Arduino IDE Software, the AtTiny supplement folder, and the Tiny AVR Programmerdriver, all which can be downloaded for free from the hyperlinks below
Step 2: Installing the Arduino IDE Software on Your Computer/laptop
This application will allow you to write, paste, and/or modify code on your computer, then send it into your AtTiny85 microcontroller via the Tiny AVR Programmer device.
--Download the software here:
--Install software on your computer/laptop.
Step 3: Supplementing the Arduino IDE With the Downloaded AtTiny Folder
The Arduino IDE application does not contain the necessary files to work with AtTiny microcontrollers, but it neither rejects them, and that is a good thing! The files can be downloaded and added.
--Download the ATtiny master.zip file here:
--Unzip the file, and navigate from the ‘ATtiny-master’ folder to the desired ‘Attiny’ folder. You will need this second folder in a moment.
--Navigate to your computer/laptop “Local Disk (C:) > Program Files (x86) > Arduino > hardware”. (If there is no existing “hardware” folder, create a new one.) Copy and paste (or drag) the ‘ATtiny’ folder into the ‘hardware’ folder.
--Restart the Arduino IDE. There should now be ATtiny entries in the “Tools > Board menu”.
Step 4: Ready the Tiny AVR Programmer (the Most Difficult Step)
Plugging in the Tiny AVR Programmer should be a no-brainer, but it requires a manual installation of its driver, and possibly the selection of a serial port.
--Within the Arduino IDE, navigate to "Tools>Serial Port" and simply note what you see. It might be no more than the one default "COM1."
--Plug the Tiny AVR Programmer in the computer/laptop USB port.
--Navigate again to the "Tools>Serial Port" and observe whether another COM port has appeared. If so, that is the one. Select it. If not, check once more after the driver has been installed, and select the new COM port if it appears.
--Download the Tiny AVR Programmer driver (must specify either 32 or 64 bit computer/laptop) here:
--Install the driver. Additional instructions (as well as another link for the driver) can be found here:
--Within the Arduino IDE menu bar, navigate to "Tools>Programmer>USBTinyISP", and select it.
Step 5: Tell the Arduino IDE It's Working With an AtTiny85
--Insert the AtTiny85 microcontroller into the Tiny AVR Programmer socket.
--In the Arduino IDE’s menu bar, navigate to "Tools > Boards > ATtiny85 (ext 1MHz clock)", and select it. Though the chip itself is 20MHz, it is set to 1MHz for this project.
Step 6: Program Your AtTiny85 With Simple "Blink" Code
--In the Arduino IDE Menu Bar, navigate to "File > Examples > 01.Basics > Blink”, and select it.
-- Within the code, change “int led 13” (Arduino Uno/AtMega328 ic pin/lead 19) to “int led 0” (Sparkfun AVR Programmer/AtTiny85 ic pin/lead 5): these are the pins whose boards both have a test led attached.
--In the Menu Bar, select “File > Upload” to dump the code into the AtTiny85 microcontroller.
--The test led on the Tiny AVR Programmer should start blinking. It is the goal of the "Blink" code.
From here the Attiny85 microcontroller may be removed and used on a breadboard or in a project.
COMING UP: THE ATTINY85 MICROCONTROLLER ON A BREADBOARD, AND PLAYING WITH THE CODE.