The analog to digital converter (ADC) on the ez430 is a type called a Sigma-Delta (SD) Converter. The way it operates is slightly different from what was described in the previous section (although the end result is the same) but those specifics are out of the scope of this course. The SD converter on the ez430 has 8 channels and a 16 bit resolution.
The module is highly configurable and can run largely free of program involvement. In this portion of the lab, we will broadly explain the features of the module, but the particular effects of each register are listed, as usual, in Chapter 12 of the User’s Guide.
Range of Measurement
The result of each conversion will be 16 bits long in the form of an unsigned integer whose value is:
SD16_MEMx=(65,536)Vin-VrnegVrpos-Vrneg
SD16_MEMx
(65,536)
Vin
Vrneg
Vrpos
Vrneg
(1)
Where
Vin is the input voltage to be measured,
Vrneg is the lower reference voltage, and
Vrpos is the higher reference voltage. The reference voltages are set to power and ground by default, but they can be changed to an internal reference generator or an externally supplied reference using the
SD16CTL register.
Operation Reminders for the ADC
Remember the following when attempting to use the ADC:
- Be sure to enable SD16 interrupts (on
SD16CCTL0) and to select the specific channel which you are using (on SD16INCTL) - After configuring the ADC, you must enable the
SD16SC bit to start conversion. - All ADC values will be stored in the
SD16MEMx variable where "x" is the number of the channel
The
User's Guide will be very useful for this lab because of the complexity of this part of the MSP430. Be sure to go over the chapter atleast briefly before jumping into programming.
"How to setup the ADC peripheral on the MSP430."