ThVortex

LED 7-Segment Display

This is a pair of GUI components that implement a 7-segment LED display with a decimal point and a common cathode/anode connection. The common connection can be used by a micro-controller to multiplex between several displays. To save screen space, multiple instances of a component will create their displays within a shared frame in the VMLAB Control Panel window. The diagram to the right shows the layout of individual segments within a display. This component is licensed under the GNU LGPL v2.1.

Downloads

  • led7seg-1.0.zip - Contains the precompiled "led7cc.dll" and "led7ca.dll" component files.
  • led7seg-1.0-src.zip - Contains the common source code to both components, a BCC55 makefile, and all of the icon images needed to re-build the DLLs.

Usage

; To use these components, use one of the following component definitions:
;
; X<Name> _led7cc <A> <B> <C> <D> <E> <F> <G> <DP> <CATHODE>
; X<Name> _led7ca <A> <B> <C> <D> <E> <F> <G> <DP> <ANODE>
;
; The instance <Name> must end with an integer number. It is this number which
; associates an instance of the component with a 7-Segment display in the
; control panel window. For example, an instance <Name> such as "abc12" would
; use display number 12 in the control panel. Pins <A> through <G> control the
; individual segments of
the display, and pin <DP> controls the decimal point.
; The common <CATHODE>
or <ANODE> pin acts as a global enable for the entire
; display.

;
; The "led7cc" component implements a common cathode display. Its LED segments
; will illuminate when a logic 1 is applied to any of the individual segment
; pins and a logic 0 is applied to the common <CATHODE> pin. The "led7ca"
; component implements a common anode display, which requires a logic 0 on the
; individual pins and a logic 1 on the common <ANODE> pin to illuminate.

Example

X2 _led7cc VDD VDD GND VDD VDD GND VDD GND GND
XletterA11 _led7cc VDD VDD VDD GND VDD VDD VDD GND GND

Version History

  • v1.0 - 2009-02-16 - Implemented as both common anode and cathode components
  • v0.1 - 2009-02-13 - Initial public release

Future Improvement Ideas

  1. The component should have an "off delay" parameter so that multiplexed displays can be shown in the GUI without blinking. See my forum post on this topic.
  2. The components could detect a pulse width modulated signal on the pins, and they could adjust the opacity of the individual segments to simulate the variable brightness that would be perceived with a real 7-segment display.

Screenshot

Below is a screenshot of VMLAB's Control Panel window showing several instances of the "led7cc" component: