Wednesday, February 12, 2014

ATtiny85 Programmer Shield

I started working with the ATTiny85 chip and needed a better way to program it.  An UNO compatible shield seemed to be the easiest way.  I ended up making two shields.

The first shield was very basic and only had an 8 pin socket and the connectors so that it plugged into the UNO.  The perfboard was just large enough to seat an 8 pin socket and connect to the UNO using the shield footprint.  The shield did not have indicators for the programming process or the state of the UNO, and it did not have an ICSP connector.

The second shield has a larger perfboard, LEDS to indicate UNO heartbeat, programming state, and errors.  The next option to install and test is the ICSP connector.  I would like to be able to plug in and use my USBTinyISP into the shield without it being installed on the UNO.

I installed an ICSP connector on the board. This really makes it easier to upload code to the attiny.  If the ICSP connector is used, the UNO is not needed to upload code or provide power.  When using the USBtinyISP programmer with this shield, install its power jumper to provide power to the target.  In the Arduino IDE, select USBtinyISP as the Programmer, select the correct board option for the Attiny, load/modify sketch, the select Upload using Programmer.




1st Shield schematic


1st shield wired and ready for use

1st shield wiring side of perfboard

1st shield installed and working, but no way to see that except by looking at Arduino IDE

2nd shield wiring schematic

All the components for the 2nd shield

Testing connecter to board fitment

All components installed 2nd shield, except ICSP connector

Wiring side, 2nd shield

Installed on UNO and running

Added ICSP connector

ICSP wiring side


Added a red stripe to make it easy to orient ICSP plug

Tuesday, February 4, 2014

ATTINY85 MCU

Received two ATTINY85 chips in the mail today.  Did a little internet research and found an easy way to program this type of chip with the Arduino IDE 1.05 and an UNO.


First download this archive, https://github.com/damellis/attiny/archive/master.zip
If there already isn't a hardware folder in the sketches folder, create it and then copy the attiny folder to the hardware folder.

Wire the UNO to the attiny85 on a breadboard with the following connections, or just build a mini shield to fit the UNO.
Attiny85 to Arduino Uno wirinG

Updated schematic with LEDs and ICSP connector

I put the 3 LEDs on a breadboard and jumpered them to the attiny shield.  The LEDs worked like they should, and did not interfere with the programming.  The next thing to check is ICSP programming


Attiny Pinout Reference

I created a mini shield to make it easier to program the ATTINY85 chip.  I used the above listed connections, couple of headers and a small perfboard.
 




Pix of the Arduino IDE for programming the Attiny



First load this sketch on the UNO

Then select the Attiny board type to be programmed


Select the Programmer type


Load a sketch.  You might see this error, but this particular error is not a problem.


Sketch load success, 2 leds set to blink



Sketch load success, 2 leds set to blink




Links to aid in programming Attiny

http://www.arvydas.co.uk/2012/09/using-usbtinyisp-to-program-attiny45-and-attiny85/
http://provideyourown.com/2011/arduino-program-attiny/
http://code.google.com/p/arduino-tiny/
http://highlowtech.org/?p=1695