mausami kumari
New Member
the compiler is generating the hex file of 1KB
my program is-
// Coding (MAIN):
the compiler is showing 0 errors and 0 warning
if the hex file is being created properly, please send it to my <email address deleted - Moderator>
Please reply soon
Its URGENT
Moderator note:
e-mail addresses in plain view on the forum are an invitation to spammers.
Use the Conversation system for initial one to one communication.
my program is-
// Coding (MAIN):
C:
#include<reg51.h>
sbit in=P1^1;
sbit out=P1^2;
sbit LED=P2^0;
void delay_msec(int);
void main()
{
int count=0;
in=1;
out=1; ////// declaring ‘in’ and ‘out’ as input
LED=0;
while(1)
{
if(in==1)
{
while(!out){}
count++;
LED=1;
delay_msec(1000);
}
if(out==1 && count)
{
while(!in){}
count--;
delay_msec(1000);
if(!count)
LED=0;
}
}
}
// Coding (delay.h):
void delay_msec(int time)
{
int i=0;
while(i<time)
{
TMOD=0x10;
TH1=0xfc;
TL1=0x66;
TR1=1;
while(TF1==0);
{
TR1=0;
TF1=0;
i++;
}
}
}
if the hex file is being created properly, please send it to my <email address deleted - Moderator>
Please reply soon
Its URGENT
Moderator note:
e-mail addresses in plain view on the forum are an invitation to spammers.
Use the Conversation system for initial one to one communication.
Last edited by a moderator: