Last active
March 29, 2016 05:13
-
-
Save raghavendrahassy/64c40290330c2e4edb6f to your computer and use it in GitHub Desktop.
This file contains 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
#include <avr/io.h> | |
#include <util/delay.h> | |
#define Relay PA0 | |
int main() | |
{ | |
/* Configure the port A0 as Output */ | |
DDRA = (1 << Relay); | |
while(1) | |
{ | |
PORTA = (1 << Relay);; /* Turn ON the Relay */ | |
_delay_ms(5000); | |
PORTA = (0 << Relay);; /* Turn OFF the Relay */ | |
_delay_ms(5000); | |
} | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment