I have an application where I continuously scan 10 channels on the ATD port but now have a requirement to periodically scan only one channel several times fast, then switch back to multi channel scanning. The input to the channel is pulsing and I'm trying to determine the average power. Refering to MC9S12E128 Data Sheet, Rev. 1.07, it leads me to believe that I should be able to select between single or continuous on single channel or multiple channels.
The single channel that I want to monitor is Channel 6. ATDCTL3 has 4 bits S8C, S4C, S2C, S1C that dictate the Conversion Sequence Length. If I select 0001, it never converts channel 6 and the minimum number I can put in and still get it to scan is 0111. This seems to be the problem.
ATDCTL5 is configured Single Channel Conversion(SCAN - Bit 5), Sample only one channel (MULT - Bit 4) set the Input Channel Select Code to 0110 for Channel 6. This makes sense.
I want to stop, change to single channel, convert channel 6 ten times fast, then restore ATDCTL3 and 5 back to the multi channel mode.
Shouldn't I be able to convert and read one channel in 1/10th the amount of time it takes to convert and read 10 channels? Could it be that you can only achieve this speed if the single channel you want to monitor is Channel 0?
If anyone knows how to do this it would be greatly appreciated because I'm hacking at this point having tried what the data sheet said and not getting the results I expect. It may be that I cannot do what I want to do.