三个数码管如图布置,如何用动态显示的方式让他显示数字456,咋写都不对,新手勿喷
#include <reg52.h>sbit bw= P3^0;
sbit sw= P3^1;
sbit gw= P3^2;
unsigned ZXM[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
main()
{
int k=456;
bw=k/100
sw=k/10/10
gw=k%10
while(1)
{
P0=ZXM[5];
P3^0=0;
P3^1=1;
P3^2=1;
Delay(800)
P0=ZXM[6];
P3^0=1;
P3^1=0;
P3^2=1;
Delay(800)
P0=ZXM[7];
P3^0=1;
P3^1=1;
P3^2=0;
Delay(800)
}
}