1 ADC conversion steps
The A/D converter (ADC) usually goes through four steps to convert analog quantity into digital quantity: sampling, holding, quantization and encoding.
Sampling: Converting a continuously changing analog quantity into a discretely changing analog quantity. As shown in the figure.
Hold: The process of storing the sampling result until the next sampling is called hold. Generally, the sampler and the holding circuit are collectively called the sample-and-hold circuit.
Quantization: The process of normalizing the sampled level to a discrete digital level close to it is called quantization.
2 Key indicators of ADC
Resolution: refers to the change in the analog signal when the digital quantity changes by a minimum amount, defined as the ratio of full scale to 2^n. Resolution is also called accuracy, usually expressed in the number of bits of the digital signal. The popular explanation of resolution is to determine the minimum sampling value. For example, if the reference voltage is 1v, the minimum value of 8-bit sampling is 1/256, and the minimum value of 1-bit sampling is 1/1024. The higher the resolution, the more accurate the sampling!
Conversion rate: It can also be called AD sampling rate, which is the reciprocal of the time required for an AD conversion.
Sampling time: Sampling time is another concept, which refers to the interval between two conversions. In order to ensure the correct completion of the conversion, the sampling rate (Sample Rate) must be less than or equal to the conversion rate.
Quantization error: The error caused by the limited resolution of AD, that is, the maximum deviation between the step-shaped transfer characteristic curve of the limited resolution AD and the transfer characteristic curve (straight line) of the infinite resolution AD (ideal AD)
Let's take an example to explain the above four indicators:
For example, the AD conversion module of F28335 is 12-bit, the maximum clock frequency of AD is 25MHz, and the sampling rate is 12.5Msps.
If you want to sample a 1V voltage,
the resolution = 1/2 to the 12th power = 1/4096
Conversion rate: set in the program according to your needs
Maximum sampling rate = 1/12.5M = 80ns (can also be set by setting the clock)
Quantization error: The voltage change between each code represents 1/4096V, and it is impossible to sample 1/8192 voltage. In other words, there is an error between the actual voltage that generates the specified code and the voltage representing the code.
3 Introduction to the ADC conversion module of F28335
3.1 Basic features
12-bit analog-to-digital conversion (expandable to 16-24 bits);
16-bit analog channel;
2 sample-and-hold devices;
analog voltage input range 0~3V;
ADC conversion clock frequency can be configured up to 25MHz, sampling bandwidth 12.5MHZ;
16 result registers store ADC conversion results
When using the ADC conversion module, special attention should be paid to the AD input range of F28335, which is 0~3v. If a negative voltage or a voltage higher than 3V is input, the AD module will be burned out. This must be taken seriously. Voltages beyond the input range can be processed in the front-stage circuit through resistor voltage division or op amp proportional circuit before input. The
analog input signal connected to the ADCINxx pin should be as far away from the digital circuit signal line as possible. The power supply of the ADC module should be isolated from the digital power supply to avoid high-frequency interference of the digital power supply. The reference source of the ADC is an important factor affecting the AD accuracy. Pay attention to the voltage ripple processing of the ADC reference source.
|