Digital chips can’t do analog directly – you need an A/D converter for that, right?
Not so fast. Just as pulse-width modulation (PWM) can be used to turn a purely digital signal into a varying analog voltage, there are tricks to measure analog values as well.
All you need is the proper software, a simple analog comparator, and these components:
This week’s episode examines delta-sigma modulation and shows you how it’s done:
There’s in fact a little gem hidden inside those LPC8xx chips which allows implementing this without bogging down the µC. Just one interrupt whenever a measurement is ready. But the basic idea is applicable to any microcontroller with a built-in analog comparator.
(For comments, visit the forum area)