Home > other >  An array of three Numbers automatically change, don't know where is wrong
An array of three Numbers automatically change, don't know where is wrong

Time:09-16



Connect two SN74HC573 four digital tube (only one), to choose the assignment, the digital display of digital error (1), four, five, such as pictures, painted with a green pen,

Ask god to help analysis and see what is wrong, analysis to go, can't find the reason

 sbit duan=P3 ^ 6; 
Sbit wei=P3 ^ 7;
Uchar num, x, m, ge;
Uchar code table [10]={xa4 xc0 0, 0 xf9, 0, 0 xb0,
X92 0 x99, 0, 0 x82, 0 xf8, 0 x80, 0 x98};
Void delayms (uint);
Void the display (uchar);

Void main ()
{
TMOD=0 x01;
Xa3 TH0=0;
Xa3 TL0=0;
EA=1;
ET0=1;
TR0=1;
While (1)
{
The display (ge);
}
}

Void the display (uchar ge)
{
Wei=1;
The P2=0 xfe;
Wei=0;
The P2=0 XFF;
Delayms (200);
Duan=1;
The P2=table (ge),
Duan=0;
The P2=0 XFF;
Delayms (200);
}

Void delayms (uint XMS)
{
Uint I, j;
For (I=XMS; I> 0; I -);
For (j=110; J> 0; J -);
}

Void time () interrupt 1
{
Xa3 TH0=0;
Xa3 TL0=0;
m++;
If (m==20)
{
M=0;
num++;
Ge=num % 10;
}
}

CodePudding user response:

Look at the 6 shows a or b
Perhaps there are two feet short circuit

CodePudding user response:

reference 1st floor dceacho response:
see 6 shows a or b
Perhaps there are two feet short circuit


6 shows the b, not 6

CodePudding user response:

reference 1st floor dceacho response:
see 6 shows a or b
Perhaps there are two feet short circuit

CodePudding user response:

reference 1st floor dceacho response:
see 6 shows a or b
Perhaps there are two feet short circuit


Now and 4 and 5, flash, flash over 6 (b) and then start to count down, to 9, after starting from 0 to continue

CodePudding user response:

Hardware has a short circuit, the estimate is that the data of low two line short circuit,

CodePudding user response:

reference 5 floor qq_708907433 reply:
hardware has a short circuit, estimate is that the data of low short circuit, two line


I just eight grade eight line connects to the led on, Ming to see at least, a and b can't destroy, just like PWM, dark, will light up
  • Related