unsigned char cot[69]={0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0X0 0,0X00,0X66,0X7E,0X81,0XC3,0XFF,0X3F,0X3F,0X00,0X0 0,0X3F,0X3F,0XFF,0X99,0X3C,0X2C,0X24,0X91,0XFF,0XE 7,0XE7,0XE7,0XFF,0X00,0X00,0XC7,0X93,0X39,0X7C,0XF F,0X99,0X3C,0X2C,0X24,0X91,0XFF,0XFF,0XFF,0XFF,0XF F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF};
// {0XE7,0X00,0X00,0X66,0X7E,0X81,0XC3} Chu D
// {0X3F,0X3F,0X00,0X00,0X3F,0X3F} Chu T
// {0X00,0X00,0XC7,0X93,0X39,0X7C} Chu K
// {0X99,0X3C,0X2C,0X24,0X91} So 3
// {0XE7,0XE7,0XE7} Dau -
void delay(unsigned int t)
{
unsigned int i,j;
for(i=0;i<=t;i++)
for(j=0;j<=125;j++);
}
void scan(void)
{
P3=hang[n];
if(p<=53) P2=cot[p];
if(p>8) P1=cot[p-8];
if(p>16) P0=cot[p-16];
}
void main(void)
{
m=0;
while(1)
{
for(k=1;k<=5;k++)
{
for(n=0;n<=7;n++)
{
p=n+m;
scan();
delay(2);
}
}
delay(10);
m++;
if(m==69) m=0;
}
}
Các bạn giải thích giúp mình doạn code sau
P3=hang[n];
if(p<=53) P2=cot[p];
if(p>8) P1=cot[p-8];
if(p>16) P0=cot[p-16];
minh cam on
// {0XE7,0X00,0X00,0X66,0X7E,0X81,0XC3} Chu D
// {0X3F,0X3F,0X00,0X00,0X3F,0X3F} Chu T
// {0X00,0X00,0XC7,0X93,0X39,0X7C} Chu K
// {0X99,0X3C,0X2C,0X24,0X91} So 3
// {0XE7,0XE7,0XE7} Dau -
void delay(unsigned int t)
{
unsigned int i,j;
for(i=0;i<=t;i++)
for(j=0;j<=125;j++);
}
void scan(void)
{
P3=hang[n];
if(p<=53) P2=cot[p];
if(p>8) P1=cot[p-8];
if(p>16) P0=cot[p-16];
}
void main(void)
{
m=0;
while(1)
{
for(k=1;k<=5;k++)
{
for(n=0;n<=7;n++)
{
p=n+m;
scan();
delay(2);
}
}
delay(10);
m++;
if(m==69) m=0;
}
}
Các bạn giải thích giúp mình doạn code sau
P3=hang[n];
if(p<=53) P2=cot[p];
if(p>8) P1=cot[p-8];
if(p>16) P0=cot[p-16];
minh cam on