Sei sulla pagina 1di 18

8051 Microcontroller:

Display Interfacing
Virendra Singh
Associate Professor
Computer Architecture and Dependable Systems Lab
Department of Electrical Engineering
Indian Institute of Technology Bombay
http://www.ee.iitb.ac.in/~viren/
E-mail: viren@ee.iitb.ac.in

EE-309: Microprocessors

Lecture 13 (18 Aug 2014)

CADSL

8051
Pin
Diagram

P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
RST
(RXD)P3.0
(TXD)P3.1
(INT0)P3.2
(INT1)P3.3
(T0)P3.4
(T1)P3.5
(WR)P3.6
(RD)P3.7
XTAL2
XTAL1
GND

18 Aug 2014

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

EE-309@IITB

8051
(8031)
(8751)
(8951)

40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21

Vcc
P0.0(AD0
)P0.1(AD1)
P0.2(AD2
)P0.3(AD3)
P0.4(AD4)
P0.5(AD5)
P0.6(AD6)
P0.7(AD7)
EA/VPP
ALE/PROG
PSEN
P2.7(A15)
P2.6(A14
)P2.5(A13
)P2.4(A12
)P2.3(A11)
P2.2(A10)
P2.1(A9)
P2.0(A8)

CADSL

Display
Interfacing
18 Aug 2014

EE-309@IITB

CADSL

Display Devices
Most popular display device: LED

Very Any in size


Available in many colors
Very reliable and rugged
Long life
Operates at low voltage
Small power consumpAon
Visible in darkness

Single LED
Bicolor LED
Seven Segment Displays
Common Cathode Form (ICM 7218D)
Common Anode Form (ICM 7218C)
Consumes large amount of current
18 Aug 2014

EE-309@IITB

CADSL

Interfacing a single LED


Vcc
R

IF

LED

Driver circuit to
interface a single LED

SWITCH
Vt

R2
R1

VF

Vcc

Port
line

R1
R1

Port
line

Port
line

18 Aug 2014

EE-309@IITB

CADSL

Seven Segment LEDs


a

f
e

dp

dp

g c
d

d
p

Common anode

Common Cathode
a

Two types: Common cathode


and common anode type
Seven-segment LEDs can be
conveniently used to display
HEX characters
EE-309@IITB

a
b

g
c

c
d

f
g

g
c

d
a

a
f

a
f

b
g

e
d

18 Aug 2014

g
c

a
f

g
e

g
e

CADSL

Interfacing multiple 7-Segment LEDs


+5V
3.9 K
A0

A1

A2

8
14
2 4

A3

B0
B1

1
7
8

B3

14

5
10
12
6 9 13

2 4

B2

150

11
75491

9 13
3
5

b c

d
p

b c

d
p

10
75491

12

11

3.9 K

150
+5V
+5V

3.9 K

11
75492

S0

S1

S2

S3
S4

10
12

13

S5

14

9
4

18 Aug 2014

EE-309@IITB

CADSL

Multidigit Driver
Features of MulAdigit Driver
8-segment driver output lines
8-digit driver lines
20 mA peak current
LEDs can withstand high peak current
Sequencing operaAon:
Select data using digit address lines DA0-2
Write data using ID0-3 and ID7 lines
Three modes of operaAon:
HIGH: HEX, LOW: OFF, OPEN: CODED-HELP
18 Aug 2014

EE-309@IITB

CADSL

Interfacing using Multidigit Driver


P1.0

P1.7

8051

P3.0

d
pg
f
e
d
c
b
a

ID0
ID1
ID2
ID3
ID7
DA0
DA1
DA2

WRITE
MODE
V+
GND

DIGIT1
DIGIT2
DIGIT3
DIGIT4
DIGIT5
DIGIT6
DIGIT7
DIGIT8

dp

ICM7218D

18 Aug 2014

EE-309@IITB

CADSL

Liquid Crystal Displays


Key features:
Low Power ConsumpAon
Voltage Controlled
Easy to read in bright light
Ability to display Characters/Graphics
Intelligent controller and LCD display panels
readily available

18 Aug 2014

EE-309@IITB

10

CADSL

Liquid Crystal Displays


P1.0
P1.1
P1.2
P1.3

B0
B1 DATA IN
B2
B3

P1.4
P1.5
P1.6
P1.7

D0
D1 DIGIT
D2
SELECT
D3

DIGIT 1

g
a

DIGIT 2

g
a

OSC
VCC

DIGIT 3
DISPLAY MODULE

g
a
GND

DIGIT 4

g
BACK
PLANE

18 Aug 2014

EE-309@IITB

11

CADSL

Data
Communication
18 Aug 2014

EE-309@IITB

12

CADSL

8051 and PC
The 8051 module connects to PC by using RS232.
RS232 is a protocol which supports half-duplex,
synchronous/asynchronous, serial communicaAon.
We discuss these terms in following secAons.
RS232
PC

COM 1 port

18 Aug 2014

8051

MAX232

EE-309@IITB

UART

13

CADSL

Simplex vs. Duplex


Transmission
Simplex transmission: the data can sent in one
direcAon.
Example: the computer only sends data to the printer.

Transmitter

Receiver

Duplex transmission: the data can be transmibed


and receive
Transmitter

Transmitter

Receiver

Receiver

18 Aug 2014

EE-309@IITB

14

CADSL

Half vs. Full Duplex


Half duplex: if the data is transmibed one way at a
Ame.
Transmitter

Receiver

Receiver

Transmitter

Full duplex: if the data can go both ways at the same


Ame.
Two wire conductors for the data lines.
Transmitter

Receiver

Receiver

Transmitter

18 Aug 2014

EE-309@IITB

15

CADSL

Simplex, Half-, and FullDuplex Transfers


Half Duplex

Full Duplex

18 Aug 2014

Transmitter

Receiver

Receiver

Transmitter

Transmitter

Receiver

Receiver

Transmitter

EE-309@IITB

16

CADSL

Parallel vs. Serial Data Transfer


Computers transfer data in two ways:
Parallel
data is sent a byte or more a Ame (fast)
Only short distance between two systems
The 8-bit data path is expensive
Example: printer, hard disks

Serial
The data is sent one bit at a Ame (slow)
Long distance (rarely distorAon)
cheap
The data can be transferred on the telephone line (by using modem.)
18 Aug 2014

EE-309@IITB

17

CADSL

Thank You
18 Aug 2014

EE-309@IITB

18

CADSL

Potrebbero piacerti anche