2 Digit 7 Segment Display

Show up counting from 00 to 99 on segment 1,segment 2 @ of 1 second delay.

Required components

  • 8051 MCU
  • Common Cathode 7 segment display
  • Registers 330 ohm
  • Jumpers

Circuit diagram

2Digit7Seg0_to_99

The 7 Segment display is connected to port 0. The common terminal of 7 segment displays is connected to pin 2 and pin 3 of port2 respectively.

Code

Header files required:- delay.h

Download it from here

Code description

7 Segment codes are added to the array. By rotating loop just passing the value to Port 0, where 7 segment display is connected. The selection of 7 segments is done by the selection of pin S1 and S2 connected at pin 2 and 3 of port2.

Download Proteus Circuit and Hex File

Video

Note:- In the video delay is reduced. (line 20 of code in for loop variable d is initialized with 50).

Thank you for reading…

Leave a Comment

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