CodePudding user response:
Get a 1 ms timer, timer interruptSet three variables A, B, C
Each interrupt
+, B++, c + +;
If (A==200)
{
A=0;
Pa=~ Pa;//a pin flip
}
If (A==500)
{
B=0;
Pb=~ Pb;//a pin flip
}
If (C==1000)
{
C=0;
Pc=~ Pc;//a pin flip
}
CodePudding user response:
Single-chip microcomputer timer interrupt