SLAU144K December 2004 – August 2022 MSP430AFE221 , MSP430AFE222 , MSP430AFE223 , MSP430AFE231 , MSP430AFE232 , MSP430AFE233 , MSP430AFE251 , MSP430AFE252 , MSP430AFE253 , MSP430F2001 , MSP430F2002 , MSP430F2003 , MSP430F2011 , MSP430F2012 , MSP430F2013 , MSP430F2101 , MSP430F2111 , MSP430F2112 , MSP430F2121 , MSP430F2122 , MSP430F2131 , MSP430F2132 , MSP430F2132-EP , MSP430F2232 , MSP430F2234 , MSP430F2252 , MSP430F2252-Q1 , MSP430F2254 , MSP430F2272 , MSP430F2272-Q1 , MSP430F2274 , MSP430F2274-EP , MSP430F233 , MSP430F2330 , MSP430F235 , MSP430F2350 , MSP430F2370 , MSP430F2410 , MSP430F2416 , MSP430F2417 , MSP430F2418 , MSP430F2419 , MSP430F247 , MSP430F2471 , MSP430F248 , MSP430F2481 , MSP430F249 , MSP430F2491 , MSP430F2616 , MSP430F2617 , MSP430F2618 , MSP430F2619 , MSP430G2001 , MSP430G2101 , MSP430G2102 , MSP430G2111 , MSP430G2112 , MSP430G2121 , MSP430G2131 , MSP430G2132 , MSP430G2152 , MSP430G2153 , MSP430G2201 , MSP430G2201-Q1 , MSP430G2202 , MSP430G2203 , MSP430G2210 , MSP430G2211 , MSP430G2212 , MSP430G2213 , MSP430G2221 , MSP430G2230 , MSP430G2231 , MSP430G2231-Q1 , MSP430G2232 , MSP430G2233 , MSP430G2252 , MSP430G2253 , MSP430G2302 , MSP430G2303 , MSP430G2312 , MSP430G2313 , MSP430G2332 , MSP430G2333 , MSP430G2352 , MSP430G2353 , MSP430G2402 , MSP430G2403 , MSP430G2412 , MSP430G2413 , MSP430G2432 , MSP430G2433 , MSP430G2444 , MSP430G2452 , MSP430G2453 , MSP430G2513 , MSP430G2533 , MSP430G2544 , MSP430G2553 , MSP430G2744 , MSP430G2755 , MSP430G2855 , MSP430G2955 , MSP430TCH5E
Table 23-2 lists the memory-mapped registers for the ADC12.
Address | Acronym | Register Name | Reset | Section |
---|---|---|---|---|
1A0h | ADC12CTL0 | ADC12 control 0 | 00h with POR | Section 23.4.1 |
1A2h | ADC12CTL1 | ADC12 control 1 | 00h with POR | Section 23.4.2 |
1A4h | ADC12IFG | ADC12 interrupt flag | 00h with POR | Section 23.4.3 |
1A6h | ADC12IE | ADC12 interrupt enable | 00h with POR | Section 23.4.4 |
1A8h | ADC12IV | ADC12 interrupt vector word | 00h with POR | Section 23.4.5 |
80h | ADC12MCTL0 | ADC12 memory control 0 | 00h with POR | Section 23.4.6 |
81h | ADC12MCTL1 | ADC12 memory control 1 | 00h with POR | Section 23.4.6 |
82h | ADC12MCTL2 | ADC12 memory control 2 | 00h with POR | Section 23.4.6 |
83h | ADC12MCTL3 | ADC12 memory control 3 | 00h with POR | Section 23.4.6 |
84h | ADC12MCTL4 | ADC12 memory control 4 | 00h with POR | Section 23.4.6 |
85h | ADC12MCTL5 | ADC12 memory control 5 | 00h with POR | Section 23.4.6 |
86h | ADC12MCTL6 | ADC12 memory control 6 | 00h with POR | Section 23.4.6 |
87h | ADC12MCTL7 | ADC12 memory control 7 | 00h with POR | Section 23.4.6 |
88h | ADC12MCTL8 | ADC12 memory control 8 | 00h with POR | Section 23.4.6 |
89h | ADC12MCTL9 | ADC12 memory control 9 | 00h with POR | Section 23.4.6 |
8Ah | ADC12MCTL10 | ADC12 memory control 10 | 00h with POR | Section 23.4.6 |
8Bh | ADC12MCTL11 | ADC12 memory control 11 | 00h with POR | Section 23.4.6 |
8Ch | ADC12MCTL12 | ADC12 memory control 12 | 00h with POR | Section 23.4.6 |
8Dh | ADC12MCTL13 | ADC12 memory control 13 | 00h with POR | Section 23.4.6 |
8Eh | ADC12MCTL14 | ADC12 memory control 14 | 00h with POR | Section 23.4.6 |
8Fh | ADC12MCTL15 | ADC12 memory control 15 | 00h with POR | Section 23.4.6 |
140h | ADC12MEM0 | ADC12 memory 0 | Unchanged | Section 23.4.7 |
142h | ADC12MEM1 | ADC12 memory 1 | Unchanged | Section 23.4.7 |
144h | ADC12MEM2 | ADC12 memory 2 | Unchanged | Section 23.4.7 |
146h | ADC12MEM3 | ADC12 memory 3 | Unchanged | Section 23.4.7 |
148h | ADC12MEM4 | ADC12 memory 4 | Unchanged | Section 23.4.7 |
14Ah | ADC12MEM5 | ADC12 memory 5 | Unchanged | Section 23.4.7 |
14Ch | ADC12MEM6 | ADC12 memory 6 | Unchanged | Section 23.4.7 |
14Eh | ADC12MEM7 | ADC12 memory 7 | Unchanged | Section 23.4.7 |
150h | ADC12MEM8 | ADC12 memory 8 | Unchanged | Section 23.4.7 |
152h | ADC12MEM9 | ADC12 memory 9 | Unchanged | Section 23.4.7 |
154h | ADC12MEM10 | ADC12 memory 10 | Unchanged | Section 23.4.7 |
156h | ADC12MEM11 | ADC12 memory 11 | Unchanged | Section 23.4.7 |
158h | ADC12MEM12 | ADC12 memory 12 | Unchanged | Section 23.4.7 |
15Ah | ADC12MEM13 | ADC12 memory 13 | Unchanged | Section 23.4.7 |
15Ch | ADC12MEM14 | ADC12 memory 14 | Unchanged | Section 23.4.7 |
15Eh | ADC12MEM15 | ADC12 memory 15 | Unchanged | Section 23.4.7 |
ADC12 Control Register 0 Register
ADC12CTL0 is shown in Figure 23-12 and described in Table 23-3.
Return to Table 23-2.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
SHT1x | SHT0x | ||||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
MSC | REF2_5V | REFON | ADC120N | ADC12OVIE | ADC12TOVIE | ENC | ADC12SC |
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Can be modified only when ENC = 0 |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-12 | SHT1x | R/W | 0h | Sample-and-hold time. These bits define the number of ADC12CLK cycles in the sampling period for registers ADC12MEM8 to ADC12MEM15. Can be modified only when ENC = 0.
0000b = 4 ADC12CLK cycles 0001b = 8 ADC12CLK cycles 0010b = 16 ADC12CLK cycles 0011b = 32 ADC12CLK cycles 0100b = 64 ADC12CLK cycles 0101b = 96 ADC12CLK cycles 0110b = 128 ADC12CLK cycles 0111b = 192 ADC12CLK cycles 1000b = 256 ADC12CLK cycles 1001b = 384 ADC12CLK cycles 1010b = 512 ADC12CLK cycles 1011b = 768 ADC12CLK cycles 1100b = 1024 ADC12CLK cycles 1101b = 1024 ADC12CLK cycles 1110b = 1024 ADC12CLK cycles 1111b = 1024 ADC12CLK cycles |
11-8 | SHT0x | R/W | 0h | Sample-and-hold time. These bits define the number of ADC12CLK cycles in the sampling period for registers ADC12MEM0 to ADC12MEM7. Can be modified only when ENC = 0.
0000b = 4 ADC12CLK cycles 0001b = 8 ADC12CLK cycles 0010b = 16 ADC12CLK cycles 0011b = 32 ADC12CLK cycles 0100b = 64 ADC12CLK cycles 0101b = 96 ADC12CLK cycles 0110b = 128 ADC12CLK cycles 0111b = 192 ADC12CLK cycles 1000b = 256 ADC12CLK cycles 1001b = 384 ADC12CLK cycles 1010b = 512 ADC12CLK cycles 1011b = 768 ADC12CLK cycles 1100b = 1024 ADC12CLK cycles 1101b = 1024 ADC12CLK cycles 1110b = 1024 ADC12CLK cycles 1111b = 1024 ADC12CLK cycles |
7 | MSC | R/W | 0h | Multiple sample and conversion. Valid only for sequence or repeated modes. Can be modified only when ENC = 0.
0b = The sampling timer requires a rising edge of the SHI signal to trigger each sample-and-conversion. 1b = The first rising edge of the SHI signal triggers the sampling timer, but further sample-and-conversions are performed automatically as soon as the prior conversion is completed. |
6 | REF2_5V | R/W | 0h | Reference generator voltage. REFON must also be set. Can be modified only when ENC = 0.
0b = 1.5 V 1b = 2.5 V |
5 | REFON | R/W | 0h | Reference generator on. Can be modified only when ENC = 0.
0b = Reference off 1b = Reference on |
4 | ADC12ON | R/W | 0h | ADC12 on. Can be modified only when ENC = 0.
0b = ADC12 off 1b = ADC12 on |
3 | ADC12OVIE | R/W | 0h | ADC12MEMx overflow interrupt enable. The GIE bit must also be set to enable the interrupt.
0b = Overflow interrupt disabled 1b = Overflow interrupt enabled |
2 | ADC12TOVIE | R/W | 0h | ADC12 conversion-time-overflow interrupt enable. The GIE bit must also be set to enable the interrupt.
0b = Conversion time overflow interrupt disabled 1b = Conversion time overflow interrupt enabled |
1 | ENC | R/W | 0h | Enable conversion
0b = ADC12 disabled 1b = ADC12 enabled |
0 | ADC12SC | R/W | 0h | Start conversion. Software-controlled sample-and-conversion start. ADC12SC and ENC may be set together with one instruction. ADC12SC is reset automatically.
0b = No sample-and-conversion start 1b = Start sample-and-conversion |
ADC12 Control Register 1 Register
ADC12CTL1 is shown in Figure 23-13 and described in Table 23-4.
Return to Table 23-2.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
CSTARTADDx | SHSx | SHP | ISSH | ||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
ADC12DIVx | ADC12SSELx | CONSEQx | ADC12BUSY | ||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Can be modified only when ENC = 0 |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-12 | CSTARTADDx | R/W | 0h | Conversion start address. These bits select which ADC12 conversion-memory register is used for a single conversion or for the first conversion in a sequence. The value of CSTARTADDx is 0 to 0Fh, corresponding to ADC12MEM0 to ADC12MEM15. Can be modified only when ENC = 0. |
11-10 | SHSx | R/W | 0h | Sample-and-hold source select. Can be modified only when ENC = 0.
00b = ADC12SC bit 01b = Timer_A.OUT1 10b = Timer_B.OUT0 11b = Timer_B.OUT1 |
9 | SHP | R/W | 0h | Sample-and-hold pulse-mode select. This bit selects the source of the sampling signal (SAMPCON) to be either the output of the sampling timer or the sample-input signal directly. Can be modified only when ENC = 0.
0b = SAMPCON signal is sourced from the sample-input signal. 1b = SAMPCON signal is sourced from the sampling timer. |
8 | ISSH | R/W | 0h | Invert signal sample-and-hold. Can be modified only when ENC = 0.
0b = The sample input signal is not inverted. 1b = The sample input signal is inverted. |
7-5 | ADC12DIVx | R/W | 0h | ADC12 clock divider. Can be modified only when ENC = 0.
000b = /1 001b = /2 010b = /3 011b = /4 100b = /5 101b = /6 110b = /7 111b = /8 |
4-3 | ADC12SSELx | R/W | 0h | ADC12 clock source select. Can be modified only when ENC = 0.
00b = ADC12OSC 01b = ACLK 10b = MCLK 11b = SMCLK |
2-1 | CONSEQx | R/W | 0h | Conversion sequence mode select
00b = Single-channel, single-conversion mode 01b = Sequence-of-channels mode 10b = Repeat-single-channel mode 11b = Repeat-sequence-of-channels mode |
0 | ADC12BUSY | R/W | 0h | ADC12 busy. This bit indicates an active sample or conversion operation.
0b = No operation is active 1b = A sequence, sample, or conversion is active |
ADC12 Interrupt Flag Register
ADC12IFG is shown in Figure 23-14 and described in Table 23-5.
Return to Table 23-2.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
ADC12IFG15 | ADC12IFG14 | ADC12IFG13 | ADC12IFG12 | ADC12IFG11 | ADC12IFG10 | ADC12IFG9 | ADC12IFG8 |
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
ADC12IFG7 | ADC12IFG6 | ADC12IFG5 | ADC12IFG4 | ADC12IFG3 | ADC12IFG2 | ADC12IFG1 | ADC12IFG0 |
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-0 | ADC12IFGx | R/W | 0h | ADC12MEMx interrupt flag. These bits are set when corresponding ADC12MEMx is loaded with a conversion result. The ADC12IFGx bits are reset if the corresponding ADC12MEMx is accessed, or may be reset with software.
0b = No interrupt pending 1b = Interrupt pending |
ADC12 Interrupt Enable Register
ADC12IE is shown in Figure 23-15 and described in Table 23-6.
Return to Table 23-2.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
ADC12IE15 | ADC12IE14 | ADC12IE13 | ADC12IE12 | ADC12IE11 | ADC12IE10 | ADC12IFG9 | ADC12IE8 |
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
ADC12IE7 | ADC12IE6 | ADC12IE5 | ADC12IE4 | ADC12IE3 | ADC12IE2 | ADC12IE1 | ADC12IE0 |
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-0 | ADC12IEx | R/W | 0h | Interrupt enable. These bits enable or disable the interrupt request for the ADC12IFGx bits.
0b = Interrupt disabled 1b = Interrupt enabled |
ADC12 Interrupt Vector Register
ADC12IV is shown in Figure 23-16 and described in Table 23-7.
Return to Table 23-2.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
ADC12IVx | |||||||
r-0 | r-0 | r-0 | r-0 | r-0 | r-0 | r-0 | r-0 |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
ADC12IVx | |||||||
r-0 | r-0 | r-(0) | r-(0) | r-(0) | r-(0) | r-(0) | r-0 |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-0 | ADC12IVx | R | 0h | ADC12 interrupt vector value. See Table 23-8. |
ADC12IV Contents | Interrupt Source | Interrupt Flag | Interrupt Priority |
---|---|---|---|
000h | No interrupt pending | – | |
002h | ADC12MEMx overflow | – | Highest |
004h | Conversion time overflow | – | |
006h | ADC12MEM0 interrupt flag | ADC12IFG0 | |
008h | ADC12MEM1 interrupt flag | ADC12IFG1 | |
00Ah | ADC12MEM2 interrupt flag | ADC12IFG2 | |
00Ch | ADC12MEM3 interrupt flag | ADC12IFG3 | |
00Eh | ADC12MEM4 interrupt flag | ADC12IFG4 | |
010h | ADC12MEM5 interrupt flag | ADC12IFG5 | |
012h | ADC12MEM6 interrupt flag | ADC12IFG6 | |
014h | ADC12MEM7 interrupt flag | ADC12IFG7 | |
016h | ADC12MEM8 interrupt flag | ADC12IFG8 | |
018h | ADC12MEM9 interrupt flag | ADC12IFG9 | |
01Ah | ADC12MEM10 interrupt flag | ADC12IFG10 | |
01Ch | ADC12MEM11 interrupt flag | ADC12IFG11 | |
01Eh | ADC12MEM12 interrupt flag | ADC12IFG12 | |
020h | ADC12MEM13 interrupt flag | ADC12IFG13 | |
022h | ADC12MEM14 interrupt flag | ADC12IFG14 | |
024h | ADC12MEM15 interrupt flag | ADC12IFG15 | Lowest |
ADC12 Memory Control x Register
ADC12MCTLx is shown in Figure 23-17 and described in Table 23-9.
Return to Table 23-2.
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
EOS | SREFx | INCHx | |||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Can be modified only when ENC = 0 |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
7 | EOS | R/W | 0h | End of sequence. Indicates the last conversion in a sequence. Can be modified only when ENC = 0.
0b = Not end of sequence 1b = End of sequence |
6-4 | SREFx | R/W | 0h | Select reference. Can be modified only when ENC = 0.
000b = VR+ = AVCC and VR- = AVSS 001b = VR+ = VREF+ and VR- = AVSS 010b = VR+ = VeREF+ and VR- = AVSS 011b = VR+ = VeREF+ and VR- = AVSS 100b = VR+ = AVCC and VR- = VREF-/ VeREF- 101b = VR+ = VREF+ and VR- = VREF-/ VeREF- 110b = VR+ = VeREF+ and VR- = VREF-/ VeREF- 111b = VR+ = VeREF+ and VR- = VREF-/ VeREF- |
3-0 | INCHx | R/W | 0h | Input channel select. Can be modified only when ENC = 0.
0000b = A0 0001b = A1 0010b = A2 0011b = A3 0100b = A4 0101b = A5 0110b = A6 0111b = A7 1000b = VeREF+ 1001b = VREF- /VeREF- 1010b = Temperature diode 1011b = (AVCC – AVSS) / 2 1100b = GND 1101b = GND 1110b = GND 1111b = GND |
ADC12 Memory x Register
ADC12MEMx is shown in Figure 23-18 and described in Table 23-10.
Return to Table 23-2.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
Conversion_Results | |||||||
r-0 | r-0 | r-0 | r-0 | rw | rw | rw | rw |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Conversion_Results | |||||||
rw | rw | rw | rw | rw | rw | rw | rw |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-0 | Conversion_Results | R/W | 0h | The 12-bit conversion results are right-justified. Bit 11 is the MSB. Bits 15-12 are always 0. Writing to the conversion memory registers corrupts the results. |