178
ADC10 Interrupt
In previous example, we didn’t use ADC10 interrupt and the code was based on polling. ADC interrupts
are as important as timer interrupts. We can start an ADC and extract conversion data in an orderly
manner when conversion is complete. No other process waits for the ADC, freeing up the CPU.
Many present-day microcontrollers have on-chip temperature sensors. While many people think they
are just mere additions, they are not. Such sensors have a number of applications – most notably
correction of ADC readings with temperature drift. Other applications include thermal protection,
temperature comphensations, temperature reference, etc. However, these sensors are not meant to
be as precise and accurate as dedicated temperature sensor chips like LM35 and DS18B20. This makes
them highly unsuitable for measurements of wide range of temperatures and unsuitable for reliable
readings. Shown above is the typical voltage output vs temperature graph of MSP430G2xx devices’
internal temperature sensor. Though it is linear, the word “typical” is indirectly telling us that there
can be some deviations.
In this example, we will see how to read the internal temperature sensor of a MSP430G2xx micro using
ADC10 interrupt.