Digital Scale  1.0
Digital Scale
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
bin2bcd.h File Reference

Go to the source code of this file.

Functions

unsigned long Bin4toBCD5 (uint16_t bin)
 Converts a 16 Bit Unsigned Binary to 5 Digit Packed BCD. More...
 
unsigned long Bin6toBCD8 (long bin)
 Converts a 24 Bit Unsigned Binary to 8 Digit Packed BCD. More...
 

Function Documentation

unsigned long Bin6toBCD8 ( long  bin)

Converts a 24 Bit Unsigned Binary to 8 Digit Packed BCD.

Parameters
binThe binary value. Top 8 bits are ignored.
Returns
Packed BCD Value
unsigned long Bin4toBCD5 ( uint16_t  bin)

Converts a 16 Bit Unsigned Binary to 5 Digit Packed BCD.

Parameters
binThe binary value.
Returns
Packed BCD Value