Skip to content

Instantly share code, notes, and snippets.

@pilinux
Created February 13, 2016 10:55
Show Gist options
  • Save pilinux/e41d1764185de3bd08e6 to your computer and use it in GitHub Desktop.
Save pilinux/e41d1764185de3bd08e6 to your computer and use it in GitHub Desktop.
AVR C Lab 1
/*
* lab1.c
*
* Created: 12/23/2015 6:18:56 PM
* Author : mahir
*/
#include <avr/io.h>
int main(void)
{
DDRD = 0xff; // Set all Port D pins as outputs
DDRC = 0xff; // Set all Port C pins as outputs
PORTD = 0xFF; // Set all Port D pins as HIGH
PORTC = 0x00; // Set all Port C pins as LOW
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment