Lesson6 DAAD conversion and microcontroller interface

Publisher:平和宁静Latest update time:2024-04-09 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. D, digital; A, anolog. Numbers: 0 and 1.

2. T-type resistor network D/A converter:

D/A working principle: The current is shunted through internal resistors to generate changing analog quantities.

3. Main performance indicators of D/A conversion:

① Resolution

Resolution refers to the change in the output analog quantity (voltage or current) corresponding to the change in the least significant bit (LSB) of the input digital quantity. It reflects the minimum change value of the output analog quantity.

The resolution has a definite relationship with the number of bits of the input digital quantity, which can be expressed as FS / . FS represents the full-scale input value, and n is the number of binary bits. For a full-scale of 5V, when an 8-bit DAC is used, the resolution is 5V/256=19.5mV; when a 12-bit DAC is used, the resolution is 5V/4096=1.22mV. Obviously, the more bits there are, the higher the resolution.

②Linearity

Linearity (also called nonlinear error) is the maximum deviation between the actual conversion characteristic curve and the ideal straight line characteristic. It is usually expressed as a percentage relative to the full scale. For example, ±1% means that the difference between the actual output value and the theoretical value is within ±1% of the full scale.

③Absolute accuracy and relative accuracy

Absolute accuracy (accuracy for short) refers to the maximum error between the actual output value and the theoretical value of the analog quantity corresponding to any input digital number within the entire scale range. Absolute accuracy is caused by the DAC's gain error (the difference between the actual output value and the ideal output value when the input digital number is all 1), zero error (the non-zero output value of the DAC when the digital input is all 0), nonlinear error and noise. Absolute accuracy (i.e. maximum error) should be less than 1 LSB.

Relative accuracy has the same meaning as absolute accuracy and is expressed as the percentage of the maximum error relative to the full scale.

④ Establishment time

The settling time refers to the time required for the output analog signal to reach ±1/2LSB of the full-scale value when the input digital quantity changes to full scale. It is a dynamic indicator that describes the D/A conversion rate.

The settling time of current output DAC is short. The settling time of voltage output DAC is mainly determined by the response time of the operational amplifier. According to the length of the settling time, DAC can be divided into ultra-high speed (<1μS), high speed (10~1μS), medium speed (100~10μS), and low speed (≥100μS).

It should be noted that accuracy and resolution are related to each other, but they are different concepts. When the number of bits of a DAC is large, the resolution will be improved, and the quantization error that affects the accuracy will be reduced. However, the influence of other errors (such as temperature drift, poor linearity, etc.) will still make the accuracy of the DAC worse.

4. Symbols: CS, chip select. Pin description, pin description. Typical operating circuit, typical design circuit. Valid data, valid data; PWM, pulse width modulation, pulse width modulation. Intr, interrupt.

5. Circuit symbols:

6. Timing: The grid means it doesn’t matter; SCLK, data clock; DIN, data input; DOUT, data output; high level, low level.

7. Main technical indicators of A/D converter

① Resolution

The resolution of an ADC refers to the change in the input analog voltage required to change the output digital value by one adjacent digital number. It is usually expressed in binary bits. For example, the resolution of a 12-bit ADC is 12 bits, or the resolution is 1/ of the full scale FS. A 12-bit ADC with a full scale of 10V can distinguish a minimum input voltage change of 10V×1/ =2.4mV.

②Quantization error

ADC converts analog quantity into digital quantity and approximates analog quantity with digital quantity. This process is called quantization. Quantization error is the error caused by quantizing analog quantity with limited number of bits of ADC. In fact, to accurately represent analog quantity, the number of bits of ADC needs to be very large or even infinite. The maximum deviation between the step-shaped conversion characteristic curve of an ADC with limited resolution and the conversion characteristic curve (straight line) of an ADC with infinite resolution is the quantization error.

③Offset error

Offset error refers to the value of the output signal that is not zero when the input signal is zero, so it is sometimes called zero value error. Assuming that the ADC has no nonlinear error, the line connecting the midpoints of each step of its conversion characteristic curve must be a straight line, and the input voltage value corresponding to the intersection of this straight line and the horizontal axis is the offset error.

④Full scale error

Full-scale error is also called gain error. The full-scale error of an ADC refers to the difference between the actual input voltage corresponding to the full-scale output digital and the ideal input voltage.

⑤Linearity

Linearity is sometimes called nonlinearity, which refers to the maximum deviation of the actual conversion characteristics of the converter from the ideal straight line.

⑥Absolute accuracy

In a converter, the maximum value of the difference between the actual analog input and the theoretical analog input corresponding to any digital number is called absolute accuracy. For ADC, it can be measured at the horizontal midpoint of each step, which includes all errors.

⑦Conversion rate

The conversion rate of an ADC is the speed at which data conversion can be repeated, that is, the number of conversions per second. The time required to complete an A/D conversion (including stabilization time) is the reciprocal of the conversion rate.

8. Commonly used: Successive approximation ADC conversion principle:

Conversion principle of dual-integral ADC:

9. Capacitor 104: 10*10 to the fourth power; 4k7, 4.7k;

10. Bridge circuit, deformation resistor.


Reference address:Lesson6 DAAD conversion and microcontroller interface

Previous article:Lesson5 Keyboard application
Next article:Lesson7 Serial Communication

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号