Hello friends,most pic voltmeters can display results with fractions,yet u can not enter fractions in code.For examlpe ,(movlw 1.2 will show error in am assembler,movlw 1,movlw 2 etc is correct.but pic voltmeters can display results like 12.7v,10.9v etc.How does this work.
Easy, use integers and keep track of the location of the decimal point. For example, if you need two decimals, let 12345 represent 123.45. Addition is straight forward, multiplication also with the complication that you get twice as many decimals in the result.