Please ask about the software triggered conversion of the ADC module

Updated on society 2024-03-16
10 answers
  1. Anonymous users2024-02-06

    I just finished writing and I can show the correct values.

    Copied to you: Initialize adc12

    p6sel |= 0x01;Enable ADC channels.

    adc12ctl0 = adc12on+sht0_8+msc;Turn on the ADC and set the sampling time.

    adc12ctl0|= refon+ref2_5v;

    adc12mctl0|=sref_1;Select an internal voltage reference.

    adc12ctl1 = shp+conseq_2;Use the sampling timer.

    adc12ie = 0x01;Enable ADC interrupts.

    adc12ctl0 |= enc;Enable conversion.

    adc12ctl0 |= adc12sc;Start the conversion.

    #pragma vector=adc_vector_interrupt void conversion()uint buffer[32];

    static uint index=0;

    buffer[index++]=adc12mem0;

    if(index==32)

    index=0;

    uchar i;

    unsigned long sum=0;

    for(i=0;i<32;i++)

    sum+=buffer[i];

    sum=sum/32;

    The resulting sum is the value obtained by the smooth filtering

  2. Anonymous users2024-02-05

    RE: For questions about the ADC module, RE: For a question about the software-triggered conversion of the ADC module.

  3. Anonymous users2024-02-04

    The sampling frequency refers to the interval between samples, and the faster the sampling frequency, the shorter the sampling interval.

    The circuit hold conversion time is very short, so you don't have to worry about it.

  4. Anonymous users2024-02-03

    Add a capacitor, and then use the sampling period, you can basically get the desired voltage.

    There is a problem to note that if this AD wants to switch between this DC signal and other signals that change faster, it will be inaccurate to measure other signals that change faster.

  5. Anonymous users2024-02-02

    The IO port is connected to a large resistor for the power supply. The allowable input current is very small, and it will burn out if it is large, and it will burn out when it is hot.

  6. Anonymous users2024-02-01

    Dear,Please take a closer look at the official pdf information of the single-chip microcomputer,There is a circuit diagram in the AD part。

    In fact, it's not as troublesome as you think, I have used this model of single-chip microcomputer, the quality is very good, and it is OK to adopt AD without current limiting, generally your input voltage does not exceed 6V single-chip microcomputer will not burn, once I accidentally added it to 7V, burned the AD circuit, and the IO function can still be used

    Therefore, if it is not a very special situation, there is no need to add a current limit.

  7. Anonymous users2024-01-31

    1. For AD, one must be connected to the power supply and one to the ground, and the middle of the two resistors, that is, VREF is connected to the single-chip microcomputer pin or connected to a 1K resistor and then connected to the single-chip microcomputer pin.

    2. IO port pull-up selection 4, 7K--10K is OK.

    3. The IO port is connected to the ground terminal of the button, and the resistor is generally not required, and it can be directly grounded.

  8. Anonymous users2024-01-30

    You can divide the voltage signal from the collected voltage! After that, I perform the choice of the voltage reference!

  9. Anonymous users2024-01-29

    Add optocoupler, two sets of power supply voltages, the ADC input terminal uses 5V, and the MCU side uses power supply and sampling module.

    Proportional sampling of ADCs

  10. Anonymous users2024-01-28

    Yes, the principle is time, in layman's terms, each way takes turns to sample, and then processes them separately, as for the routine, you find a 430 single-chip microcomputer book, and his AD module explanation part is there.

Related questions
24 answers2024-03-16

What should be done to ensure that the mother does not suffer in the division of property? >>>More

13 answers2024-03-16

In the case of sqlserver, you can write a database-based trigger in which you can get the name of the table to be operated on, and sqlserver prohibits the user from deleting the specified table. >>>More

14 answers2024-03-16

The duration of the certificate is for a lifetime. Good morning exam. Beijing Personnel Examination Network. The landlord checked it himself. This year, I finished the English test, I finished the computer test twice, and I have 2 more times. >>>More

6 answers2024-03-16

Tell you very clearly. Your computer is great. No matter how many people there are, they won't get stuck. You've fallen for the Trojan horse. >>>More

6 answers2024-03-16

How do I merge cells?

Select the cells you want to merge, right-click, and select Merge Cells. >>>More