Home
Welcome
Information


FPGA projects - Basic
Music box
LED displays
Pong game
R/C servos
Text LCD module
Quadrature decoder
PWM and one-bit DAC
Debouncer
Crossing clock domains
The art of counting
External contributions

Interfaces
RS-232
JTAG
I2C
EPP
SPI
PCI
PCI Express
Ethernet
HDMI
SDRAM

Advanced
Digital oscilloscope
Graphic LCD panel
Direct Digital Synthesis
CNC steppers
Spoc CPU core

Hands-on
A simple oscilloscope


FPGA introduction
What are FPGAs?
How FPGAs work
Internal RAM
FPGA pins
Clocks and global lines
Download cables
Configuration
Learn more

FPGA software
Design software
Design-entry
Simulation
Pin assignment
Synthesis and P&R

FPGA electronic
SMD technology
Crystals and oscillators

HDL info
HDL tutorials
Verilog tips
VHDL tips

Quick-start guides
ISE
Quartus-II

Site
FPGA links
HDL tutorials
Forum


LED multiplexing

Now that we know how to drive 7-segments displays, let's aggregate them to make big counters.

The pin count issue

Let's try to build a big display that uses eight 7-segments displays, so that it can show numbers from 0 to 99999999.
If we build it the straightforward way, we are using 64 FPGA pins.

That's not practical as it's a wiring nightmare.
There must be a better way!
LED multiplexing

Now we are using only 16 FPGA pins.
The trade-off is that only one display out of eight can be lit at any particular time. But if the FPGA switches "fast enough", it seems that all the displays are lit.

"Fast enough" means 100Hz or more.
At 100Hz, a display cycle would last 10ms (and each display would be lit 1.25ms per cycle).

Notes:

An 8-digits BCD counter example

Here's a counter design that drives a multiplexed 8-digits 7-segments display.
The counter goes from 00000000 to 99999999, then rolls-over.

The design uses 3 modules:
  1. BCD1: BCD counter (single digit)
  2. BCD8: BCD counter (holds 8 digits)
  3. LED_BCD8x7seg: top-level that drives the display by multiplexing 8 digits

Get the file here.



>>> NEXT - part 6: LED dot-matrix displays >>>



This page was last updated on July 05 2010.