Advanced PIC Microcontroller Projects in C: From USB to RTOS with the PIC18F Series

Project 6.5: 7-Segment LED Counter

Project 6.5: 7-Segment LED Counter

Project Description

This project describes the design of a 7-segment LED-based counter which counts from 0 to 9 continuously with a one-second delay between counts. The project shows how a 7-segment LED can be interfaced and used in a PIC microcontroller project.

7-segment displays are used frequently in electronic circuits to show numeric or alphanumeric values. As shown in Figure 6.20, a 7-segment display consists basically of 7 LEDs connected such that the numbers from 0 to 9 and some letters can be displayed. Segments are identified by the letters from a to g, and Figure 6.21 shows the segment names of a typical 7-segment display.


Figure 6.20: Some 7-segment displays

Figure 6.21: Segment names of a 7-segment display

Figure 6.22 shows how the numbers from 0 to 9 are obtained by turning ON different segments of the display.


Figure 6.22: Displaying numbers 0 to 9

7-segment displays are available in two different configurations: common cathode and common anode. As shown in Figure 6.23, in common cathode configuration, all the cathodes of all segment LEDs are connected together to the ground. The segments are turned ON by applying a logic 1 to the required segment LED via current limiting resistors. In common cathode configuration the 7-segment LED is connected to the microcontroller in current sourcing mode.


Figure 6.23: Common cathode configuration

In common anode configuration, the anode terminals of all the LEDs are connected together as shown in Figure 6.24. This common point is then...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Digital LED Displays
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.