Introduction: ATtiny13A/ATtiny25/ATtiny45/ATtiny85 Programming With a Programmer Board and USBasp

For small projects the normal Arduino boards are too big and expensive. What you really need is just a cheap microcontroller to run your code and to control a few pins. Buying an ATtiny45, ATtiny85 or similar Atmel chip, and then upload your program to it is a preferred choice in this case.

Things needed:

Assembled, configured and running in less then an hour :)

Step 1: Prepare the Software

Download the windows driver for the USBasp programmer. Unzip and install running InstallDriver.exe;

Plug in the USBasp programmer and check for the driver if it is correctly installed;

Download and install ( or upgrade) the Arduino IDE;

Install ATTinyCore with Arduino IDE's board manager;

(For ATtiny13/13a an alternate core must be used - MicroCore by @MCUdude)

Choose the microcontroller to be programed.

Step 2: Programming...

Solder the header connector to the programming board;

The header is ISP compatible but two pins must be bended like in photo;

Connect all modules but the USB extender, place the microcontroller to be programed in the DIP socket (take care of the position, pin1 is left-upper in the photo) ;

Load a sketch, I am using for testing a 'blink' sketch like below:

// the setup routine runs once when you press reset:<br>void setup() {                
  // initialize the digital pin as an output.
  pinMode(1, OUTPUT);
// the loop routine runs over and over again forever:
void loop() {  
  digitalWrite(1, HIGH);     // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(1, LOW);      // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second

Plug in the USB cable and upload the sketch,

If everything is OK the upload will be finished without errors in the Arduino IDE and the LED from the programming module will start blinking.

Now everything is ready for uploading your own sketch.

Step 3: More Info

1 Hour Challenge

Participated in the
1 Hour Challenge