diff options
Diffstat (limited to 'avr-attiny25-ampli-wakeup-delay/main.c')
-rw-r--r-- | avr-attiny25-ampli-wakeup-delay/main.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/avr-attiny25-ampli-wakeup-delay/main.c b/avr-attiny25-ampli-wakeup-delay/main.c new file mode 100644 index 0000000..6fb530e --- /dev/null +++ b/avr-attiny25-ampli-wakeup-delay/main.c @@ -0,0 +1,23 @@ +#include <avr/io.h> +#include <util/delay.h> + +int main(void) +{ + /* PB4 output */ + DDRB |= _BV(4); + PORTB &= ~_BV(4); + + //for (;;) + //{ + // _delay_ms(1000); + // PORTB ^= _BV(4); + //} + + // wait for 45s and enable the amplifier + for (uint8_t i = 0; i < 32; ++i) { + _delay_ms(1000); + } + PORTB |= _BV(4); + + return 0; +} |