0% found this document useful (0 votes)
16 views

Experiment 1

This experiment involves developing an embedded system using an 8051 microcontroller interfaced with an ADC and DAC to study the attenuation and distortion of a recovered sinusoid signal for various input frequencies. An assembly code was written to sample the input sinusoid using the ADC in interrupt mode and output it through the DAC. Oscilloscope waveforms showed minimal distortion below 400Hz but appreciable distortion above 400Hz. The conclusion is frequencies above 400Hz cause distortion in the recovered signal.

Uploaded by

Amit Dipankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Experiment 1

This experiment involves developing an embedded system using an 8051 microcontroller interfaced with an ADC and DAC to study the attenuation and distortion of a recovered sinusoid signal for various input frequencies. An assembly code was written to sample the input sinusoid using the ADC in interrupt mode and output it through the DAC. Oscilloscope waveforms showed minimal distortion below 400Hz but appreciable distortion above 400Hz. The conclusion is frequencies above 400Hz cause distortion in the recovered signal.

Uploaded by

Amit Dipankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Experiment 1

Task :-

To develop an Embedded system in Proteus interfacing ADC-0808 and DAC-0808 with 8051-MC using
Keil software. RTOS Structured code is developed and the attenuations and distortions of the recovered
sinusoid is studied for various frequencies of the input sinusoid.

Components used :-

1. 8051 microcontroller (AT89C52)


2. ADC (ADC0808)
3. DAC (DAC0808)
4. Crystal oscillator (12 MHz)
5. Op-Amp (741)
6. Sine wave generator
7. Not gate
8. Digital oscilloscope
9. Resistors and capacitors

Schematic diagram :-
Assembly code :-
;including libraries
$NOMOD51
$INCLUDE (80C52.MCU)

;definitions
AD_op equ P0
ALE equ P3.5
SOC equ P3.4
EOC equ P3.2 ; external interrupt 0
DA_ip equ P2
Ex_edge equ TCON.0 ; to set external interrupt 0 as edge trigger

;variables
IE_val equ 81h ; to enable external interrupt 0
T2mod_val equ 02h ; to set as up programmable clock output and T2OE enable
T2con_val equ 00h ; to set it in 16 bit autoreload mode without TR2 and programmable clock out
RCAP_valL equ 0FCh ; lower byte of timer value for 691kHz clock out at T2 pin with 11MHz clock
RCAP_valH equ 0FFh ; higher byte

;reset vector
org 0000h
sjmp Start

org 0003h
sjmp ADC_ISR

;code starts here


;org 0100h
Start: mov AD_op, #0FFh ; set P0 set as input port
mov DA_ip, #00h ; make P2 made as output port
mov T2MOD, #T2mod_val ; programmable clock initialise (691kHz)
mov T2CON, #T2con_val
mov RCAP2L,#RCAP_valL
mov RCAP2H,#RCAP_valH
setb TR2 ; start timer2 to supply ADC clock
mov IE, #IE_val ; set for ADC interfacing in interrupt driven mode
setb Ex_edge ; falling edge triggered

setb ALE ; start ADC


setb SOC ; some delay for generating a pulse
clr ALE
clr SOC

Loop: sjmp Loop

ADC_ISR:push ACC
mov A, AD_op
mov DA_ip, A
setb ALE ; start ADC
setb SOC
clr ALE
clr SOC
pop ACC
reti
;code ends here
Oscilloscope view at different frequencies :-

1. At 50 Hz

2. At 100 Hz,
3. At 200 Hz,

4. At 400 Hz,
5. At 600 Hz,

Conclusion :-

From the above observation, it can be concluded that for frequencies above and around 400 Hz,
appreciable distortions are observed in the recovered sinusoidal signal.

Prepared by:-
K Santanu Sekhar Senapati
Roll No. – 118EE0577

You might also like