futz
Active Member
The 18F's I've looked at (18F248 and 18F1320) have a Low-Voltage Detect module. My clock/thermometer uses the 248, so I think I'll experiment with that. My test breadboard with 16F876 doesn't have the LV Detect module, so I did it with A/D.When I was working on the magic switchboard I intended to use the ADC to detect if the bulbs were out of circuit. Mike/Pommie (i think) showed me that I could do without the ADC.
Could the same be true here? You are not interested in the voltage in an analog sense. Only true above or false below. By setting up the voltage divider correctly you should be able to get the 1 to zero transition to happen at the voltage you are interested in.
If it works it would be handy on a uC with no ADC. Not having to wait on the ADC would give you just a bit more time.
Could probably do it with a comparator too.