How to make analog sensor readings with digital I/O pins

Edward Mallon wrote an article describing a technique he used to make analog sensor readings with digital I/O pins:

Will this method replace our pin-toggled oversampling? Perhaps not for something as simple as a thermistor since that method has already proven itself in the real world, and I don’t really have anything better to do with A6 & A7. And oversampling still has the advantage of being simultaneously available on all the analog inputs, while the ICU is a limited resource. Given the high resolution that’s potentially available with the Timer1/ICU combination, I might save this method for sensors with less dynamic range. I already have some ideas there and, of course, lots more testing to do before I figure out if there are other problems related to this new method. I still haven’t determined what the long-term drift is with our Pro Mini clones, and the WDT experiment taught me to be cautious about counting those chickens.

See the full post at thecavepearlproject.org.

Leave a Reply

Your email address will not be published. Required fields are marked *