10.1 PROJECT 10.1 – Single Digit Up Counting 7-Segment LED Display

10.1.1 Project Description

This is perhaps the simplest 7-segment LED project we can have. In this project, a 7-segment LED display is connected to PORT D of a PIC microcontroller. The LED counts up from 0 to 9 and then back to 0 continuously, with a 1 second delay between each count.

10.1.2 Block Diagram

The block diagram of the project is shown in Figure 10.1.

Figure 10.1 Block diagram of the project

img

10.1.3 Circuit Diagram

The circuit diagram of the project is shown in Figure 10.2. A common-cathode type display is used in this project (see Chapter 5), where the cathode is connected to ground and a segment is turned ON by setting it to logic HIGH. The segments are driven using current limiting resistors. In this project, a PIC18F45K22 type microcontroller is used, but any other model with at least 7 I/O ports can also be used. An 8 MHz crystal is used to provide the clock signals. The microcontroller is Reset using an external push-button.

Figure 10.2 Circuit diagram of the project

img

10.1.4 Project PDL

The PDL of this project is very simple and is given in Figure 10.3.

Figure 10.3 PDL of the project

img

10.1.5 Project ...

Get Using LEDs, LCDs and GLCDs in Microcontroller Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.