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> | |
int main() | |
{ | |
DDRC = 0xff; // Configure PORTC as output to connect Leds | |
DDRA = 0x00; // Configure PORTA as INput to connect switches | |
PORTA = 0xff; // Enable The PullUps of PORTA. | |
while(1) | |
{ | |
PORTC = PINA; // Read the switch status and display it on Leds |
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> | |
int main() | |
{ | |
DDRC = 0xff; // Configure PORTC as output | |
while(1) | |
{ | |
PORTC = 0xff; // Turn ON the Buzzer conneted to PORTC |
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> | |
int main() | |
{ | |
char count = 0; | |
DDRC = 0xff; // Configure PORTC as output | |
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
#include <avr/io.h> | |
#include <util/delay.h> | |
int main() | |
{ | |
char count = 1; | |
DDRC = 0xff; // Configure PORTC as output | |
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
#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 |
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> | |
int main() | |
{ | |
DDRC = 0xff; // Configure PORTC as output to connect Buzzer | |
DDRA = 0x00; // Configure PORTA as Input to read the switchs | |
PORTA = 0xff; // Enable The PullUps of PORTA. | |
while(1) | |
{ | |
PORTC = PINA; // Read the switch status and Turn ON/OFF the Buzzer |
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 "LPC17xx.h" | |
#include "rtc.h" | |
#include "lcd.h" | |
int main() | |
{ | |
rtc_t rtc; | |
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 <lpc17xx.h> | |
void delay(unsigned int count) | |
{ | |
unsigned int i,j; | |
for(i=0;i<count;i++) | |
{ | |
for(j=0;j<5000;j++); | |
} | |
} |
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 <lpc17xx.h> | |
void delay(unsigned int count) | |
{ | |
unsigned int i,j; | |
for(i=0;i<count;i++) | |
{ | |
for(j=0;j<5000;j++); | |
} | |
} |
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 <lpc17xx.h> | |
void delay_ms(unsigned int ms) | |
{ | |
unsigned int i,j; | |
for(i=0;i<ms;i++) | |
for(j=0;j<20000;j++); | |
} |
OlderNewer