Need help with wiring for a 5v digital meter using RCTIME on the propeller
eagletalontim
Posts: 1,399
I am designing a program that will display the voltage value on an LCD but the problem I have run into is I have no idea how to get this to properly read from 0 to 5 volts. Since the RCTIME function in the BS2 functions file returns a byte value, it can only go to 255. For some reason, as soon as the voltage gets around 1.5 volts, it maxes out the byte variable and "hangs" till the voltage drops below the "limit point". Can someone help me get this wired up correctly?
The way I have it wired up is attached to this document.
The way I have it wired up is attached to this document.
bmp
385K
Comments
Try a higher input resistor, something like 680K with a 0.01uF capacitor. You'd get a charge time to a 1.6V threshold somewhere around 1200us with a 5V input which would give you an RCTIME result of 1200. Lower input voltages would take longer and give you a higher value.