PIC Microcontroller Project

PIC16F84 lift simulator

A small 2011 PIC assembly project using six call buttons and a 7-segment display to simulate lift movement between floors.

PIC lift simulator icon

Overview

This was a small lift simulator project built around a PIC16F84 microcontroller. It uses six push buttons as floor requests and a 7-segment display to show the current floor.

Pressing a button makes the simulated lift decide whether it needs to travel up or down. The display then counts through the floor numbers and shows a simple moving segment animation while travelling.

How it works

The program starts at level 0, scans the six floor buttons, stores the selected destination, compares it with the current level, then animates the display until the destination is reached.

  1. Initialise the ports and set the starting level to 0.
  2. Scan the floor buttons connected to PORTA and one input on PORTB.
  3. Store the selected floor as the destination.
  4. Compare the current level with the destination.
  5. Run the up or down display animation.
  6. Update the 7-segment number and stop when the destination is reached.

Circuit options

There are two circuit versions depending on the 7-segment display type. One is for a common supply display, and the other is for a common ground / common cathode display.

Common supply display

Lift simulator circuit for common supply 7-segment display

Common ground display

Lift simulator circuit for common ground 7-segment display

PIC program downloads

The original source is included as PIC assembly. There is also an alternative version for the common ground / common cathode display configuration.

Notes

This is old code and it is fairly simple, but it is still a useful example of button scanning, state comparison, lookup tables, display driving and basic animation on a small PIC microcontroller.

← Back to Projects