ATtiny Programming Shield for Arduino TYWu
Reference Programming-Shield-for-Arduino-1/
Introduction This little circuit sits nicely ontop of an Arduino board Let you quickly plug in an ATtiny chip for programming using the Arduino "language" and IDE to write the code The Arduino board as an ISP programmer to upload the code to the tiny chip.
Step 1: Materials and Tools
Materials - Perforated circuit board - Male and female headers - Wire - 10uF capacitor - Arduino Uno - ATtiny85
Step: Materials and Tools Tools - Cutter knife - Cutting mat - File - Wire cutters and stripper - Soldering iron - Helping hand
Step: Solder Circuit Wiring your ISP connection ATtiny Arduino Pin PB2 (SCK) Pin 13 Pin PB1 (MISO) Pin 12 Pin PB0 (MOSI) Pin 11 Pin PB5 (Reset) Pin 10 Plus (VCC) V Minus (GND) GND 10uF Capcitor: Arduino pins: RESET ----||---- GND
Step: Solder Circuit Picture
Step: Solder Circuit Reference Picture
Step: Setup Arduino IDE Locate your Arduino sketchbook folder (you can find its location in the preferences dialog in the Arduino software) Create a new sub-folder called “ hardware ” in the sketchbook folder, if it doesn ’ t exist already. Copy the “ attiny ” folder (not the containing attiny- ide-1.6.x or attiny-1.0.x folder) from the unzipped ATtiny.zip to the “ hardware ” folder.
Step: Setup Arduino IDE File Preferences
Step: Setup Arduino IDE You should end up with folder structure like Documents > Arduino > hardware > attiny > avr that contains the file boards.txt and another folder called variants. For Arduino 1.0.x, the boards.txt and other files will be directly in the attiny folder, with no avr sub-folder.
Step: Setup Arduino IDE Example
Step: Setup Arduino IDE For Arduino 1.0.x, use the ide-1.0.x branch: ee/ide-1.0.x ee/ide-1.0.x For Arduino 1.6.x, use the ide-1.6.x branch: ee/ide-1.6.x ee/ide-1.6.x
Step: Setup Arduino IDE Snapshot
Step: Upload your program! Upload “ ArduinoISP ” to your Arduino –Open “ ArduinoISP ” sketch from “ Examples ” folder –Select “ Arduino Uno ” from the “ Tools > Board ” menu –Upload sketch
Step: Insert Solder Circuit
Step: Burn Bootloader Burn Bootloader –To set the clock speed of your ATtiny to be faster (8Mhz) than the default 1 MHz. - Select “ ATtiny85 (8 MHz) ” from the “ Tools > Board ” menu - Select “ Arduino as ISP “ from the “ Tools > Programmer ” menu - Select “ Burn Bootloader ” from the “ Tools ” menu
Step: Burn Bootloader Picture
Step: Burn Bootloader Picture
Step: Burn Bootloader Picture
Step: Upload your program Writing a Sketch for the ATtiny Uploading a Sketch to the ATtiny –Open the sketch you want to upload to ATtiny –Select “ ATtiny85 (8 MHz) ” from the “ Tools > Board ” menu ” –Select “ Arduino as ISP “ from the “ Tools > Programmer ” menu –Upload sketch
Quick Reference ny_QuickRef.pdf
ATtiny85 Pinout
Example One int blinkPin = 0; void setup() { pinMode(blinkPin, OUTPUT); } void loop() { digitalWrite(blinkPin, HIGH); delay(500); digitalWrite(blinkPin, LOW); delay(500); }
Arduino Llibrary Support pinMode() digitalWrite(), digitalRead() analogRead(), analogWrite() shiftOut() pulseIn() millis() micros() delay() delayMicroseconds() SoftwareSerial (has been updated in Arduino 1.0) Not Serial
Reference