Embedded Systems Tutorial
Basic Embedded C Programs in PIC16F877A,ATMEGA32L,ARM(LPC2129/38)....and simple projects
Labels
ARM7(LPC2129/38)
ATMEGA32L
PIC16F877A
Simple Projects
Tuesday, 29 September 2015
Program to Blink PORTC when TIMER0 overflows....
#include<pic.h>
void delay(int);
void main()
{
TRISC=0X00;
OPTION=0X07;
TMR0=0X00;
while(TMR0IF==0);
while(1)
{
PORTC=0XFF;
delay(10);
PORTC=0X00;
delay(10);
}
}
void delay(int k)
{
int j,i;
for(i=0;i<k;i++)
for(j=0;j<1000;j++);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment