Slide 1: Digital to Analogue Conversion: the mcp4275
Lecture 10
Uli Raich
UCC semester 2017/2018
Slide 2: Analogue versus digital
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
Slide 3: 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)
Slide 4: 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?
Slide 5: 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.
Slide 6: The MCP4725 12 bit DAC
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
--
Uli Raich - 2017-10-31
Comments