/*一个十六进制转十进制的函数*/
unsigned long HexToDec(unsigned int Hex)
{
unsigned char i, j;
unsigned char tt[6];
unsigned long tem=0;
for(i=0;; i++)
{
tt[i] = Hex%10;
Hex = Hex/10;
if(Hex == 0)
{
break;
}
}
for(j=0; j<=i; j++)
{
tem = tem*16 + tt[i-j];
}
return tem;
}
/*如果你有更好的代码一定要通知我*/