summaryrefslogtreecommitdiff
path: root/src/lpc/ao_adc_lpc.c
Commit message (Collapse)AuthorAge
* altos/lpc: Stop using burst mode for LPC ADCKeith Packard2013-08-25
| | | | | | | | | | | | | Burst mode doesn't stop after one round of conversions, so we end up getting incorrect values in whatever the last conversion register is. Just use single conversions and take an interrupt per channel. Also, slow down the ADC so that our values are more stable -- just need to make sure we get the whole conversion sequence done 100 times a second. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Get rid of ADC filterKeith Packard2013-06-17
| | | | | | | Now that the source of the Vcc noise has been identified, remove the unnecessary ADC filtering. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Filter ADC inputsKeith Packard2013-06-15
| | | | | | | They're amazingly noisy on EasyMini, so just filter them as the only thing we use them for is battery and pyro numbers. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Make ADC inputs workKeith Packard2013-06-15
| | | | | | | They're still very unstable (bouncing around a lot), but at least they seem to report useful stuff now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Pull ADC data from the correct registersKeith Packard2013-05-19
| | | | | | | | Was just stepping through register space arbitrarily, which would have worked for EasyMini, but might have failed later if the ADC pin usage wasn't consecutive. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Add ADC driverKeith Packard2013-05-18
Uses burst mode to get the whole set of values in one interrupt Signed-off-by: Keith Packard <keithp@keithp.com>