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
int led = 13; | |
void setup() { | |
// initialize the digital pin as an output. | |
pinMode(led, OUTPUT); | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) | |
delay(1000); // wait for a second | |
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW |
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
/* | |
/* | |
* GccApplication28.c | |
* | |
* Created: 3/24/2016 10:39:50 AM | |
* Author: prasant | |
*/ | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) |
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
#ifndef F_CPU | |
#define F_CPU 1000000UL | |
#endif | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRA=0b00000001; | |
while(1) |
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
#ifndef F_CPU | |
#define F_CPU 1000000UL | |
#endif | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRA=0x01; | |
while(1) |
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
#ifndef F_CPU | |
#define F_CPU 1000000UL | |
#endif | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRA|=(1<<PINA0); |
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
#ifndef F_CPU | |
#define F_CPU 1000000UL | |
#endif | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRA|=(1<<PINA0); | |
while(1) |
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
/* | |
The following blink LED program will blink the LEDs first from PC.0 to PC.7 and then from PC.7 to PC.0 | |
*/ | |
# define F_CPU 1000000UL | |
#include<avr/io.h>//calling header file avr input & output | |
#include<util/delay.h>//calling delay header file | |
int main(void) | |
{ | |
DDRC=0B11111111; //PORTB as OUTPUT |
OlderNewer