Advertisement
6677

Untitled

Nov 27th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. /*
  2. * GccApplication2.c
  3. *
  4. * Created: 27/11/2014 14:36:13
  5. * Author: Callum
  6. */
  7.  
  8.  
  9. #include <avr/io.h>
  10. #include <avr/interrupt.h>
  11.  
  12. char contents = 0xAA;
  13.  
  14. int main(void)
  15. {
  16. DDRA = 0xFF;
  17. DDRD = 0x00;
  18. EICRA = 0x01;
  19. EIMSK = 0x01;
  20. PORTA = contents;
  21. sei();
  22. while(1)
  23. {
  24. //TODO:: Please write your application code
  25. }
  26. }
  27.  
  28. ISR(INT0_vect) {
  29. contents = ~contents;
  30. PORTA = contents;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement