this program will help you to know how make a port pin high and low and how to use delay in 8051 embedded c programming......all the best.
/*
developed by S4silver
license type - open source
created on - 11/12/2014
modified on - 11/14/2014
modification details - refactored
developer - Frank Hust Jincson
contact mail id - silverembeddedsolutions@gmail.com
web link - http://s4silver.blogspot.in/p/programmers-colony.html
*/
#include <REGX51.H>
main()
{
unsigned int i,j;
P0=P1=P2=P3=0x00;
while(1)
{
P0=P1=P2=P3=0x55;
for(i=0;i<63000;i++);
P0=P1=P2=P3=0xAA;
for(i=0;i<63000;i++);
}
}
No comments:
Post a Comment