National Level Hackathon Participation Certificate.pdf
Digital to Analog Converter by LDCE students
1. L. D. COLLEGE OF ENGINNERING
AHMEDABAD-380015
GUIDED BY:
PROF. P.P. PRAJAPATI
ASSISTANT PROFESSOR,
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING.
L. D. COLLEGE OF ENGINEERING,
AHMEDABAD.
PREPARED BY:
MITUL LAKHANI
DHAVAL SONANI
VISHAL GONADALIYA
2. WHAT IS DAC??
In electronics, a digital- to- analog
converter (DAC or D-to-A) is a device that
converts a digital (usually binary) code to an analog
signal ( current, voltage, or electric charge).
An analog digital converter (ADC) performs the
reverse operation. Signals are easily stored and
transmitted in digital form, but a DAC is needed for
the signal to be recognized by human senses or
other non-digital systems.
3. GENERAL USE OF DAC.
A common use of digital-to- analog converters is
generation of audio signals from digital information
in music player.
Digital video signals are converted to analog
in televisions and cell phones to display colors and
shades.
Digital-to- analog conversion can degrade a signal,
so conversion details are normally chosen so that
the errors are negligible.
4. DAC USING MICROCONTROLLER
The digital-to-analog converter (DAC) is a device
widely used to convert digital pulses to analog
signals.
Recall from your digital electronics book the two
methods of creating a DAC:
Binary weighted and R/2R ladder.
The vast majority of integrated circuit DACs,
including the MC1408 (DAC0808) used in this
section, uses the R/2R method since it can achieve
a much higher degree of precision.
5. STEP BY STEP PROCEDURE
FOR INTERFACING
MCU-DAC
COMPONENTS REQUIRED
MCU (AT89C51)
DAC0808/MC1408
Resistors (10k,8.2k).
Capacitors(33pF,10uF).
Op-amp.
Oscilloscope.
Power Supply.
6. STEP BY STEP PROCEDURE
FOR INTERFACING
MCU-DAC
ALGORITHAM:
7. STEP BY STEP PROCEDURE
FOR INTERFACING
MCU-DAC
CIRCUIT DIAGRAM:
8. STEP BY STEP PROCEDURE
FOR INTERFACING
MCU-DAC
Procedure to generate Sine wave:
To generate a sine wave, first a table is designed
whose values represent the amplitude of the sine of
the angles between 0 and 360 degrees. The value
of the sine function varies from -1.0 to +1.0
To generate the sine wave the output of DAC is
assumed to be 10V. Full scale output of the DAC is
achieved when all the data inputs of the DAC are
high. Therefore to achieve the full-scale 10V output,
we use following equation.
Vout = 5V + (5*sinø)
10. FLOWCHART FOR OUR PROGRAM
START
INITIALISE VARIABLE
USE DPTR AS A POINTER TO
POINT TO THE LOOK UP TABLE
DATA ACCESSING USING INDEXED
ADDRESSING MODE
VALUE IS SENT TO THE PORT1
AND INCREMENT DPTR
DECREMENT
COUNTER=0??
END
NO
YES
11. ASSEMBLY LANGUAGE PROGRAM
START:MOV DPTR,#TABLE
MOV R1,#13
CLR A
LOOP: MOVC A,@A+DPTR
MOV P1,A
INC DPTR
DJNZ R1,LOOP
SJMP START
TABLE: ORG 200H
DB 128,192,238,255,238,192,128,64,17,0,17,64,128