Analog-to-Digital and Digital-to-Analog Converters
Use these examples to learn how to design interfaces between microcontrollers and physical systems and convert analog and digital signals.
Featured Examples
Microcontroller with GPIO, ADC and DAC Connections
Model the interface between a microcontroller unit (MCU) and a physical system. Here the microcontroller's GPIO, ADC and DAC connections are used to control a DC motor and connected load with limited angle travel. Load angle measurement is via a potentiometer sensor. This measurement is calibrated by initially ramping the rotor position until the photodiode detects the zero-angle light pulse from the LED. Once calibrated the MCU commands a 0.1Hz 45 degree amplitude sinusoid.
Delta Sigma ADC with Noise
A simple implementation of a sigma delta analog-to-digital converter. An input in the range 0 to Vref (=1V) is integrated until it causes the integrator to reset. The time to reset is proportional to the input value. Demodulation of the pulses is performed by a low-pass filter. The Asynchronous Sample & Hold block behaves like an edge-triggered D-type flip-flop, passing input U to output Y only on a rising edge of the clock. This model can be used to explore and understand the effect of op-amp impairments such as equivalent input noise on converter accuracy. To turn off the noise, open block Vn and select 'Disabled' for the noise mode.
Switched Capacitor Analog to Digital Converter
How a sigma-delta ADC (analog to digital converter) uses sigma-delta modulation to convert an analog input signal into a digital output signal. The analog input to the sigma-delta ADC controls an oscillator that produces pulses of fixed voltage and duration, but with period between pulses being inversely proportional to the analog input. The oscillator pulses are integrated over a fixed time interval to give a digital representation of the analog input signal.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)