When I burn a program on AT89C2051 using WILLAR
, for example:
#include <reg51.h>
#define port P3
void delay(unsigned int);
void main(void)
{
for(;;)
{
port = 0x0;
delay(1000);
port = 0x0ff;
delay(1000);
}
}
void delay(unsigned int a)
{
unsigned int i;
unsigned int j;
for(i=0; i<a; i++)
for(j=0; j<120; j++);
}
It shows a message: The data out of range will be ignored
. But if I use port P1, instead of port P3, my program burns successfully.
Where is the problem?