Summary of LabVIEW motion controller using pic microcontroller
This Lab 6 tutorial explains multiplexing four common anode seven-segment displays using a PIC16F628A microcontroller to save I/O pins. Instead of dedicating seven pins per display, segments share PORTB via current-limiting resistors. Four PNP transistors act as switches controlled by PORTA (RA0-RA3) to sequentially activate each display's common anode. By refreshing the digits rapidly, all appear illuminated simultaneously.Parts used in the Multiplexed Seven Segment Display Project:
- PIC16F628A microcontroller
- Four common anode seven segment LED displays
- Four PNP transistors
- Current limiting resistors (Rs)
- Vcc power supply
That’s why a multiplexing technique is used for driving multiple seven segment displays. This tutorial shows how to multiplex 4 common anode type seven segment LED displays with a PIC16F628A microcontroller.Circuit Diagram
The theory behind the multiplexing technique is simple. All the similar segments of multiple LED displays are connected together and driven through a single I/O pin. In the circuit below, the seven segments are connected to PORTB through current limiting resistors Rs. A particular segment is active when the corresponding PORTB pin is low. However, it will not glow until it’s anode is connected to Vcc. You can see the anodes of the four LED displays are not directly connected to Vcc. Instead, 4 PNP transistors are used as switches to connect or disconnect the anode terminals from Vcc.

Quick Solutions to Questions related to Multiplexed Seven Segment Display Project:
- Why is multiplexing used for driving multiple seven segment displays?
Multiplexing saves resources because driving 4 displays individually requires 28 I/O pins, which mid-range PIC microcontrollers cannot afford. - How are the similar segments of multiple LED displays connected?
All similar segments are connected together and driven through a single I/O pin on PORTB. - What component is used to connect or disconnect the anode terminals from Vcc?
Four PNP transistors are used as switches to manage the connection between the anode terminals and Vcc. - When does a particular segment become active?
A segment becomes active when its corresponding PORTB pin is low and its anode is connected to Vcc. - Which microcontroller pins control the conduction of the transistors?
The base of the PNP transistors is controlled by RA0 through RA3 pins of PORTA. - How do the transistors select which display is active?
When the base of a PNP transistor is low, it conducts, connecting that specific digit's common anode to Vcc. - Why does the display appear to be turned on at the same time?
Each seven-segment display is activated sequentially using an appropriate refresh frequency.
Related projects
DHT11 Low Cost Humidity Sensor using PIC16F628A with Proteus Simulation
IntroductionThis microcontroller project demonstrates how to interface a low-cost DHT11 temperature and humidity sensor with a PIC16F628A using a Proteus simulation environment.The...
LCD & Display Projects · PIC16F628AFrequency Counter by PIC16F628
In this project we are building a basic and low cost frequency counter circuit . It can measure from 16Hz to 100Hz...
Games, Toys & Calculators · PIC16F628ATIC TAC TOE game using PIC16F628
This project is not to introduce Tic Tac Toe. Everyone knows this game. It's to introduce two features. Bi-coloured LEDs, microcontrollers and...
LED ProjectsAn Application-Driven Microcontroller Curriculum
Understanding how to apply microcontrollers lies at the core of modern embedded systems education. This student project takes an experiential approach to...
LED ProjectsBuild this microcontroller controlled rainbow flying disc – and then throw it!
Hello all and welcome to this super simple and inexpensive instructable. If you like throwing frisbees AND you like flashing lights AND...
LED ProjectsLED Scrolling Display Project Working With Circuit Diagram
We normally use a simple static LED display screen to convey a message. Earlier, when we want to display large data, we...