View Notes – dac interfacing with from ELECTRICAL EE at Engineering College. MICROCONTROLLER INTERFACING WITH DAC Sample code for Digital to Analog converter โ€“ DAC interfacing with Following code can be using for and ICs like: 89c DAC circuit using DAC [click to enlarge] LCD Interfacing code (In 4bit mode) + Proteus Simulation ยท Interfacing with UART of.

Author: Mozil Doushicage
Country: Colombia
Language: English (Spanish)
Genre: Art
Published (Last): 4 November 2007
Pages: 373
PDF File Size: 17.95 Mb
ePub File Size: 15.44 Mb
ISBN: 767-7-62741-261-6
Downloads: 7562
Price: Free* [*Free Regsitration Required]
Uploader: Dainos

Recall from your digital electronics book the two methods of creating a DAC: The first criterion for judging a DAC is its resolution, which is a function of the number of binary inputs. Witj common ones are 8, 10, and 12 bits. Therefore, an 8-input DAC.

This section will show how to interface a DAC digital-to-analog converter intergacing the Then we demonstrate how to generate a sine wave on the scope using the DAC. The digital-to-analog converter DAC is a device widely used dwc0808 convert digital pulses to analog signals.

In this section we discuss the basics of interfacing a DAC to the Similarly, the bit DAC provides discrete voltage levels. There are also bit DACs, but they are more expensive.


In the MC DACthe digital inputs are converted to current I outand by connecting a resistor to the I witg pin, we convert the result to voltage. The total current provided by the I out pin is a function of the binary numbers at the DO โ€” D7 inputs of the DAC and the reference current I re fand is as follows: The I re f current is generally set to 2.

Digital to Analog converter โ€“ DAC interfacing with 8051

Converting l out to voltage in DAC Ideally we connect the output pin Inyerfacing out to a resistor, convert this current to. In real life, however, this can cause inaccuracy since the input resistance of the load where it is connected will also affect the output voltage.

In order to generate a stair-step ramp, integfacing up the circuit in Figure and connect the output to an oscilloscope. Then write a program to send data to the DAC to generate a stair-step ramp.

How to Interface DAC IC Based Module with Microcontroller? | EngineersGarage

Generating a sine wave. To intterfacing a sine wave, we first need a table whose values represent the magnitude of the sine of angles between 0 and degrees.


The values for the sine function vary from Therefore, the table values are integer numbers representing the voltage magnitude for the sine of theta. This method ensures that only integer numbers are output to the DAC by the microcontroller.

Table shows the angles, the sine values, the voltage magnitudes, and the integer values representing the voltage magnitude for each angle with degree increments.

Therefore, to achieve the full-scale 10 V output, we use the following equation. V out of DAC for various angles is calculated and shown in Table See Example for verification of the calculations.

Voltage Magnitude for Sine Wave. To find the value sent to the DAC for various angles, we simply multiply the V out voltage by To further clarify this, look at the following code.

This program sends the values to the DAC continuously in an infinite loop to produce a crude sine wave. Angle 9 degrees Sin 0.