Sie sind auf Seite 1von 5

Seven-Segment Board

V1.0 RHB 8/04

ECET Seven-Segment Display Board

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.

4. Direct vs. Multiplexed Display.


The ECET I/O board may be driven in either ‘direct’ or ‘multiplexed’ mode. In direct
mode, the display functions as two independent 4-digit displays each of which is driven
from an 8-bit port. Multiplexed mode allows driving all 8 digits from a single 8-bit port.
Selecting Direct or Multiplexed mode is accomplished by putting the toggle switch in the
appropriate position (see labels on the board for guidance).

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):

Note: Assume that the process starts with DS201 lit.


• Extinguish the digit currently on. Set P202, bit 4 high to extinguish DS201.
• Place the number data for the next display on the display data pins. Place
the binary code for the number to be displayed on the lower 4 bits of P202.
• Light the next digit. Set P202, bit 5 low to light the digit.
• Index the digit counter and if it is up to 4, reset it to zero.
• Repeat forever.

Multiplexed Display Mode. Multiplexed display mode allows all 8 digits to be


driven via a single 8-bit port connected to P201, Right Bank Control & MPX Control.
In this case, the connector bits are defined as:

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

Example. The scanning steps given above would be:

Note: Assume that the process starts with DS201 lit.


• Extinguish the digit currently on. Not possible in this mode
• Place the number data for the next display on the display data pins. Place
the binary code for the number to be displayed on the lower 4 bits of P201.
• Light the next digit. Set the upper 4 bits of P201 to the number of the digit to
be displayed.
Note: To prevent ‘smearing’, it is best to combine the two steps above and
change all 8 bits of P201 simultaneously.
• Index the digit counter and if it is up to 8, reset it to zero.
• Repeat forever.

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.

Das könnte Ihnen auch gefallen