This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error 253

#include <reg52.h>
unsigned char chrState;
unsigned char chrDate[6];//year, month, date, hour, minute, second
unsigned char idata chrPlace;

void main()
{
unsigned char chrTemp;
do
{
do
{

}while(1);
switch (chrState)
{
case 1:
{
if (chrTemp<11)
{
switch (chrPlace)
{
case 8:
{
chrDate[0]%=10;
}
break;
case 7:
{
chrDate[0]/=10;
}
break;
case 6:
{
chrDate[1]%=10;
}
break;
case 5:
{
chrDate[1]/=10;
}
break;
case 4:
{
chrDate[2]%=10;
}
break;
case 3:
{
chrDate[2]/=10;
}
break;
case 2:
{
chrDate[3]%=10;
}
break;
case 1:
{
chrDate[3]/=10;
}
break;
case 16:
{
chrDate[4]%=10;
}
break;
case 15:
{
chrDate[4]/=10;
}
break;
case 14:
{
chrDate[5]%=10;
}
break;
case 13:
{
chrDate[5]/=10;
}
break;
default:
break;
}
}
}
break;
case 2:
{

}
break;
}
}while(1);
}

0