I feel like a bit of a n00b posting this, so please direct me to another posting if required...
I wanted to play with my Attiny85 chip, and managed to get the Blink sketch running fine:
Note the minimal number of parts (processor, LED, resistor).
But to program it I fetched out my AVR Dragon, and followed the diagram for High Voltage Serial Programming (7 wires), like this:
Now that all worked fine, but I wonder if there is an easier way? I read this, not sure if this is what I want or not:
http://arduino.cc/forum/index.php/topic,51984.0.html
I presume there are a number of ways it could be programmed:
- With an external programmer, as I have done
- Using SPI (inline serial programming) if I break out the SPI lines to a header
- Using serial if there is a bootloader on the chip (probably not, huh?)
The sketch compiled fine, I'm not sure where I got the Attiny stuff from, probably Coding Badly.
const byte LED = 4;
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(LED, LOW); // set the LED off
delay(1000); // wait for a second
}
And to prove to myself that it wasn't a fluke, I programmed in the "Blink Two LEDs, independent, no delay" sketch, and that also worked (using pins 3 and 4 as the LEDs).
So my question really is, what is the recommended/simplest way of programming the thing?