Interfacing The 8051 Microcontroller
Interfacing The 8051 Microcontroller
RTC Interface
89C51 Vc
VCC
DS 1307
10 10
5
P1.0 SDA 8
6 1
P1.1 SCL X
32.768K
3 2
+ BAT X
3.6V
- 4 7
INTB\SQ
GND
7437 748 KY CS
740
1
E
1 C 740 R0\
KEY
8 P2. 3 2 WR
1 ROW
9 1
4 5 ROW
C 1 1
5 7 6
1 1
1 8 9
1 1
P2. ROW
Vc
COL-1 1
743 COL-2 2
P10
P11
3
P12
4
5 P13
6 P14
P15
COL-6
+5 8
9
C
7486
1 5
1 INT
3 1
2
89C51 +
74F138 10u
P1.7 A2 KB
74C922
P1.6 A1
A0 X
P1.5 X
Vcc E3
ALE X
E2 O2 X
E1 Y 0 1 2 3
RD OE 4 5 6 7
Y
8 9 A B
INT Data Y
Y C D E F
0.01uF
Keyboard Interface-2
¾ 74C922 is a 16 key encoder that performs keypad scanning and de-bouncing
¾ When key is pressed it outputs a 4 bit code
¾ When interfaced to micro-controller, it reads the code through its port pins
¾ Has key De-bouncing and key mask features
¾ It has a data available output that interrupts the micro-controller
¾ Interrupt software to find the key pressed
Keyboard Interface-3
MC14051 89C51
10Kohms
X7 inhibit
X6
X5
5
X4 X INT
X3
X2 C P1.5
X1 B P1.4
P1.3
X0 A
P1.2
C
74ALS138 B P1.1
P1.0
A
P1.6 D0 VRF
P1.7 CS Analog
Vin
Input
1 CCLK
GND
CCL
5V
0.1u 10u VI 1 1
89C51 AD7703
VD
fail
P4.0 SCLK
VOUTA +
DIN LM393A
P4 1 Pass
+
P4.2 SYNC VOUT B LM393A
74HC05
GND REF
0.1u
Power
230V
+12V +5V
Trickle- 1N19
Charge Vcc of
4 89C51
Circuit
MAX690
2
10 Vc
K
8 Vbat 1
+ Vo
4.8 V
Ni-Cad battery
Varta Aafetronic 7
Reset
(100 mAh)
Reset
Vss
3
RX 1 7
R Received
1 4
+ + 22uf
22uf 3 5
2 6
+
22uf 22uf
15 +
¾ RS 232 interface can be realised with 1488 (transmitter) and 1489 (receiver) level
translator Ics
¾ These ICs require +\- 12V supplies
¾ Max 232 IC require only 5V and four external capacitors
LCD Interface
89C51 74F138
P2.7/A15 A2
P2.6/A14 A1
P2.5/A13 A0 LM015
VCC
E3
ALE E2
E1
WR R\W
74F373
L
AD7-AD0 O RS
D7-
O
DB7-DB0
+5 MC14489
A
VCC B
C
8
D
RX E
8 8 8 8 8
F
3.6 G
H
89C51
P1.2 Data IO
P1.1 Clock Bank 5
P1.0 Enable Bank 4
Bank 3
Bank 2
Bank 1
¾ MC14489 is a multi character LED driver
¾ With out additional ICs 89C51 can be interfaced to drive five 7 Segment LED
displays.
¾ 24 bit data is serially transmitted to the driver by the 89C51 to display five digits
with decimal point option
¾ MC14489s can be cascaded for more number of displays
¾ The brightness is controlled by the external resister 3.6K