The ADC12 module is composed of the following parts: 16 analog switches for input (8 external and 4 internal), ADC internal voltage reference source, ADC12 core, ADC clock source part, acquisition and hold/trigger source part, ADC data output part, ADC control register, etc. Four sampling modes: (1) Single channel single conversion mode (2) Sequential channel word conversion mode (3) Single channel multiple conversion mode (4) Sequential channel multiple conversion mode I think (3) mode should be used more frequently. It converts the selected channel multiple times until the function is turned off or ENC=0. Set as follows: x=CSStartAdd, pointing to the conversion start address ADC12MEMx to store the conversion result. The channel and reference voltage are defined in the ADC12MCTLx register. In this mode, it is not necessary to stop the conversion first to change the conversion mode. The conversion mode can be changed after the current conversion is completed. There are several ways to stop this mode: Use CONSEQ=0 to change to single channel single mode. Use ENC=0 to stop the current conversion directly. Replace the current mode with single-channel single-shot mode, and set ENC=0 ADC control register ADC12CTL0 Conversion control register 0 ADC12CTL1 Conversion control register 1 ADC12IE Interrupt enable register ADC12IFG Interrupt flag register ADC12IV Interrupt vector register ADC12MEM0-15 Storage control register 0-15 ADC12MCTL0-15 Storage control register 0-15 General practice: start conversion in the big loop, and trigger an interrupt after the conversion. We record and process the conversion data in the interrupt.