//-----***-16近制数据转化为BCD(单字节)-***-----//
unsigned char HexToBcd(unsigned char Bytedata)
{
unsigned char i,Byte; /*
i=0;
while(Bytedata>=0x0a)
{
Bytedata=Bytedata-0x0a;
i++;
}
Byte=16*i+Bytedata;
return Byte;
}
unsigned char HexToBcd(unsigned char Bytedata)
{
unsigned char i,Byte; /*
i=0;
while(Bytedata>=0x0a)
{
Bytedata=Bytedata-0x0a;
i++;
}
Byte=16*i+Bytedata;
return Byte;
}