BCD to Decimal Conversion



  • Hi
    I was extremely happy to see the MODBUS module released, and this is working well for me. Thanks Pycom team!

    I have now another hurdle, which I dont seem to overcome. The data I am getting from the controller is in integer BCD format. I need to be able to convert this to its decimal value, but I dont seem to be able to crack it, and cant find anything on the internet.

    Does anyone by any chance have a snippet of code, or know how this can be done? Any help would be appreciated.

    Thanks
    Brad


Log in to reply
 

Pycom on Twitter