User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
639
LongIntToHex
Prototype
void LongIntToHex(long int input, char *output);
Description Converts input number to a string containing the number’s hexadecimal representation. The output
string has xed width of 9 characters including null character at the end (string termination).
Parameters - input: signed long integer number to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 9 characters in length.
Example
long int jj = -2147483648;
char txt[9];
...
LongIntToHex(jj, txt); // txt is “80000000”
Notes None.
Dec2Bcd
Prototype
unsigned short Dec2Bcd(unsigned short decnum);
Description Converts input unsigned short integer number to its appropriate BCD representation.
Parameters - decnum: unsigned short integer number to be converted
Returns Converted BCD value.
Requires Nothing.
Example
unsigned short a, b;
...
a = 22;
b = Dec2Bcd(a); // b equals 34
Notes None.