18F Single 7 Segment Display Example
7 segment displays are a cheap
and effective way to display data. The only real downsides to them are;
- Unable to retain data if more than one display is used (ie,
need to continually refresh each segment display)
- Require many Pins to interface (7 for one display, 16 for
two and so on)
The data that they display can
be manipulated so that the same 7 data lines can multiplex information
onto other displays at the same time. This can be seen in the
Multiple section. But for now, and future routines, this
diagram illustrates how to connect a common cathode 7 segment display to a
PIC micro.
Schematic

Note the PIC's
power supply/oscillator are not shown
The box that the 7 segment is
in represents the common. There are two types of 7 segment displays,
common
cathode and common anode. In my projects, I use common cathode displays. i.e.


As you can see,
to control any of the segments, a +ve signal is required, as they all share the
same earth. aka common cathode.
The chances of
creating an application that only need a single segment display are
fairly limited, but none the less, I made a
Swordfish
User Library to
make it very easy to interface with.
Video Tutorials:
Download Spency's
Single 7 Segment User Library Module
Link:
What is a Swordfish
Library?

 | Site Tutorial Index |
|  | 16F PIC Examples |
|  | 18F PIC Examples |
| |  | 7 Segment Displays |
| |  | 7 Segment Displays |
| |  | RS232 and UART |
| |  | Code Snippets |
|  | Handy Tips |