Home / Projects / PIC Projects / Electronic Queuing System

Electronic Queuing System

The idea of this electronic queuing system is to display both sequence number and counter number in three seven segment displays. For example, when counter 1 presses his button, the number 1 shows up on the counter number segment. At the same time, the sequence number is incremented. This system can cater up to 99 customers and up to four counters.

Introduction



This electronic queuing system uses the PIC16F877A as the microcontroller with four buttons, one 2-digit common cathode 7-segment display and one 1-digit common cathode 7-segment display. The project itself is not that hard and I would recommend it if you're new to PIC microcontrollers. However, I suggest you learn more about interrupt programming to understand how the code works.

Materials Needed

  • PIC16F877A
  • Dual Seven-segment Display - Common Cathode
  • Single Seven-segment Display - Common Cathode
  • 74LS48 IC
  • 5 x SPST Pushbutton
  • 5 x 10k ohm, 1/4 W Resistors
  • 4 MHz Crystal
  • 2 x 22p Ceramic Capacitor

Schematic Diagram

Electronic Queuing System schematic diagram

One 2-digit common cathode 7-segment display is used to count the customer number while 1 7-segment display is used to indicate the current counter. To prevent debounce on the button, I added some delays after each button press. You may need to push the button for about half a second to update the displays

Code

The buttons are attached to RB4 to RB7 so that I can use RB change interrupt. The POV shifting on the displays is done through timer overflow interrupt. You might need to change the prescale value via the OPTION register if you can still see the shifting between digits.

In XC8, multiple interrupts can be implemented by simply checking the corresponding interrupt flag bit. Here I checked the RBIF flag to check if the buttons RB4 to RB7 were pressed and the TMR0IF flag for shifting the digits in POV.

Design Files

Feel free to download the design files for this electronic queuing system project:

If this was useful to you, a simple thanks through the comments would suffice!

Check Also

PIC16F877A Stepper Motor Controller

PIC16F877A Stepper Motor Controller

This project is a stepper motor controller featuring the PIC16F877A microcontroller and coded using XC8. …

Leave a Reply

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