This 8051 project shows a moving display. To simulate circuit in this project,
initially activate Mixed Mode simulator from the Schematic Editor window.
Simulation can be performed by selecting Run Transient analysis (Oscillograph)
from Simulation menu.
The circuit contains an 8051 chip, Buffer register, Binary to 7 Segment Decoder
and 7-Segment LED Display. In this circuit, Port P0 of 8051 is set as the output
An internal counter is set to count from 0 to ‘FF’. This sequence that appears at
Port P0 is transferred through each of the 3 buffer registers in accordance with
the timing that is set for each of the registers. The counting sequence appears
in a moving fashion
The source code written either in C or Assembly language can be viewed from the
code editor window
The program is as shown:
void main ()
int i; // Variable is declared
for (i=0;i<256;i++) // A loop is given to count from 0 to 255
P0 = i; // The value in variable i is copied to P0.