Professional Documents
Culture Documents
1. Overview.
This I/O board provides an 8-digit 7-
segment display for use with embedded
microcontrollers. The display digits can
be driven directly or via a multiplexed
display method.
2. Scanned Displays.
Seven segment displays are designed to be
driven in a ‘scanned’ manner. A
‘scanned’ display simply means that each
digit is lit individually to display its
number and the digits are lighted and
extinguished one after the other to create a multi-digit number. This process must occur
faster than the human eye can detect the flicker as one digit after the other lights. The
‘flicker rate’ (the fastest flicker the eye can detect) is approximately 42 Hz.
Consequently the entire display must be displayed in less than 24ms. In order for the
scanning process to be invisible to the human eye. In an 8-digit display, therefore, each
digit would need to be on for less than 3 ms. (24ms. / 8 = 3ms.) Lighting the LED
displays too quickly doesn’t give them time to reach full brilliance. Taking all these
factors together suggests a scanning rate of 1ms. Per digit is about right.
3. Scanning Steps.
The basic scheme to scan a display is to set up a timer to interrupt every 1ms. Place the 8
numbers to be displayed into an array. When the interrupt occurs (every 1 ms or so):
• Extinguish the digit currently on. Important to prevent ‘smearing’.
• Place the number data for the next display on the display data pins.
• Light the next digit.
• Index the digit counter and if it is up to 8 (or 4 if driving individual banks),
reset it to zero.
In this way the display is continuously updated to display whatever numbers are in the
array. The software, then, only needs to change the contents of the array to change what
is being displayed.
Direct Display Mode. In direct mode, P201, the Right Bank Control input
connection is used to drive the right-hand 4 digits (DS201 through DS204) and P202,
This I/O board provided through the generosity of the Hoffer Plastics Foundation.
Seven-Segment Board
V1.0 RHB 8/04
the Left Hand Bank Control is used to drive the left-hand four digits (DS205 through
DS208). Both banks work identically. See tables below:
P201
Digit Affected Function
Bit
7 DS208 A ‘0’ lights the digit.
6 DS207 A ‘0’ lights the digit.
5 DS206 A ‘0’ lights the digit.
4 DS205 A ‘0’ lights the digit.
3 Lighted Digit MSB
2 Lighted Digit … Data for number to be
1 Lighted Digit … displayed.
0 Lighted Digit LSB
P202
Digit Affected Function
Bit
7 DS204 A ‘0’ lights the digit.
6 DS203 A ‘0’ lights the digit.
5 DS202 A ‘0’ lights the digit.
4 DS201 A ‘0’ lights the digit.
3 Lighted Digit MSB
2 Lighted Digit … Data for number to be
1 Lighted Digit … displayed.
0 Lighted Digit LSB
Example. The scanning steps given above would be (for the right bank):
This I/O board provided through the generosity of the Hoffer Plastics Foundation.
Seven-Segment Board
V1.0 RHB 8/04
P201
Function
Bit
7 MSB
Number of digit to be
6 …
lighted (DS201 = #0, DS202
5 …
= #1, …. DS208 = #7).
4 LSB
3 MSB
2 … Data for number to be
1 … displayed.
0 LSB
This I/O board provided through the generosity of the Hoffer Plastics Foundation.
Seven-Segment Board
V1.0 RHB 8/04
This I/O board provided through the generosity of the Hoffer Plastics Foundation.
Seven-Segment Board
V1.0 RHB 8/04
This I/O board provided through the generosity of the Hoffer Plastics Foundation.