thu coi main cua minh nhu the nay nha con khai bao khuc trên ban tự viết đc chứ
minh hiển thi so 135 nè nối 7 chân led vào portd nhé con nguồn nối porte nhé
main()
{set_tris_d(0);
se_tris_e(0);
int8 x,y;
int8 led[10]=
{11000000,11111001,10100100,10110000,10010010,1000 0010,11111000,10000000,10010000}
x=135;
y=x%100;
while(true)
{
portd=led[a];
porte=1;
delay_ms(10);
portd=led[b];
porte=2;
delay_ms(10);
portd=led[c];
porte=4;
delay_ms(10);
}
}
|