Skip to content

ATtiny microcontroller support for the Arduino IDE

Notifications You must be signed in to change notification settings

provideyourown/attiny

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

Arduino for ATtiny
==================
By Scott Daniels (ProvideYourOwn.com)
Based on Arduino attiny support by David A. Mellis.

This package adds pinout files for most ATtiny variants as well as some board configurations.

Currently supported chips are:

8 pins: ATtiny13 w/modifications to wiring.c - see below
8 pins: ATtiny45/85
14 pins: ATtiny44/84
20 pins: ATtiny87/167 - untested
20 pins: ATtiny2313/4313 - untested
20 pins: ATtiny261/461/861 - untested




Usage
-----
cd /path/to/my/sketchbook
mkdir hardware
cd hardware
git clone http://github.com/provideyourown/attiny ./

(Re)Launch the Arduino IDE. Supported chips will be shown in the "Tools->Board" menu.
Choose the appropriate configuration.
Choose the ISP programmer used.
Upload your sketch.

Customizing
-----------
Open in text editor ...sketchbook/hardware/attiny/boards.txt
Find a board configuration to copy or modify; save file. Relaunch ArduinoIDE

IMPORTANT: Change to ArduinoIDE_library/Print.h file:
--------------------------
The Print.h file in the Arduino library contains a #define conflict with certain ATtiny chips
in the AVR library. Open for editing this file:

<ARDUINO_DIR>/hardware/arduino/cores/arduino/Print.h

And change this line from:

#define BIN 2

to:

#define BINARY 2

It may be possible and preferable to copy the Print.h file to the ATtiny hardware directory
instead of changing the default Arduino one.



Using with ATtiny13 series
--------------------------

NOTE: A change must be made to the wiring.c file in the arduino core for this to work correctly. 
The wiring.c file has an error where it does not set the correct TIMER for ATTiny13 only. 
This change will not impact any other boards.

In arduino/hardware/arduino/cores/arduino/wiring.c:

  Line 44 should be supplemented with an additional condition for ATtiny13
  #if defined(__AVR_ATtiny24__) || defined(..) ... [Add this] || defined(__AVR_ATtiny13__)
  SIGNAL(TIM0_0VF_vect)

For more info on using the ATtiny13 series, see:
  http://tekstop.wordpress.com/2011/12/30/programming-attiny13-using-arduino-isp-and-all-the-hacking-involved/
 

About

ATtiny microcontroller support for the Arduino IDE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%