7-Segment Display with Shift Register Interfacing with PIC18F4550

Digital up/down counter using PIC18F4550 and CCS C

A serial-in parallel-out shift register (74HC164, 74HC595, CD4094…..) can be added to a 7-segment display. The adding of the shift register minimizes the number of pins used by the 7-segment display. This topic shows how to make a 4-digit digital counter with multiplexing and 74HC164 shift register using PIC18F4550 and CCS PIC C compiler.

Interfacing PIC18F4550 with multiplexed 7-Segment display with shift register circuit:
Example circuit schematic is shown below where a common anode 7-segment display and 74HC164N shift register are used.
Other shift registers such as 74HC595 and CD4094 can be used in this project.
Two buttons are used to increment and decrement the displayed number.
PIC18F4550 with multiplexed 7 segment shift register
The following image from my hardware circuit:

PIC18F4550 microcontroller with 7 segment shift register circuit

Hardware Required:

  • PIC18F4550 microcontroller   —> datasheet
  • Common anode 4-digit seven-segment display
  • 74HC164 shift register   —> datasheet
  • 4 x 2N3906 PNP transistor   —> datasheet
  • 2 x Push button
  • 4 x 10k ohm resistor
  • 4 x 1k ohm resistor
  • 7 x 100 ohm resistor
  • 5V Power source
  • Bread board and some jumper wires
  • PIC microcontroller programmer (PICkit 2, PICkit 3…)

Digital up/down counter with PIC18F4550 CCS C code:
Example C code is the one below, it was tested with CCS C compiler version 5.051.

Digital up/down counter with PIC18F4550 video:
The following video shows a hardware circuit of this project and how this counter works.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top