It's possible to transfer your Arduino sketches on ATtiny85 by using Arduino Uno (in this example) as ISP programmer.
Setup:
- Upload "ArduionISP" sketch (which is found in default Arduino examples) in to your Arduino. Now it became programmer, than do the connection below.
- Download ATtiny board definitions and install like; Documents > Arduino > hardware > attiny > avr
- Select
- Tools->Board->ATTiny
- Tools->Clock->8Mhz (internal)
- Tools->Processor->ATTiny85
- Tools->Programmer->Arduino as ISP
Connections:
[themify_box style="light-blue shadow" ]
- Arduino +5V ---> ATtiny Pin 8
- Arduino Ground ---> ATtiny Pin 4
- Arduino Pin 10 ---> ATtiny Pin 1
- Arduino Pin 11 ---> ATtiny Pin 5
- Arduino Pin 12 ---> ATtiny Pin 6
- Arduino Pin 13 ---> ATtiny Pin 7
[/themify_box]
1 2 3 4 5 6 7 8 9 10 11 12 |
void setup() { // initialize digital pin 0 as an output. pinMode(0, OUTPUT); } void loop() { digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level) delay(100); // wait for a second digitalWrite(0, LOW); // turn the LED off by making the voltage LOW delay(100); // wait for a second } |
Some resources about the same work:
http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/
https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/attiny85-use-hints