The Akafugu Blog

New version of the Microcontroller Reference Sheet with Arduino-tiny pinouts

FEB 02 2012

Microcontroller reference sheet

Get the newest version of the Microcontroller reference sheet here: Microcontroller reference sheet

It adds Arduino pinouts for the ATTiny2313/4313 as well as the ATTiny25/45/85 chips.

Update 2012.02.07: ATTiny24/44/84 added.

Arduino-tiny is a wonderful project that adds cores for a set of ATTiny processors to the Arduino IDE. It is available for download here: http://code.google.com/p/arduino-tiny/

An Arduino core is a set of low-level files that add support for a specific processor inside the Arduino IDE. The core takes care of things such as assigning digital pin numbers to the physical pins on the device, and mapping pins with PWM on them so that they can be used with analogWrite.

To use it, you’ll need one of the supported ATTiny chips: We tried with our favorite ATTiny chip, the ATTiny4313. (This chip is used in many of our products, such as the TWIDisplay ).

To make proper use of the Arduino IDE, you will need to know how the physical pins on the supported chips are assigned to Arduino digital pins. The only way to figure this out appears to be by having a look in the source code, which is a bit impractical, so we decided to update our reference sheet with the pin numbers.

The new version of the reference sheet has all the Arduino digital pin assignments printed alongside the AVR port number (which is what you use when you program the chip in low-level avr-gcc. For example, pin 11 on the ATTiny2313/4313 chip has PD6/D8 printed on it. To write to this pin in Arduino, use digitalWrite(8, HIGH).

The ATTiny2313/4313 has four PWM channels, all marked with an asterisk in the reference sheet: Pins D7/D11/D12/D13. The PWM for any of these channels can be activated by using analogWrite.

The Arduino-tiny cores are all set up to use an external programmer to program the chips (attached to the ISP header). There are boot loaders available for some ATTiny chips which would theoretically make it possible to program just using a FTDI serial adapter, but since these chips range from 2k to 8k in size, a bootloader will eat up a significant amount of space.

The ATTinyX61, another one of our favorites does not appear to have a core available yet, so it has not been changed in the reference sheet.