Digital Scale 1.0 Digital Scale

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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

  bin | The 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

  bin | The binary value.

Returns
  Packed BCD Value