Professional Documents
Culture Documents
MOV A,#06H
MOV P1,A
D1 P1.0
D2 P1.1
P1.2
D3
P1.3
D4 P1.4
D5 P1.5
D6 P1.6
D7 P1.7
8051
UC
P3.0
P3.1
P3.2
22/09/15 8051 Interfacing - Copyleft 7
Programming LCD
● RS = 0
● RW = 0
● EN = HIGH TO LOW
22/09/15
Keypad Interfacing Flowchart
●
Sensors takes the environmental change and converts
into Analog Electrical Signal
●
Microcontroller Understand only Digital Logic
●
ADC Converts Analog Signal to Digital Signal
●
Voltage is Coverted into Bits of Data
●
High the resolution of ADC more the data samples
●
8 Bit ADC = 256 Samples
ADC0804 Interfacing Diagram
ADC0804 Pin Description
●
WR
●
Start of Conversion (O/P for 8051)
●
Low to High Transaction
●
Converts Analog Input into 8 bit Digital
●
INTR
●
End of Conversion(I/P for 8051)
●
Active Low
●
RD
●
Output Enable (I/P for 8051)
●
To get the 8-bit data from ADC out of D0-D7 Lines
ADC0804 Timing Diagram
RD BIT P2.5
WR BIT P2.6
INTR BIT P2.7
MYDATA EQU P1
MOV P1,#0FFH
SETB INTR
CLR WR
SETB WR
HERE: JB INTR, HERE
CLR RD
MOV A,MYDATA
SETB RD
SJMP BACK
22/09/15 8051 Interfacing - Copyleft 25
Digital to Analog(DAC) Interfacing with 8051
BACK:
MOV A,#0FFH
MOV P1,A
ACALL DELAY
MOV A,#00H
MOV P1,A
ACALL DELAY
SJMP BACK
END
BACK:MOV A,#00H
INCRE:MOV P1,A
INC A
CJNE A,#0FFH,INCRE
DECRE:MOV P1,A
DEC A
CJNE A,#00H,DECRE
SJMP BACK
END
BACK:MOV A,#00H
INCRE:MOV P1,A
INC A
CJNE A,#0FFH,INCRE
SJMP BACK
END
1 1 1 0 0
2 0 1 1 0
3 0 0 1 1
4 1 0 0 1
1 1 0 0 1
2 1 0 0 0
3 1 1 0 0
4 0 1 0 0
5 0 1 1 0
6 0 0 1 0
7 0 0 1 1
8 0 0 0 1
1 1 0 0 0
2 0 1 0 0
3 0 0 1 0
4 0 0 0 1
● https://www.sites.google.com/site/sripathroykoganti/my-forms