The Arduino Duemilanove with ATmega328 will be turned into an ISP programmer for the AVR ATtiny chips.
Setting up the Arduino environments:
- Download Arduino IDE 1.0.5 for Windows from http://arduino.cc/en/Main/Software .
- Install it on PC with all default options.
- Download Arduino-Tiny package for Arduino IDE 1.0 from
https://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0100-0018.zip
Save the zip file on PC's Desktop. Extract all. Get in to the created folder.
- Move the subfolder "tiny" to C:\Program Files\Arduino\hardware .
- Get into C:\Program Files\Arduino\hardware\tiny and make a copy of the file Prospective Boards.txt .
- Rename the new file into boards.txt .
- Start Arduino 1.0.5.
- File > Preferences > Sketchbook location = C:\Program Files\Arduino > OK .
- File > Quit .
Turning the Arduino Duemilanove with ATmega328 board into an ISP programmer:
- Connect the Arduino Duemilanove with ATmega328 board to the PC via a USB cable.
- In Windows 8, go to Computer Management > Device Manager > Ports, look at the number of USB serial port.
- Start Arduino 1.0.5.
- Tools > Board > Arduino Duemilanove w/ ATmega328 .
- Tools > Serial port > COM6 (see Windows Device Manager for USB serial port number).
- Tools > Programmer > Arduino as ISP .
- Open the program ArduinoISP with File > Examples > ArduinoISP .
- Upload it to the board with File > Upload .
- File > Quit .
- Disconnect the board from the PC.
Programming ATtiny25 microcontroller:
* Wiring ArduinoISP programmer board to ATtiny25 chip with the following settings.
ArduinoISP ATtiny25
5V Pin 8
GND Pin 4
Digital10 Pin 1
Digital11 Pin 5
Digital12 Pin 6
Digital13 Pin 7
Finally connect the positive pin of a 10 microfarad electrolytic capacitor to the RESET pin of ArduinoISP programmer board and the negative pin to GND.
* Uploading a program to ATtiny25 chip.
- Connect the ArduinoISP programmer board to the PC via a USB cable.
- Start Arduino 1.0.5.
- Tools > Board > ATtiny25 @ 8 MHz .
- Tools > Programmer > Arduino as ISP .
- An example program "Blink" will be uploaded to ATtiny25 chip so that an alternating High/Low logic will be sent out to PB0 of ATtiny 25 chip at pin 5.
The logic High will stay for about 0.1 seconds and the logic Low will stay for about 0.5 seconds.
- File > Examples > 01.Basics > Blink .
- Edit the code from "int led = 13;" to "int led = 0;",
- Edit the code from the first "delay(1000);" to "delay(100);",
- Edit the code from the second "delay(1000);" to "delay(500);",
- File > Save As > C:\Tiny Projects\Tiny_Blink .
- Upload the program Tiny_Blink to the ATtiny25 chip with File > Upload .
- File > Quit .
- Disconnect the board from the PC.
* Using the programmed ATtiny25 chip as a stand-alone microcontroller.
- Disconnect the programmed ATtiny25 chip from ArduinoISP programmer board.
- Connect 5V to pin 8 and GND to pin 4.
- Connect the positive (anode) lead of an LED to PB0 or pin 5.
- Connect the negative (cathode) lead of the LED to one lead of a 330 Ohms resistor.
- Connect another lead of the 330 Ohms resistor to GND.
The LED now should be on for 0.1 seconds and off for 0.5 seconds alternatively.
short URL = http://bit.ly/1cwupQf