9.2 PROJECT 9.2 – Binary Counting Up LEDs
9.2.1 Project Description
This is a simple project where 8 LEDs are connected to PORT C of a PIC microcontroller. The LEDs count up in binary with a 1 second interval between each count. The pattern displayed by the LEDs will be as shown in Figure 9.11.
9.2.2 Block Diagram
The block diagram of the project is shown in Figure 9.12.
9.2.3 Circuit Diagram
The circuit diagram of the project is shown in Figure 9.13. If using the EasyPIC 7 development board, there is no need to change any jumper settings. An 8 MHz crystal is used to provide the clock signal. The microcontroller is Reset, using an external push-button switch.
9.2.4 Project PDL
The PDL of this project is very simple and is given in Figure 9.14.
9.2.5 Project Program
The program is named LED4.C and the program listing of the project is given in Figure 9.15. At the beginning of the project, variable Cnt is declared and initialised to ...
Get Using LEDs, LCDs and GLCDs in Microcontroller Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.