Function generator using 8051
-
Upload
visvesvaraya-national-institute-of-technology-nagpur -
Category
Education
-
view
4.662 -
download
1
Transcript of Function generator using 8051
Function Generator using 8051
Prepared by
Mr. Paresh R. Kamble
Guided by
Prof. Anish Goel
Overview• Aim: To generate sine, rectangular and triangular waveforms using 8051.
• DAC 0808 will convert 8-bit digital output of 8051 to analog value.
• It uses R/2R ladder method for conversion from D 2 A.
• Iout = Iref {(D7/2)+(D6/4)+(D5/8)+(D4/16)+(D3/32)+(D2/64)+(D1/128)+(D0/256)}
where, D0 – LSB, D7 – MSB, Iref – 2mA fixed current
• Output is available in the form of current at Iout pin of DAC.
• After amplification it is provided to the Oscilloscope.
Block Diagram
P1.0
P1.7
8051
Vcc
D0
D7
GND
DAC 0808
+5v
1k1.5k
Vref(+)
Vref(-)
2.5k CRO
Iout Vout = 0 – 10v
Comp. 5k pot
100pFVee
-12v
Sine wave details:Angle θ (Degrees) Sin θ Vout (Voltage Magnitude)
5v +(5v x sin θ)Decimal values sent to DAC
(V magnitude x 25.6)
0 0 5 128
30 0.5 7.5 192
60 0.866 9.33 238
90 1.0 10 255
120 0.866 9.33 238
150 0.5 7.5 192
180 0 5 128
210 - 0.5 2.5 64
240 - 0.866 0.669 17
270 - 1.0 0 0
300 - 0.866 0.669 17
330 - 0.5 2.5 64
360 0 5 128
WavefromVolts
109
87
654
32
1
0 30 60 90 120 150 180 210 240 270 300 330 360 Degrees
Angle vs Voltage Magnitude for Sine wave
Thank you !