Use the 16F628A's COMPARATORS, this is exactly what they can be used for...
Many years ago, I did a Comparator tutorial on the piclist, a link to the archive where it can be found is here...
http://list.picbasic.com/forum/messa...tml?1020960642
By configuring the internal Voltage Reference Module (Datasheet secion 11), you can detect voltages as low as around 208mV, by using two Resistors (Potential Divider from 5v rail) as external Reference, you can get even lower. See the Datasheet (Table 17-2) for the Comparator Specification for exactly how low. Theoretically by setting the Reference to 0v you might be able to detect a positive going voltage as low as 10mV, though I haven't tried that.
Bookmarks