I'm going to add a code snippet to that in one routine. Jerry Iacobucci wrote: > > How about this, > > Some code posted by Mr. FOURNIER > > char bin2bcd(char binary_value) > { > char retval; > if (binary_value > 99) > binary_value = 99; > > retval = (char) (((binary_value/10) << 4) | (binary_value % 10)); > return(retval); > > } > > char bcd2bin(char bcd_value) > { > char retval; > if (bcd_value > 99) > bcd_value = 99; if ((bcd_value & 0x0f) > 9) bcd_value = 99; // Handle: BCD low nibble out of range > > retval = ((bcd_value >> 4) * 10 ) + (bcd_value & 0x0f); > return(retval); > > } Mark -- I re-ship for small US & overseas businesses, world-wide. (For private individuals at cost; ask.)