mikroC
mikroC - C Compiler for Microchip PIC microcontrollers
making it simple...
Prototype | unsigned short Dec2Bcd(unsigned short decnum); |
|
|
Returns | Returns converted BCD value. |
|
|
Description | Converts |
|
|
Example | unsigned short a; |
| ... |
| a = Dec2Bcd(52); // equals 0x52 |
|
|
Prototype | unsigned Bcd2Dec16(unsigned bcdnum); | |
|
| |
Returns | Returns converted decimal value. | |
|
| |
Description | Converts | |
|
|
|
Example | unsigned a; |
|
| ... |
|
| a = Bcd2Dec16(1234); | // equals 4660 |
|
|
|
Prototype | unsigned Dec2Bcd(unsigned decnum); | |
|
|
|
Returns | Returns converted BCD value. |
|
|
| |
Description | Converts | |
|
|
|
Example | unsigned a; |
|
| ... |
|
| a = Dec2Bcd16(4660); | // equals 1234 |
|
|
|
page |
|
302 | MikroElektronika: Development tools - Books - Compilers |
|