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
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
Restricted content. Please login to view the content.
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
Restricted content. Please login to view the content.
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…