Interfacing PIC18F4550 with 7-segment display CCS C compiler

Digital counter using PIC18F4550 and CCS PIC C compiler

PIC18F4550 7 segment display hardware circuit

This is a small topic shows the interfacing of the microcontroller PIC18F4550 with 7-segment display and make a 4-digit counter with push button.
Related topics:
4-Digit 7-segmant display counter using PIC16F84A and CCS PIC C compiler
4-Digit digital counter using PIC16F877A and CCS C compiler

Interfacing PIC18F4550 with 7-segment display circuit:
The digital counter circuit schematic is shown below where the internal oscillator of PIC18F4550 is used at 8MHz and MCLR pin function is disabled.
The 7-segment display is common anode type.
PIC18F4550 7 segment display circuit

The PIC18F4550 microcontroller is supplied with 5V at VDD (pin #11 & 32) and VSS (pin #12 & 31) pins (not shown in circuit schematic).
The push button shown in the circuit diagram is used to increment the number printed on the 7-segment display.

Hardware Required:

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

Interfacing PIC18F4550 with 7-segment display CCS C code:
The C code below is for CCS C compiler, it was tested with version 5.051.

The following video shows the example in a hardware circuit.

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