//*CREATED BY KRISHNARAJSINH A JADAV *//
//*LED TOGGLE *//
//*TESTED OK*//
#include
sbit p=P0^1; // LED IS CONNECTED WITH PORT 0 AND PIN 1
void delay(int); // DECLARATION OF DELAY FUNCTION
main()
{
while(1);
{
p=0; // LED IS OFF
delay(20000); // INTRODUCE DELAY FOR WHICH LED REMAIN OFF
p=1; // LED IS ON
delay(20000); // INTRODUCE DELAY FOR WHICH LED REMAIN ON
}
}
void delay(int d) // DELAY FUNCTION
{
int i;
for(i=0;i
}
//*LED TOGGLE *//
//*TESTED OK*//
#include
sbit p=P0^1; // LED IS CONNECTED WITH PORT 0 AND PIN 1
void delay(int); // DECLARATION OF DELAY FUNCTION
main()
{
while(1);
{
p=0; // LED IS OFF
delay(20000); // INTRODUCE DELAY FOR WHICH LED REMAIN OFF
p=1; // LED IS ON
delay(20000); // INTRODUCE DELAY FOR WHICH LED REMAIN ON
}
}
void delay(int d) // DELAY FUNCTION
{
int i;
for(i=0;i
}
No comments:
Post a Comment