how to read BCD code from serial port