Ex NO _ 7
Ex NO _ 7
DATE :
Aim:
To interface the given DAC 0808 module with 8051 Microcontroller and to generate the
following waveforms : (i) Square wave (ii) Sawtooth wave (iii) Triangular wave (iv) Sinusoidal
wave.
Apparatus Required:
Problem Description:
To connect the Digital input of DAC to Port 1 of Microcontroller and to send Digital
values corresponding to the desired output voltage through Port 1 of 8051 Microcontroller so as
to generate any given waveform.
Formula :
𝑛
𝐷 =
2 −1
+ −
⎡⎢𝑉 − 𝑉− ⎤⎥
𝑉𝑟𝑒𝑓− 𝑉𝑟𝑒𝑓 ⎣ 𝑖𝑛 𝑟𝑒𝑓⎦
where,
D = Decimal equivalent of Digital input corresponding to analog output Vo
Vref+ and Vref- - reference voltages [ +5V and 0V respectively]
Algorithm:
a) Square Waveform:
b) Sawtooth Waveform:
c) Triangular Waveform :
d) Sinusoidal Waveform :
ALP:
Square Waveform:
Triangular Waveform:
Model Calculation:
D=
Digital Inputs
Result and Inference:
Assembly Language Program to interface DAC with 8051 Microcontroller is written and
executed. Square, triangular and sinusoidal waveforms were generated.
Marks Allocation
Preparation (5)
Program (5)
Viva (5)
Execution (5)
Record (5)