Easy
PIC
for dsPIC30
®
v7
page 27
One seven segment digit consist of
7+1 LEDs which are arranged in a
specific formation which can be used
to represent digits from 0 to 9 and
even some letters. One additional LED
is used for marking the decimal dot, in
case you want to write a decimal point
in the desired segment. EasyPIC
™
v7 for
dsPIC30
®
contains four of these digits
put together to form 4-digit 7-segment
display. Driving such a display is done
using multiplexing techniques. Data
lines are shared between segments, and
therefore the same segment LEDs in
each digit are connected in parallel. Each
digit has it’s unique digit select line,
which is used to enable the digit
to which the data is currently being
sent. By multiplexing data through all
four segments fast enough, you create
an illusion that all four segments are
in operation simultaneously. This is
possible because human eye has a
slower reaction time than the mention
changes.
This way you can represent numbers in
decimal or hexadecimal form. Eight data
lines that are common for all the digits
are connected to PORTB, and digit select
lines are connected to RC13, RC14, RF4
and RF5 lines on the microcontroller
sockets.
To enable digit select lines for the 4-digit
7-segment display you have to turn on
SW11.1, SW11.2, SW11.3 and SW11.4
switches. Digit select lines are connected
to RC13, RC14, RF4 and RF5 pins on the
microcontroller sockets, while data lines are
connected to RB0 – RB7 pins. Make sure
to disconnect other peripherals from the
interface lines in order not to interfere with
signal/data integrity.
1
2
4
5
6
7
9
8
10
3
b
a
c
d
e
f
g
dp
cc
1
2
4
5
6
7
9
8
10
3
b
a
c
d
e
f
g
dp
cc
1
2
4
5
6
7
9
8
10
3
b
a
c
d
e
f
g
dp
cc
1
2
4
5
6
7
9
8
10
3
b
a
c
d
e
f
g
dp
cc
SE
G
A
SE
G
A
SE
G
A
SE
G
A
SE
G
B
SE
G
B
SE
G
B
SE
G
B
SE
G
C
SE
G
C
SE
G
C
SE
G
C
SE
G
D
SE
G
D
SE
G
D
SE
G
D
SE
G
E
SE
G
E
SE
G
E
SE
G
E
SE
G
F
SE
G
F
SE
G
F
SE
G
F
SE
G
G
SE
G
G
SE
G
G
SE
G
G
SE
G
D
P
SE
G
D
P
SE
G
D
P
C
O
M
0
C
O
M
1
C
O
M
2
C
O
M
3
SEG E
SEG D
SEG C
SEG DP
SEG B
SEG A
SEG F
SEG G
R81
470
R82
470
R83
470
R84
470
R85
470
R86
470
R87
470
R88
470
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
Q1
BC846
Q2
BC846
Q3
BC846
Q4
BC846
R28
10K
R29
10K
R30
10K
R31
10K
COM3
COM0
COM1
COM2
SE
G
D
P
1
2
3
4
5
6
7
8
O
N
SW11
DIS0
DIS1
DIS2
DIS3
RC13
RC14
RF4
RF5
DATA BUS
Figure 14-2: 4-digit 7-segment display schematics
Figure 14-1: Turn on switches
1 through 4 on SW11 to enable
4-digit 7-seg display
Enabling the display
4 digit
7-seg display
displa
ys