Created
September 2, 2015 02:20
-
-
Save Jack2/89e9c10e415f6feb196f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* KEY_SNIFF.c | |
* | |
* Created: 2015-02-25 오후 2:48:34 | |
* Author: Jaeki | |
*/ | |
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
ISR(INT0_vect) | |
{ | |
PORTA = 0xff; | |
} | |
int main(void) | |
{ | |
DDRA = 0xff; | |
//DDRC = 0xff; | |
//PORTA = 0x00; | |
//PORTC = 0xff; | |
cli(); //초반에 인터럽트를 초기화 해준다. | |
EIMSK = 0b00000001; | |
EICRA = 0b00000010; | |
EIFR = 0b00000000; | |
sei(); | |
while(1){ | |
printf("Wait your SIGNAL\n") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment