All pastes #772225 Raw Edit

Unnamed

public c v1 · immutable
·published 2007-11-13 17:24 UTC
rendered paste body
#include <avr/io.h>#include <avr/interrupt.h>#include <stdint.h>SIGNAL(SIG_INTERRUPT0){        uint8_t port = PINA;        if(port==1){                PORTD ^=(1<<PD5);        }        else{                PORTD ^=(1<<PD6);        }}int main(void){        GICR=0xC0;        MCUCR=0x01;        sei();        DDRD |= (1<<PD6)|(1<<PD5);        DDRA = 0x00; //alla pinnar i porta som input riktning        PORTD |= (1 << PD2);        PORTA = 0x00; //pullup 0  pa alla pinnar        while (1) {        }        return 0;}