Shaopeng Liu

Multiple ADC channels problem - MC9S08QE128

Discussion created by Shaopeng Liu on Sep 10, 2009
Latest reply on Sep 16, 2009 by Shaopeng Liu

Hi All,


I am using MC9S08QE128 as a data logger, which samples a total of 9-channel signals using the ADC module. I am using timer interrupt to control the sampling rate, and ADC interrupt for sampling the data.


The basic idea here is that, in the timer interrupt, enable the ADC interrupt, and disable ADC sampling inside the ADC interrupt, where the ADC sampling data will be kept in a global buffer, which will be stored into SD card later on. When next timer interrupt occurs, enable the ADC again...


However, I have questions about how to select/switch channels before the ADC interrupt occurs. if you guys have any suggestion or comments, please do let me know.


Thank you very much in advance!





Message Edited by NLFSJ on 2009-09-16 01:12 PM