Content originally posted in LPCWare by lsimons on Fri Feb 03 08:49:48 MST 2012
In order to sample a single ADC channel on the LPC1769, I used Timer0 to start a software conversion (set the START bits in ADCR to 001). I have this Timer0 interrupt toggling a pin so I can verify that it is occurring at the desired 4kHz.
In the ADC interrupt handler, I can see the DONE bit on ADGDR reset on reading the data (which I think is how that interrupt is cleared?). The ADC interrupt fires, but it is toggling it's debug pin at almost 1MHz. Since this is faster than than the ADC's fastest rate, it looks to me like I'm missing something when it comes to resetting the interrupt.
After reading the user manual some more, it looks like maybe I should just put the ADC into START on MATch mode and save the function calls. However, I'd like to understand what's going on before I rewrite the architecture.
Thanks,
Louis