Code

img
#include <avr/io.h> #include <util/delay.h> /* Button click with software debounce */ int main(void) { DDRB |= 1 << PINB0; // set PINB0 as output PORTB ^= 1 << PINB0; // xor toggling only PORTB0 DDRB |= 1 << PINB2; // set PINB2 as output...

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.

This div height required for enabling the sticky sidebar
Ad Clicks : Ad Views : Ad Clicks : Ad Views :