The one I have![]()
The one I have![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Not expecting an answer from Steve because he should have collected his winnings by now
For everyone else; I want to track when a switch (which is in an existing circuit) is pressed and was hoping to use the same approach. The problem is the voltage is 0.7V when push to make switch is open and 0V when closed and that doesn't appear to be enough of a range.
ADC, comparator?!? Arwe you sure it's just not a sort of open collector output you have on hand? What if you attach a pull up resistor to it.
In meantime i'll count my millions![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Not sure what you are trying to do but 0.7v is quite low
but if that's what you are measuring and assuming its the correct voltage why not fed it via an op amp then adc
the adc is capable to do the job without the opamp in this specific case though.
(0.7/5)*1023=143
(0.7/5)*255=36
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Probably better for you to define track for your "0.7V" being presented to the PIC....
1. Immediately being notified when the switch is pressed? - use a comparator with PIC's comparator interrupt.
2. hopefully catching someone pressing a switch while polling the ADC Result very frequently? - use ADC and a tight main loop.
Bookmarks