ADC12 of msp430 learning

    The msp430 has a 12-bit AD converter, note: ADC12 is the analog-to-digital converter of the msp430f249 module, ADC10 is not. The 12-bit ADC compares the input analog data with the reference voltage, and stores the comparison result in ADC12MEMx.
    First, input the power supply module, you can use the internal reference power supply or the external reference power supply. REFON needs to be configured, the default is 1.5V, and the other is 2.5V (REF2_5V). Of course, external power input can also be used. Looking at the circuit diagram, the external reference power should be input from Veref+ and Vref-/Veref-. Then configure the SREF bit in ADC12MCTL as an external input.
    Secondly, the input clock source, the clock source input by ADC12SSEL configuration, is the internal clock by default, and external ACLK, MCLK, SMCLK can also be selected.
    Next, for the input channel, 8 external inputs can be selected, shared with the P6.x IO port, or 4 internal input channels can be used.
    Then, in the sampling and conversion process, each analog-to-digital conversion process is initialized by the SHI input signal. SHSx can select the SHI signal, and SAMPCON controls the sampling period and the start of the analog-to-digital conversion. Generally, 13 ADC12CLK cycles are required for conversion. The method of sampling control is controlled by SHP, there are 2 ways in total, one is Extended Sample Mode and the other is Pulse Sample Mode.
   There is also a control for sampling accuracy, with the formula tsample > (RS + 2kΩ) × 9.011 × 40 pF + 800 ns.
   For data storage, a total of 16 ADC12MEMs are available for storage, and their storage is controlled by the corresponding ADC12MCTLx; CSTARTADDx, if it is in single-channel or repeat-single-channel mode, the set CSTARTADDx refers to the storage of the corresponding converted data Location, if it is sequence-of-channels mode or repeat-sequence-of-channels mode, CSTARTADDx refers to the storage location of the data corresponding to the first conversion.
   The final sampling process, you can directly refer to the datasheet, there are very detailed pictures!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326680753&siteId=291194637