I had some problem setting up a working ATTiny85 outside of its development board.
Connection on my breadboard:
pulled high (10K R) -- 1 PIN 8 -- VCC (+5V)
trouble here!! -- 2 PIN 7 --
-- 3 PIN 6 -- LED
GND -- 4 PIN 5 --
as you can guess pins are referred to actual chip's pins enumeration.
My simple test code:
void setup() {
pinMode(1, OUTPUT);
}
void loop() {
if (analogRead(A1) > 512) {
digitalWrite(1, HIGH);
delay(250);
digitalWrite(1, LOW);
delay(250);
} else {
digitalWrite(1, HIGH);
delay(1000);
digitalWrite(1, LOW);
delay(1000);
}
}
I'm using Arduino IDE v1.8.13 with digistump avrboards v1.6.7.
I flashed t85_default micronucleus v2.5 bootloader in my chip with fuses set to lfuse:0xe1, hfuse:0xdd, efuse:0xfe.
The problem is that if I power the chip with PIN2 not pulled high it won't start execution of the code, it won't blink. If it’s started from pulled high, it will start code about 5s after power on. If it’s started pulled low code won’t execute until is pulled high. As I pull high, even just for a second, PIN2 it will start blinking and executing code.
Is it normal? I think I have missed something.