MakeBCD()
Action
Convert a variable into its BCD value.

Syntax
var1 = MAKEBCD(var2)

Remarks

var1 Variable that will be assigned with the converted value.
Var2 Variable that holds the decimal value.
When you want to use an I2C clock device, which stores its values as BCD values you can use this function to convert variables from decimal to BCD.
For printing the bcd value of a variable, you can use the BCD() function.


See also
MAKEDEC BCD()


Example


Dim a As Byte
a = 65
LCD a
Lowerline
LCD BCD(a)
a = MakeBCD(a)
LCD " " ; a
End