Function Generator Using 8051

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 6

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
+5v

8051

DAC 0808
Vref(+) Vcc

1k 1.5k

P1.0

D0

Vref(-)

2.5k Iout Vout = 0 10v

CRO

P1.7

D7

Comp.

5k pot 100pF

Vee -12v GND

Sine wave details:


Angle (Degrees) 0 30 60 90 120 150 180 210 240 270 300 330 360 Sin 0 0.5 0.866 1.0 0.866 0.5 0 - 0.5 - 0.866 - 1.0 - 0.866 - 0.5 0 Vout (Voltage Magnitude) 5v +(5v x sin ) 5 7.5 9.33 10 9.33 7.5 5 2.5 0.669 0 0.669 2.5 5 Decimal values sent to DAC (V magnitude x 25.6) 128 192 238 255 238 192 128 64 17 0 17 64 128

Wavefrom
Volts 10 9 8 7 6 5 4 3 2 1 0 30 60 90 120 150 180 Degrees 210 240 270 300 330 360

Angle vs Voltage Magnitude for Sine wave

8LERO]SY

You might also like