Introduction - If you have any usage issues, please Google them yourself
Proteus single-chip microcomputer simulation- digital tube (dynamic)
# include < reg51. H >
Unsigned char code Tab [] {xa4 xc0 0, 0 xf9, 0, 0 xb0, 0 x99, 0 x92, 0 x82, 0 xf8, 0 x80, 0 x90}
Unsigned char Dat [] ,0,0,0 {0}
Unsigned char TMP, I, j
Unsigned char s 0
Void delay (int n)
{
Int I
For (I 0 I < n i++)
}
Void main ()
{
While (1)
{
S++
If (s > 500).
S 0
Dat [0] s/100
Dat [1] s 100/10
Dat [2] s 10
TMP 0 x01
For (I 0 I < 3 i++)
{
The P2 TMP
P0 Tab [Dat [I]]
TMP TMP < < 1
Delay (250)
}
For (I 0 I < 150 i++)
For (j 0 j < 100 j++)
Delay (60000)
}
}