private static int IntToBCD(int i) //十进制转BCD
{
return (((i / 10) << 4) + ((i % 10) & 0x0f));
}
private static int BCDToInt(byte bcd) //BCD转十进制
{
return (0xff & (bcd >> 4)) * 10 + (0xf & bcd);
}