Skip to content

Instantly share code, notes, and snippets.

@SaheblalBagwan
Last active February 4, 2016 11:39
Show Gist options
  • Save SaheblalBagwan/a671ac5b9c722f350a9d to your computer and use it in GitHub Desktop.
Save SaheblalBagwan/a671ac5b9c722f350a9d to your computer and use it in GitHub Desktop.
#include <avr/io.h>
#include <util/delay.h>
int main()
{
DDRC = 0xff; // Configure PORTC as output
while(1)
{
PORTC = 0xff; // Turn ON all the Leds connected to PORTC
_delay_ms(100); // Wait for some time
PORTC = 0x00; // Turn OFF all the Leds connected to PORTC
_delay_ms(100); // Wait for some time
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment