ADC conversion clarification

Status
Not open for further replies.
I have this confusion if I configured an ADC conversion in micro controller for interrupt based. I will get the interrupt after every conversion. Is it a good method or bad method in the sense if i don't connect any Analog sensor to the corresponding pin then also will I get the interrupt? How does the controller know does an analog sensor is connected to that pin or not?
 
In the micro there is normally only one ADC module... All the pins are multiplexed so you can "in effect" have several ADC sources...

Before the interrupt you must select the channel.. Only one channel can be selected at a time... Some micro's, such as the H8 series from Renesas ( Hitachi ) do a multi read where each channel is selected in turn and the results are placed in buffers... You then only need to check the buffer and all ADC readings are done automatically..

I think the dsPIC33 can do this as well..
 

It doesn't know, how could it? - it's up to YOU which inputs you measure.
 
If you've configured it to generate an interrupt on completion, it will do so at the end. But you won't have an end unless there's a beginning. YOU have to select the input you want to measure, and then start the conversion process. Then go off and do something else. When it's done, it'l let you know.

But the interrupt wont happen unless you start the conversion process.

If the conversion starts without anything connected to the ADC input, the conversion will still run, and cause and interrupt at the end, but the results will be meaningless.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…