Digital to Analogue Conversion: the mcp4275
Lecture 10
Uli Raich
UCC semester 2017/2018
COPYRIGHT © 2024 by the contributing authors
Slide 1 of 6
Up to now we only treated digital signals:
- on/off for the LEDs
- on/off to read the LED state
- Powering or not powering coils to generate magnetic fields in a stepping motor
However:
The world is mostly analogue:
- Temperatures are changing continuously and not in steps
- Pressure is an analogue value
- Distance, time, current, resistance … are all analogue values
COPYRIGHT © 2024 by the contributing authors
Slide 2 of 6
Converting from digital to analogue
Since our computer is a digital device we must
- Convert digital values to analogue voltage levels
Digital to Analogue Conversion (DAC)
- … and we must convert external analogue values to digital
Analogue to Digital Conversion (ADC)
COPYRIGHT © 2024 by the contributing authors
Slide 3 of 6
Digital to analogue conversion
A digital to analogue converter does not really convert into a continuous waveform
Since we have digital values as a base, there will be steps in the output waveform
The size of these steps depends on the resolution of the DAC
What is the smallest step a 12 bit DAC can produce on a 0..5V scale?
COPYRIGHT © 2024 by the contributing authors
Slide 4 of 6
Can we smooth the output signal?
Yes, it is possible to smooth out these steps.
We need a low-pass filter, which filters out high frequencies
(the abrupt steps we have in the output signal) and lets pass only slower transitions.
When looking carefully at the output of our sine generator you will
also see these steps. In this case however they come from the
limited number of sine values (100) we calculate. To improve the resolution
we would have to increase the number of samples and the frequency
with which we send these values to the DAC.
COPYRIGHT © 2024 by the contributing authors
Slide 5 of 6
As a demo device we bought the MCP4725 DAC
This is a 12 bit DAC which can be accesses by the
I2C bus
Here is its
data sheet
and here a photo of the device
COPYRIGHT © 2024 by the contributing authors
Slide 6 of 6
--
Uli Raich - 2017-10-31
Comments
This topic: Embedded_Systems
> WebHome >
LectureSlides > Lecture10:DigitalToAnalogueConversion
Topic revision: r2 - 2017-10-31 - uli
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback