DAC Interfacing with 8051.pdf

15,702 views 4 slides Apr 27, 2023
Slide 1
Slide 1 of 4
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4

About This Presentation

DAC Interfacing with 8051


Slide Content

Interfacing DAC with 8051 T.Srikrishna , M.Sc, M.Tech, GVP

DAC Interfacing with 8051
 The DAC is a device widely used to convert digital pulses to
analog signals.
 Here we will discuss the basics of interfacing a DAC to 8051.
 In these systems MC generates output which is in digital form.
 But the controlling system requires analog signal as they don't
accept digital data.
 Thus it necessary to use DAC which converts digital data into
equivalent analog voltage.
 In the figure shown, we use 8-bit DAC 0808.
 This IC converts digital data into equivalent analog Current.
Hence we require an I to V converter to convert this current
into equivalent voltage.
 The two methods of creating a DAC is Binary weighted and
R/2R ladder network.
 We will also see the triangular and square wave generation.

Interfacing DAC with 8051 T.Srikrishna , M.Sc, M.Tech, GVP


In the DAC0808, the digital inputs are converted to current (Iout),
and by connecting a resistor and op-amp to the Iout pin, we convert
the result to voltage Vo.

According to theory of DAC Equivalent analog output is given as:

Interfacing DAC with 8051 T.Srikrishna , M.Sc, M.Tech, GVP


Exmple:
1. IF data =00H [00000000], Vref= 10V

Therefore, V0= 0 Volts.

2. If data is 80H [10000000], Vref= 10V

Therefore, V0= 5 Volts.

Different Analog output voltages for different Digital signal is given
as:

Interfacing DAC with 8051 T.Srikrishna , M.Sc, M.Tech, GVP

8051 Assembly code to generate triangular wave
ORG 0000H
CLR A
UP: INC A
MOV P2,A
CJNE A, #0FFH, UP
DOWN: DEC A
MOV P2,A
CJNE A, #00, DOWN
SJMP UP
END
8051 Assembly code to generate SUARE wave
ORG 0000H
BACK MOV A, #00H
UP; MOV P1,A
CALL DELAY
DOWN: MOV A,FFH
MOV P1,A
CALL DELAY
SJMP BACK.

DELAY: MOV R2,#0FFH
WAIT: DJNZ R2, WAIT
RET
Tags