Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <avr/io.h>
  2. #include <util/delay.h>
  3. #include "MKUART/mkuart.h"
  4. #include <avr/interrupt.h>
  5.  
  6. #define LED_PIN (1<<PA0)
  7. #define LED_ON PORTA &= ~LED_PIN
  8. #define LED_OFF PORTA |= LED_PIN
  9. #define LED_TOG PORTA ^= LED_PIN
  10.  
  11. int main(void)
  12. {
  13. DDRA |= LED_PIN;
  14. PORTA =0x00;
  15. USART_Init( __UBRR );
  16. sei();
  17.  
  18. while(1)
  19. {
  20. if(0x0000000){
  21. LED_ON;
  22. }else{
  23. LED_OFF;
  24. }
  25.  
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement