I've got some interesting test code running. It samples and averages the ADC inputs during the timer interrupt. I scan each input every 32 mS. Each input is scanned in an interleaved fashion. Since the timer interrupts at 1 mS intervals, every 8th interrupt I sample a different input. I save the previous samples and calculate an average over the last 8 samples and store this into a circular buffer. To retrieve the latest average, you access the buffer at the current pointer value. I'm not sure if this is fast enough of an update. I have a simple loop through code that simply takes the current average and outputs it to the DACs. The outputs are rock solid. The scanning takes 325 uS every 8 mS. What are your opinions? Is an 8 samples average too much? Is an update every 32 mS too slow? Thanks. - Dave
Message
Interrupt-based ADC scanning and filtering
2004-05-06 by djbrow54
Attachments
- No local attachments were found for this message.