I2C methods: refinement of hex2int