I have the following circuit attached to my ATTiny13A. More specifically, attached to its PB1:
I'm doing this to initialize the port:
//init
DDRB |= (1<<DDB1); PORTB &= ~(1<<PB1);
//turn ON
PORTB |= (1<<PB1);
//turn OFF
PORTB &= ~(1<<PB1);
There is a 1 s CTC defined, which turns ON PB1 at startup + 6 s, and turns it off at startup + 10 s.
This works perfectly, until I attach some load to the OUTPUT (100 mA @ 5 V).
If I attach my load, it causes the AVR to either
- immediately reset after turning ON PB1
- hang after turning ON PB1, then reset by the WDT
Note 1: Q3 is a DMP3056LSD.
Note 2: The 5 V is provided by my computer via USB, and I also tried with a powerbank's USB. The 5 V was also checked with an oscilloscope, and it's rock solid, i.e. the voltage is not dropping below AVR's resetting voltage.
