Code
An AVR external interrupt example #include<avr/io.h> #include<avr/interrupt.h> // interrupt header file #include<util/delay.h> /** External Interrupt Program */ // Interrupt service Routine for INTO ISR(INT0_vect) { //_delay_ms(50); // Software Debounce.
Another example for the OpenM128 AVR development board here, we will look at the onboard buttons and LEDs again. As stated in a previous article the development board has 8.
In this example we connect a piezo buzzer to PB0 of our Attiny13a. We use mikroC pro for AVR which has a built in sound library to play a tone.