Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 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")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement