Documente Academic
Documente Profesional
Documente Cultură
PROCESSOR LABORATORY
For the light sensor, we use an LDR (light dependent resistor). Since the output
from the LDR circuit is analog in nature, we use an ADC 0804 to interface with the
8051 microcontrollers. The ADC converts the analog signal from the LDR circuit
into an 8-bit binary output. This digital output is given to the 8051 through 8
parallel pins. The microcontroller compares this input with some threshold and
sends a high or low output to the LED. The LED is connected from one of the pins
of the microcontroller through a resistor.
BLOCK DIAGRAM
2).Keiluvision Software
3).LDR, ADC0804
Assembly Language Program:
Org 0000h
//WR BIT P2.6 //RD BIT P2.5
INTR BIT P2.7
MY DATA EQU P1 //P1.0-P1.7= D0-D7 of the ADC0804
MOV P1 ,#0FFH //make P1 input
MOV B,#3H // store the threshold voltage in B register
SETB INTR
CLR P3.0
BACK:CLR WR
SETB P2.6
HERE:JB INTR,HERE
CLR P2.5
MOV A,P1
CJNE A,B,LOOP
LOOP:JC DEST
CLR P3.0
SETB P2.5
SJMP BACK
DEST:SETB P3.0
SETB P2.5
SJMP BACK
END
Circuit diagram:
Conclusion:
From the project, we find applications of LED when used with AT89C51
in many areas and their importance. This project makes us get a good
grip on the 8051 courses.
BY
YESWANTH(RA1711004010418)
BHAVNA(RA1711004010407)
SHAURYA(RA1711004010432)