Hi all,
I am trying to upload a simple sketch below to my ATiny85. I am using a UNO as ISP programmer. The IC programs and operates fine i.e LED connected to each output, flash in turn. When I come to reflash the code either with the same or another code, it does not allow programming or the bootloader to be burnt again. I have not used the physical pin 1 for anything as it is the RESET pin and other online posts report it should be avoided. I can run different sketches that I created in the past that can be re-flashed many times over using a fresh IC.
I don’t require this code for anything, just trying to learn what is happening. Thanks in advance!!
ATtiny85
-------u-------
RST - A0 - (D 5) --| 1 PB5 VCC 8 |-- +5V
| |
A3 - (D 3) --| 2 PB3 PB2 7 |-- (D 2) - A1 -->
| |
A2 - (D 4) --| 3 PB4 PB1 6 |-- (D 1) - PWM -->
| |
Gnd ---| 4 GND PB0 5 |-- (D 0) - PWM -->
*/
int pin2 = 3;
int pin3 = 4;
int pin5 = 0;
int pin6 = 1;
int pin7 = 2;
void setup()
{
pinMode (pin2, OUTPUT);
pinMode (pin3, OUTPUT);
pinMode (pin5, OUTPUT);
pinMode (pin6, OUTPUT);
pinMode (pin7, OUTPUT);
}
void loop()
{
digitalWrite (pin2, HIGH);
delay(100);
digitalWrite (pin2, LOW);
digitalWrite (pin3, HIGH);
delay(100);
digitalWrite (pin3, LOW);
digitalWrite (pin5, HIGH);
delay(100);
digitalWrite (pin5, LOW);
delay(100);
digitalWrite (pin6, HIGH);
delay(100);
digitalWrite (pin6, LOW);
digitalWrite (pin7, HIGH);
delay(100);
digitalWrite (pin7, LOW);
}

