/*
ATtiny10
From powerup, wait about 3 seconds.
Then produce a single 250mS pulse on PB0
┌──────┐
PB0 ─┤o ├─
0v ─┤ATtiny├─ +5v
─┤ 10 ├─
└──────┘
*/
#include <avr/sleep.h>
void delay (long milliseconds) {
for (volatile long i = 23 * milliseconds; i>0; i--);
}
void setup () {
delay (3000); // Wait for target system to boot
DDRB = 1; // PB0 as an output
PORTB = 0b0000; // PB0 digitalWrite(0, LOW)
delay (250); // Wait
PORTB = 0b0001; // PB0 digitalWrite(0, HIGH)
DDRB = 0; // PB0 as an input and therefore tristate
SMCR = 0b0101; // Set Sleep register Power-down, Sleep Enable
sleep_cpu(); // CPU and clock off
}
void loop () {
}
Before you say, why don't you just use a 555 or a CPU Supervisor chip.
From power-up, this waits 3 seconds then produces a low 250mS pulse.
No external components required.
The ATtiny10 was programmed using a USBasp Programmer
The Arduino IDE 1.8.19
Using this add on https://github.com/technoblogy/attiny10core