Hi,
I have some weird going on. When the voltage_check value come to 220 the output shows 1% instead of the calculated 67%
I have both voltage_check , voltage_percent as var word
anybody knows why ? running on a 18F4550
Code:for i=215 to 230 voltage_check =i voltage_percent = (((voltage_check -179) * 1623 ) / 10 ) lcdout $FE,1, "Output"," ", dec (voltage_percent / 100) ,".", dec2 (voltage_percent // 100 ) lcdout $FE,$C0, "Ana4: ", dec voltage_check pause 500 next i
Bookmarks