hay lắm, mong bạn phát huy nhiều nữa.
Thông báo
Collapse
No announcement yet.
Mới làm xong con Led Cube 5x5x5 .Mọi người cùng xem nhé
Collapse
X
-
Nguyên văn bởi mrtran0_0 Xem bài viếtừ.cái code này anh tự lập trình.nhưng anh lập trình kiểu cơ bản nhất lên code anh viết dài lắm. (vì anh mới học lên mới chỉ biết cách lập trình đơn giản này thôi.hihi
V0010 280212 - YouTube
còn đây là code khác
12345 - YouTube
Comment
-
chào bạn mình cũng làm xong con cube 5x5x5 nhung nó chỉ chạy dc một làm thì tắt rồi sau đó nó chỉ sáng ở một số cột không biết tại sao bạn biết chỉ bảo hộ mình với không biết là do trở hay sao mình dùng trở 220 ohm và traA1013 và code đây bạn kiểm tra hộ mình nha:
//trong chuong trinh nay anot la hang con katot la cot hang tu duoi len la 1-5
#include <REGX52.H>
#include<stdlib.h>
unsigned int i,j,k,n;
sbit d1 = P1^0;
sbit d2 = P1^1;
sbit d3 = P1^2;
sbit d4 = P1^3;
sbit d5 = P1^4;
sbit d6 = P1^5;
sbit d7 = P1^6;
sbit d8 = P1^7;
sbit d9 = P3^0;
sbit d10 = P3^1;
sbit d11 = P3^2;
sbit d12 = P3^3;
sbit d13 = P3^4;
sbit d14 = P3^5;
sbit d15 = P3^6;
sbit d16 = P3^7;
sbit d17 = P2^0;
sbit d18 = P2^1;
sbit d19 = P2^2;
sbit d20 = P2^3;
sbit d21 = P2^4;
sbit d22 = P2^5;
sbit d23 = P2^6;
sbit d24 = P2^7;
sbit led = P0^5;
sbit d25=P0^5;
sbit c1 = P0^0;
sbit c2 = P0^1;
sbit c3 = P0^2;
sbit c4 = P0^3;
sbit c5 = P0^4;
void delay(unsigned int time)
{
while(time--){
unsigned char j = 125;
while(j--);
};}
// 2chay chu MVK12
void chuMVK(unsigned char ms, unsigned char n)
{
// chu M mat5M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0xa2;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x64;P1=0xed;P3=0xdf;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xcf;P3=0x7f;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
}
//mat4M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0xa2;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x64;P1=0xf7;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xb7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
}
//mat3M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0xa2;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x64;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0x7b;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
}
// mat2M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0xa2;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xf7;P2=0xdf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xfe;P2=0xdb;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
}
//mat1M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0xa2;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xfb;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xfd;P2=0xe7;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
}
//chay chu v mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xdf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
}
//mat4V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xbf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xef;P3=0xff;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=1; delay(ms);
}
//mat3V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0x7f;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0x64;P1=0xfb;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xfb;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0x7f;led=1; delay(ms);
}
//mat2V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xe7;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfe;P2=0xfd;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xbf;led=1; delay(ms);
}
// mat1V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfd;P2=0xf7;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
}
// chay chu K mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xef;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xdf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0x3f;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xdf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xef;P3=0x7f;P2=0xff;led=1; delay(ms);
}
//mat4K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xf7;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0xa2;P1=0xbf;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xdf;P2=0xfe;led=1; delay(ms);
P0=0x28;P1=0xbf;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0x30;P1=0x7f;P3=0xff;P2=0xfe;led=1; delay(ms);
}
//mat3K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfb;P3=0xff;P2=0xfd;led=1; delay(ms);
P0=0xa2;P1=0x7f;P3=0xff;P2=0xfd;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x28;P1=0x7f;P3=0xff;P2=0xfd;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xfd;led=1; delay(ms);
}
// mat2K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xff;P2=0xfb;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfe;P2=0xfb;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xf7;P2=0xfb;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xfe;P2=0xfb;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xfb;led=1; delay(ms);
}
// mat1K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xff;P2=0xf7;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfd;P2=0xf7;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xfb;P2=0xf7;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xfd;P2=0xf7;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xf7;led=1; delay(ms);
}
// chay so 12 mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xcf;P3=0xbf;P2=0xff;led=0; delay(ms);
P0=0xa2;P1=0xff;P3=0xbf;P2=0xff;led=0; delay(ms);
P0=0x64;P1=0xcf;P3=0xbf;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xcf;P3=0xbf;P2=0xff;led=0; delay(ms);
}
//mat4 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xb7;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0x64;P1=0xb7;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xb7;P3=0xdf;P2=0x7f;led=1; delay(ms);
}
//mat3 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0x7b;P3=0xef;P2=0xbf;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xef;P2=0xbf;led=1; delay(ms);
P0=0x64;P1=0x7b;P3=0xef;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0x7b;P3=0xef;P2=0xbf;led=1; delay(ms);
}
// mat2 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xf6;P2=0xdf;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf7;P2=0xdf;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xf6;P2=0xdf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xf6;P2=0xdf;led=1; delay(ms);
}
//mat1 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfb;P2=0xef;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
}}
// 4cac goc cheo nhau sang
void goccheo(unsigned char ms)
{ P1=P2=P3=0x00;P0=0xff;delay(300);
P1=P2=P3=0xff;P0=0xff;delay(300);
{c1=c2=0;c3=c4=c5=1;d3=d4=d5=d6=d7=d8=d13=d14=d15= 0;delay(ms);}
{c4=c5=0;c1=c2=c3=1;d3=d4=d5=d6=d7=d8=d13=d14=d15= 1;d11=d12=d13=d18=d19=d20=d21=d22=d23=0;delay(ms); }
{c1=c2=0;c3=c4=c5=1;d11=d12=d13=d18=d19=d20=d21=d2 2=d23=1;d1=d2=d3=d8=d9=d10=d13=d14=d15=0;delay(ms) ;}
{c1=c2=c3=1;c4=c5=0;d1=d2=d3=d8=d9=d10=d13=d14=d15 =1;d13=d14=d15=d16=d17=d18=d23=d24=d25=0;delay(ms) ;}
{c1=c2=0;c3=c4=c5=1;d13=d14=d15=d16=d17=d18=d23=d2 4=d25=1;d3=d4=d5=d6=d7=d8=d13=d14=d15=0;delay(ms); }
{c4=c5=0;c1=c2=c3=1;d3=d4=d5=d6=d7=d8=d13=d14=d15= 1;d13=d14=d15=d16=d17=d18=d23=d24=d25=0;delay(ms); }
{c1=c2=0;c3=c4=c5=1;d13=d14=d15=d16=d17=d18=d23=d2 4=d25=1;d1=d2=d3=d8=d9=d10=d11=d12=d13=0;delay(ms) ;}
}
// chay len xuong theo cot trung tam va mat xung quanh
void cotmat(unsigned char ms)
{P1=P2=P3=0xff;led=1;delay(ms);P0=0xff;
P1=P2=0xff; led=1;P3=0xef; delay(ms);
c1=1;delay(ms);c1=0;c2=1;delay(ms);c1=c2=0;c3=1;de lay(ms);c1=c2=c3=0;c4=1;delay(ms);c1=c2=c3=c4=0;c5 =1;delay(ms);
d7=d8=d9=d12=d19=d18=d17=d14=0;delay(ms);d13=1;c5= 0;c4=1;delay(ms);c5=c4=0; c3=1;delay(ms); c5=c4=c3=0;c2=1;delay(ms);
c5=c4=c3=c2=0;c1=1;delay(ms);d7=d8=d9=d12=d19=d18= d17=d14=1;d1=d2=d3=d4=d5=d6=d15=d16=d25=d24=d23=d2 2=d21=d20=d11=d10=0;delay(ms);
c1=0;c2=1;delay(ms);c1=c2=0;c3=1;delay(ms);c1=c2=c 3=0;c4=1;delay(ms);c1=c2=c3=c4=0;c5=1;delay(ms);
P1=P2=P3=0xff;delay(200);
}
//quet khung to
void khungto(unsigned char ms, unsigned char m)
{
P0=P1=P2=P3=0xff;delay(100);
for(i=0;i<=m;i++)
{
P0=0x21;P1=0xc0;P3=0x39;P2=0x07;led=0; delay(ms);
P0=0xa2;P1=0xee;P3=0xff;P2=0xef;led=0; delay(ms);
P0=0x64;P1=0xee;P3=0xff;P2=0xef;led=0; delay(ms);
P0=0x28;P1=0xee;P3=0xff;P2=0xef;led=0; delay(ms);
P0=0x30;P1=0xc0;P3=0x39;P2=0x07;led=0; delay(ms);
}}
//quet khung trong long
void khungnho(unsigned char ms,unsigned char m)
{
P0=P1=P2=P3=0xff; delay(200);
for(i=0;i<=m;i++)
{
P0=0x21;P1=P3=P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0x3f;P3=0xd6;P2=0xf8;led=1; delay(ms);
P0=0x64;P1=0xbf;P3=0xf1;P2=0xfa;led=1; delay(ms);
P0=0x28;P1=0x3f;P3=0xd6;P2=0xf8;led=1; delay(ms);
P0=0x30;P1=P3=P2=0xff;led=1; delay(ms);
}}
// soc xien quay
void socxien(unsigned char ms,unsigned char n)
{
for(i=0;i<ms;i++)
{
//xien cheo1
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xe0;P3=0xff;P2=0xff;led=1; delay(1);
P0=0xa2;P1=0x1f;P3=0xfc;P2=0xff;led=1; delay(1);
P0=0x64;P1=0xff;P3=0x83;P2=0xff;led=1; delay(1);
P0=0x28;P1=0xff;P3=0x7f;P2=0xf0;led=1; delay(1);
P0=0x30;P1=0xff;P3=0xff;P2=0x0f;led=0; delay(1);
}
for(i=0;i<=n;i++)
{
c1=c2=c4=c5=0;c3=1;P1=P2=P3=0x00;led=0;delay(1);
}
//xien cheo2
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xff;P2=0x0f;led=0; delay(1);
P0=0xa2;P1=0x7f;P3=0x7f;P2=0xf0;led=1; delay(1);
P0=0x64;P1=0x7e;P3=0x83;P2=0xff;led=1; delay(1);
P0=0x28;P1=0x1f;P3=0xfc;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xe0;P3=0xff;P2=0xff;led=1; delay(1);
}}}
//sang theo lop doc
void theolop2(voi)
{ P0=0xdf;
P1=P3=0xff;P2=0x0f;led=0;delay(300);
P1=0xff;P3=0x7f;P2=0x00;led=0;delay(300);
P1=0xff;P3=0x03;P2=0x00;led=0;delay(300);
P1=0x1f;P2=P3=0x00;led=0;delay(300);
P2=P3=0x00;P1=0xe0;led=0;delay(300);
P2=0x00;led=0;P3=0x7f;P1=0xff;delay(300);
P2=0xf;P1=P3=0xff;led=0;delay(300);
P1=P2=P3=0xff;led=1;delay(300);
for(i=0;i<5;i++)
{
d1=d2=d3=d4=d5=d21=d22=d23=d24=d25=0;delay(100);d2 0=d19=d18=d17=d16=d6=d7=d8=d9=d10=0;delay(100);
d20=d19=d18=d17=d16=d6=d7=d8=d9=d10=1;d11=d12=d13= d14=d15=0;delay(100);
d11=d12=d13=d14=d15=1;d20=d19=d18=d17=d16=d6=d7=d8 =d9=d10=0;delay(100);
}}
//hang internet giunbo
void giunbo(unsigned char ms,unsigned char n)
{P0=P1=P2=P3=0xff;
for(i=0;i<n;i++)
{
c5=0;d5=0;delay(ms);d4=0;delay(ms);d3=0;delay(ms); d2=0;delay(ms);d1=0;delay(ms);
d5=1;delay(ms);d4=1;delay(ms);d3=1;delay(ms);d2=1; delay(ms);d1=1;delay(ms);c5=1;
c4=0;d3=0;delay(ms);d8=0;delay(ms);d13=0;delay(ms) ;d18=0;delay(ms);d23=0;delay(ms);
d3=1;delay(ms);d8=1;delay(ms);d13=1;delay(ms);d18= 1;delay(ms);d23=1;delay(ms);c4=1;
c3=0;d25=0;delay(ms);d17=0;delay(ms);d13=0;delay(m s);d9=0;delay(ms);d1=0;delay(ms);
d25=1;delay(ms);d17=1;delay(ms);d13=1;delay(ms);d9 =1;delay(ms);d1=1;delay(ms);c3=1;
c1=0;d21=0;delay(ms);d22=0;delay(ms);d23=0;delay(m s);d24=0;delay(ms);d25=0;delay(ms);
d21=1;delay(ms);d22=1;delay(ms);d23=1;delay(ms);d2 4=1;delay(ms);d25=1;delay(ms);c1=1;
c2=0;d5=0;delay(ms);d7=0;delay(ms);d13=0;delay(ms) ;d19=0;delay(ms);d21=0;delay(ms);
d5=1;delay(ms);d7=1;delay(ms);d13=1;delay(ms);d19= 1;delay(ms);d21=1;delay(ms);c2=1;
}
}
// 3chay chu I lOve you
void chuiloveu(unsigned char ms, unsigned char n)
{
//chu I mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xcf;P3=0x3f;P2=0xfe;led=0; delay(ms);
P0=0xa2;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xcf;P3=0x3f;P2=0xfe;led=0; delay(ms);
}
//mat4 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xb7;P3=0xdf;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xb7;P3=0xdf;P2=0xff;led=1; delay(ms);
}
//mat3 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0x7b;P3=0xef;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0x7b;P3=0xef;P2=0xbd;led=1; delay(ms);
}
//mat2 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xf7;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xf7;P2=0xbd;led=1; delay(ms);
}
//mat1 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
}
//chu love mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xdf;P3=0x3f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xcf;P3=0x3f;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xcf;P3=0x3f;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xcf;P3=0x7f;P2=0xff;led=0; delay(ms);
}
//mat4 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xbf;P3=0xdf;P2=0xfe;led=1; delay(ms);
P0=0x64;P1=0xb7;P3=0xdf;P2=0x7e;led=1; delay(ms);
P0=0x28;P1=0xb7;P3=0xdf;P2=0x7e;led=1; delay(ms);
P0=0x30;P1=0xb7;P3=0xff;P2=0x7e;led=1; delay(ms);
}
//mat3 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0x7f;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x64;P1=0x7e;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x28;P1=0x7e;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbd;led=1; delay(ms);
}
//mat2 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf6;P2=0xfb;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xf6;P2=0xdb;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xf6;P2=0xdb;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xfe;P2=0xdb;led=1; delay(ms);
}
//mat1 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xfd;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf9;P2=0xf7;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
}
// chay chu U mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xcf;P3=0x3f;P2=0xff;led=0; delay(ms);
P0=0xa2;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x64;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
}
// mat4 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xb7;P3=0xdf;P2=0x7e;led=1; delay(ms);
P0=0xa2;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x64;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
}
// mat3 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0x7b;P3=0xef;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x64;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
}
// mat2 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xf6;P2=0xdb;led=1; delay(ms);
P0=0xa2;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
}
//mat1 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0xa2;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
}}
// hai ben duoi nhau
void duoinhau(unsigned char n)
{
//lop1
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
P0=0xa2;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0x64;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0x28;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0x30;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
}
//lop2
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0xa2;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0x64;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0x28;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0x30;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
}
//lop3
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0xa2;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0x64;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0x28;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
}
//lop4
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0xa2;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0x64;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
P0=0x28;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
}
//lop5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0xa2;P1=0xff;P3=0x7f;P2=0xff;led=1; delay(1);
P0=0x64;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0x28;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0x30;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
}
//lop6
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
P0=0xa2;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0x64;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
}
//lop7
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0xa2;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0x64;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
P0=0x28;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
}
//lop8
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0xa2;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
P0=0x64;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0x28;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0x30;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
}}
void main(void)
{
while(1)
{
chuMVK(1,400);delay(300);
P0=0xff;P1=P2=P3=0x00;delay(800);
P0=P1=P2=P3=0xff;delay(300);
goccheo(150);
goccheo(100);
goccheo(50);
chuiloveu(1,300);delay(200);
duoinhau(300);
cotmat(150);
khungto(200,1);
khungnho(200,1);
P0=0x040;P1=P2=0xff;P1=0xef;delay(500);
khungnho(200,1);
khungto(200,1);
socxien(5,500);delay(300);
theolop1();delay(150);
theolop2();delay(150);
giunbo(100,4);
}}
cám ơn1+1=0 nhớ 1
Comment
-
code này dung thử xem dc không nha:
//trong chuong trinh nay anot la hang con katot la cot hang tu duoi len la 1-5
#include <REGX52.H>
#include<stdlib.h>
unsigned int i,j,k,n;
sbit d1 = P1^0;
sbit d2 = P1^1;
sbit d3 = P1^2;
sbit d4 = P1^3;
sbit d5 = P1^4;
sbit d6 = P1^5;
sbit d7 = P1^6;
sbit d8 = P1^7;
sbit d9 = P3^0;
sbit d10 = P3^1;
sbit d11 = P3^2;
sbit d12 = P3^3;
sbit d13 = P3^4;
sbit d14 = P3^5;
sbit d15 = P3^6;
sbit d16 = P3^7;
sbit d17 = P2^0;
sbit d18 = P2^1;
sbit d19 = P2^2;
sbit d20 = P2^3;
sbit d21 = P2^4;
sbit d22 = P2^5;
sbit d23 = P2^6;
sbit d24 = P2^7;
sbit led = P0^5;
sbit d25=P0^5;
sbit c1 = P0^0;
sbit c2 = P0^1;
sbit c3 = P0^2;
sbit c4 = P0^3;
sbit c5 = P0^4;
void delay(unsigned int time)
{
while(time--){
unsigned char j = 125;
while(j--);
};}
// 2chay chu MVK12
void chuMVK(unsigned char ms, unsigned char n)
{
// chu M mat5M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0xa2;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x64;P1=0xed;P3=0xdf;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xcf;P3=0x7f;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
}
//mat4M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0xa2;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x64;P1=0xf7;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xb7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
}
//mat3M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0xa2;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x64;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0x7b;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
}
// mat2M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0xa2;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xf7;P2=0xdf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xfe;P2=0xdb;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
}
//mat1M
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0xa2;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xfb;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xfd;P2=0xe7;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
}
//chay chu v mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xdf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
}
//mat4V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xbf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xef;P3=0xff;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=1; delay(ms);
}
//mat3V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0x7f;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0x64;P1=0xfb;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xfb;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0x7f;led=1; delay(ms);
}
//mat2V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xe7;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfe;P2=0xfd;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xbf;led=1; delay(ms);
}
// mat1V
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfd;P2=0xf7;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
}
// chay chu K mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xef;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xdf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0x3f;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xdf;P3=0x7f;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xef;P3=0x7f;P2=0xff;led=1; delay(ms);
}
//mat4K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xf7;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0xa2;P1=0xbf;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xdf;P2=0xfe;led=1; delay(ms);
P0=0x28;P1=0xbf;P3=0xff;P2=0xfe;led=1; delay(ms);
P0=0x30;P1=0x7f;P3=0xff;P2=0xfe;led=1; delay(ms);
}
//mat3K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfb;P3=0xff;P2=0xfd;led=1; delay(ms);
P0=0xa2;P1=0x7f;P3=0xff;P2=0xfd;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x28;P1=0x7f;P3=0xff;P2=0xfd;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xfd;led=1; delay(ms);
}
// mat2K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xff;P2=0xfb;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfe;P2=0xfb;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xf7;P2=0xfb;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xfe;P2=0xfb;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xfb;led=1; delay(ms);
}
// mat1K
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xff;P2=0xf7;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfd;P2=0xf7;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xfb;P2=0xf7;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xfd;P2=0xf7;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xf7;led=1; delay(ms);
}
// chay so 12 mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xcf;P3=0xbf;P2=0xff;led=0; delay(ms);
P0=0xa2;P1=0xff;P3=0xbf;P2=0xff;led=0; delay(ms);
P0=0x64;P1=0xcf;P3=0xbf;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xcf;P3=0xbf;P2=0xff;led=0; delay(ms);
}
//mat4 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xb7;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0x64;P1=0xb7;P3=0xdf;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xb7;P3=0xdf;P2=0x7f;led=1; delay(ms);
}
//mat3 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0x7b;P3=0xef;P2=0xbf;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xef;P2=0xbf;led=1; delay(ms);
P0=0x64;P1=0x7b;P3=0xef;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0x7b;P3=0xef;P2=0xbf;led=1; delay(ms);
}
// mat2 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xf6;P2=0xdf;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf7;P2=0xdf;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xf6;P2=0xdf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xf6;P2=0xdf;led=1; delay(ms);
}
//mat1 12
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfb;P2=0xef;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
}}
// 4cac goc cheo nhau sang
void goccheo(unsigned char ms)
{ P1=P2=P3=0x00;P0=0xff;delay(300);
P1=P2=P3=0xff;P0=0xff;delay(300);
{c1=c2=0;c3=c4=c5=1;d3=d4=d5=d6=d7=d8=d13=d14=d15= 0;delay(ms);}
{c4=c5=0;c1=c2=c3=1;d3=d4=d5=d6=d7=d8=d13=d14=d15= 1;d11=d12=d13=d18=d19=d20=d21=d22=d23=0;delay(ms); }
{c1=c2=0;c3=c4=c5=1;d11=d12=d13=d18=d19=d20=d21=d2 2=d23=1;d1=d2=d3=d8=d9=d10=d13=d14=d15=0;delay(ms) ;}
{c1=c2=c3=1;c4=c5=0;d1=d2=d3=d8=d9=d10=d13=d14=d15 =1;d13=d14=d15=d16=d17=d18=d23=d24=d25=0;delay(ms) ;}
{c1=c2=0;c3=c4=c5=1;d13=d14=d15=d16=d17=d18=d23=d2 4=d25=1;d3=d4=d5=d6=d7=d8=d13=d14=d15=0;delay(ms); }
{c4=c5=0;c1=c2=c3=1;d3=d4=d5=d6=d7=d8=d13=d14=d15= 1;d13=d14=d15=d16=d17=d18=d23=d24=d25=0;delay(ms); }
{c1=c2=0;c3=c4=c5=1;d13=d14=d15=d16=d17=d18=d23=d2 4=d25=1;d1=d2=d3=d8=d9=d10=d11=d12=d13=0;delay(ms) ;}
}
// chay len xuong theo cot trung tam va mat xung quanh
void cotmat(unsigned char ms)
{P1=P2=P3=0xff;led=1;delay(ms);P0=0xff;
P1=P2=0xff; led=1;P3=0xef; delay(ms);
c1=1;delay(ms);c1=0;c2=1;delay(ms);c1=c2=0;c3=1;de lay(ms);c1=c2=c3=0;c4=1;delay(ms);c1=c2=c3=c4=0;c5 =1;delay(ms);
d7=d8=d9=d12=d19=d18=d17=d14=0;delay(ms);d13=1;c5= 0;c4=1;delay(ms);c5=c4=0; c3=1;delay(ms); c5=c4=c3=0;c2=1;delay(ms);
c5=c4=c3=c2=0;c1=1;delay(ms);d7=d8=d9=d12=d19=d18= d17=d14=1;d1=d2=d3=d4=d5=d6=d15=d16=d25=d24=d23=d2 2=d21=d20=d11=d10=0;delay(ms);
c1=0;c2=1;delay(ms);c1=c2=0;c3=1;delay(ms);c1=c2=c 3=0;c4=1;delay(ms);c1=c2=c3=c4=0;c5=1;delay(ms);
P1=P2=P3=0xff;delay(200);
}
//quet khung to
void khungto(unsigned char ms, unsigned char m)
{
P0=P1=P2=P3=0xff;delay(100);
for(i=0;i<=m;i++)
{
P0=0x21;P1=0xc0;P3=0x39;P2=0x07;led=0; delay(ms);
P0=0xa2;P1=0xee;P3=0xff;P2=0xef;led=0; delay(ms);
P0=0x64;P1=0xee;P3=0xff;P2=0xef;led=0; delay(ms);
P0=0x28;P1=0xee;P3=0xff;P2=0xef;led=0; delay(ms);
P0=0x30;P1=0xc0;P3=0x39;P2=0x07;led=0; delay(ms);
}}
//quet khung trong long
void khungnho(unsigned char ms,unsigned char m)
{
P0=P1=P2=P3=0xff; delay(200);
for(i=0;i<=m;i++)
{
P0=0x21;P1=P3=P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0x3f;P3=0xd6;P2=0xf8;led=1; delay(ms);
P0=0x64;P1=0xbf;P3=0xf1;P2=0xfa;led=1; delay(ms);
P0=0x28;P1=0x3f;P3=0xd6;P2=0xf8;led=1; delay(ms);
P0=0x30;P1=P3=P2=0xff;led=1; delay(ms);
}}
// soc xien quay
void socxien(unsigned char ms,unsigned char n)
{
for(i=0;i<ms;i++)
{
//xien cheo1
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xe0;P3=0xff;P2=0xff;led=1; delay(1);
P0=0xa2;P1=0x1f;P3=0xfc;P2=0xff;led=1; delay(1);
P0=0x64;P1=0xff;P3=0x83;P2=0xff;led=1; delay(1);
P0=0x28;P1=0xff;P3=0x7f;P2=0xf0;led=1; delay(1);
P0=0x30;P1=0xff;P3=0xff;P2=0x0f;led=0; delay(1);
}
for(i=0;i<=n;i++)
{
c1=c2=c4=c5=0;c3=1;P1=P2=P3=0x00;led=0;delay(1);
}
//xien cheo2
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xff;P2=0x0f;led=0; delay(1);
P0=0xa2;P1=0x7f;P3=0x7f;P2=0xf0;led=1; delay(1);
P0=0x64;P1=0x7e;P3=0x83;P2=0xff;led=1; delay(1);
P0=0x28;P1=0x1f;P3=0xfc;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xe0;P3=0xff;P2=0xff;led=1; delay(1);
}}}
//sang theo lop doc
void theolop2(voi)
{ P0=0xdf;
P1=P3=0xff;P2=0x0f;led=0;delay(300);
P1=0xff;P3=0x7f;P2=0x00;led=0;delay(300);
P1=0xff;P3=0x03;P2=0x00;led=0;delay(300);
P1=0x1f;P2=P3=0x00;led=0;delay(300);
P2=P3=0x00;P1=0xe0;led=0;delay(300);
P2=0x00;led=0;P3=0x7f;P1=0xff;delay(300);
P2=0xf;P1=P3=0xff;led=0;delay(300);
P1=P2=P3=0xff;led=1;delay(300);
for(i=0;i<5;i++)
{
d1=d2=d3=d4=d5=d21=d22=d23=d24=d25=0;delay(100);d2 0=d19=d18=d17=d16=d6=d7=d8=d9=d10=0;delay(100);
d20=d19=d18=d17=d16=d6=d7=d8=d9=d10=1;d11=d12=d13= d14=d15=0;delay(100);
d11=d12=d13=d14=d15=1;d20=d19=d18=d17=d16=d6=d7=d8 =d9=d10=0;delay(100);
}}
//hang internet giunbo
void giunbo(unsigned char ms,unsigned char n)
{P0=P1=P2=P3=0xff;
for(i=0;i<n;i++)
{
c5=0;d5=0;delay(ms);d4=0;delay(ms);d3=0;delay(ms); d2=0;delay(ms);d1=0;delay(ms);
d5=1;delay(ms);d4=1;delay(ms);d3=1;delay(ms);d2=1; delay(ms);d1=1;delay(ms);c5=1;
c4=0;d3=0;delay(ms);d8=0;delay(ms);d13=0;delay(ms) ;d18=0;delay(ms);d23=0;delay(ms);
d3=1;delay(ms);d8=1;delay(ms);d13=1;delay(ms);d18= 1;delay(ms);d23=1;delay(ms);c4=1;
c3=0;d25=0;delay(ms);d17=0;delay(ms);d13=0;delay(m s);d9=0;delay(ms);d1=0;delay(ms);
d25=1;delay(ms);d17=1;delay(ms);d13=1;delay(ms);d9 =1;delay(ms);d1=1;delay(ms);c3=1;
c1=0;d21=0;delay(ms);d22=0;delay(ms);d23=0;delay(m s);d24=0;delay(ms);d25=0;delay(ms);
d21=1;delay(ms);d22=1;delay(ms);d23=1;delay(ms);d2 4=1;delay(ms);d25=1;delay(ms);c1=1;
c2=0;d5=0;delay(ms);d7=0;delay(ms);d13=0;delay(ms) ;d19=0;delay(ms);d21=0;delay(ms);
d5=1;delay(ms);d7=1;delay(ms);d13=1;delay(ms);d19= 1;delay(ms);d21=1;delay(ms);c2=1;
}
}
// 3chay chu I lOve you
void chuiloveu(unsigned char ms, unsigned char n)
{
//chu I mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xcf;P3=0x3f;P2=0xfe;led=0; delay(ms);
P0=0xa2;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xcf;P3=0x3f;P2=0xfe;led=0; delay(ms);
}
//mat4 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xb7;P3=0xdf;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xb7;P3=0xdf;P2=0xff;led=1; delay(ms);
}
//mat3 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0x7b;P3=0xef;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0x7b;P3=0xef;P2=0xbd;led=1; delay(ms);
}
//mat2 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xf7;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xf7;P2=0xbd;led=1; delay(ms);
}
//mat1 I
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0x28;P1=0xff;P3=0xfb;P2=0xff;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xf9;P2=0xef;led=1; delay(ms);
}
//chu love mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xdf;P3=0x3f;P2=0xff;led=1; delay(ms);
P0=0x64;P1=0xcf;P3=0x3f;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xcf;P3=0x3f;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xcf;P3=0x7f;P2=0xff;led=0; delay(ms);
}
//mat4 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xdf;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xbf;P3=0xdf;P2=0xfe;led=1; delay(ms);
P0=0x64;P1=0xb7;P3=0xdf;P2=0x7e;led=1; delay(ms);
P0=0x28;P1=0xb7;P3=0xdf;P2=0x7e;led=1; delay(ms);
P0=0x30;P1=0xb7;P3=0xff;P2=0x7e;led=1; delay(ms);
}
//mat3 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xef;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0x7f;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x64;P1=0x7e;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x28;P1=0x7e;P3=0xef;P2=0xfd;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbd;led=1; delay(ms);
}
//mat2 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xf7;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf6;P2=0xfb;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xf6;P2=0xdb;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xf6;P2=0xdb;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xfe;P2=0xdb;led=1; delay(ms);
}
//mat1 love
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xfd;P2=0xff;led=1; delay(ms);
P0=0xa2;P1=0xff;P3=0xf9;P2=0xf7;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
}
// chay chu U mat5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xcf;P3=0x3f;P2=0xff;led=0; delay(ms);
P0=0xa2;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x64;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
P0=0x30;P1=0xef;P3=0xff;P2=0xff;led=0; delay(ms);
}
// mat4 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xb7;P3=0xdf;P2=0x7e;led=1; delay(ms);
P0=0xa2;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x64;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x28;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
P0=0x30;P1=0xf7;P3=0xff;P2=0x7f;led=1; delay(ms);
}
// mat3 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0x7b;P3=0xef;P2=0xbd;led=1; delay(ms);
P0=0xa2;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x64;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x28;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(ms);
}
// mat2 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xf6;P2=0xdb;led=1; delay(ms);
P0=0xa2;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x64;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x28;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
P0=0x30;P1=0xfd;P3=0xff;P2=0xdf;led=1; delay(ms);
}
//mat1 U
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xf9;P2=0xe7;led=1; delay(ms);
P0=0xa2;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x64;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x28;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
P0=0x30;P1=0xfe;P3=0xff;P2=0xef;led=1; delay(ms);
}}
// hai ben duoi nhau
void duoinhau(unsigned char n)
{
//lop1
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
P0=0xa2;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0x64;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0x28;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0x30;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
}
//lop2
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0xa2;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0x64;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0x28;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0x30;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
}
//lop3
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0xa2;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0x64;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0x28;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
}
//lop4
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
P0=0xa2;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0x64;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
P0=0x28;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
}
//lop5
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xfe;P3=0xff;P2=0xff;led=0; delay(1);
P0=0xa2;P1=0xff;P3=0x7f;P2=0xff;led=1; delay(1);
P0=0x64;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0x28;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0x30;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
}
//lop6
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0x7d;P2=0xff;led=1; delay(1);
P0=0xa2;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0x64;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0x28;P1=0xef;P3=0xff;P2=0xff;led=1; delay(1);
P0=0x30;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
}
//lop7
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0xa2;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0x64;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
P0=0x28;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
}
//lop8
for(i=0;i<=n;i++)
{
P0=0x21;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0xa2;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
P0=0x64;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0x28;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
P0=0x30;P1=0xfd;P3=0xff;P2=0x7f;led=1; delay(1);
}}
void main(void)
{
while(1)
{
chuMVK(1,400);delay(300);
P0=0xff;P1=P2=P3=0x00;delay(800);
P0=P1=P2=P3=0xff;delay(300);
goccheo(150);
goccheo(100);
goccheo(50);
chuiloveu(1,300);delay(200);
duoinhau(300);
cotmat(150);
khungto(200,1);
khungnho(200,1);
P0=0x040;P1=P2=0xff;P1=0xef;delay(500);
khungnho(200,1);
khungto(200,1);
socxien(5,500);delay(300);
theolop1();delay(150);
theolop2();delay(150);
giunbo(100,4);
}}1+1=0 nhớ 1
Comment
-
Nguyên văn bởi khunglongi Xem bài viếtec cho minh hoi dung vdk 89s52 thi bo nho rom chi co 8kb ma code ban 23k thi nap kieu ji day
pm cho minh : phamthanh1992@gmail.com1+1=0 nhớ 1
Comment
-
Nguyên văn bởi mrtran0_0 Xem bài viết1+1=0 nhớ 1
Comment
-
Các bác cho em hỏi chút về phần lập trình
ví dụ có đoạn code như này:
P0=0x21;P1=0xff;P3=0xbb;P2=0xff;led=1; delay(1);
P0=0xa2;P1=0xdf;P3=0xff;P2=0xf7;led=1; delay(1);
P0=0x64;P1=0xef;P3=0xff;P2=0xef;led=1; delay(1);
P0=0x28;P1=0xf7;P3=0xff;P2=0xdf;led=1; delay(1);
P0=0x30;P1=0xfb;P3=0xff;P2=0xbf;led=1; delay(1);
thì 0x28 ; 0xfb; 0xff....là gì vậy? Tại sao khi các động các chân cổng bằng lệnh đó thì lại hoạt động.
Thank mọi người nhiều!!
Comment
-
chào mọi người mình vừa làm xong con cube 5x5x5 mình dùng con trans a1013 trở loại 470 ohm nhưng không biết sao nó sang yếu quá mong mọi người góp ý chỉ hộ mình là do trans hay là do trở nha??? nếu thay thì nên thay loại nào cho hợp lý?? thanhk !!!!!!!!!!!!! " quangmanhvkhk@gmail.com "1+1=0 nhớ 1
Comment
Bài viết mới nhất
Collapse
-
bởi AaaabbbbbEm chào các anh chị ,cô chú . Em đang có 1 đề tài: Mô phỏng điều khiển động cơ 1 chiều và bộ điều khiển điện áp tự động (AVR) sử dụng MATLAB/Simulink và Arduino . Anh chị có thế giải thích hoặc định hướng giúp em với được không ạ . Em xin cảm ơn !!...
-
Channel: Vi điều khiển AVR
30-10-2024, 16:38 -
-
bởi 2embeyeuem mới nhập môn, bác nào có sơ đồ của mạch này và cách cắm mạch trên panel cho em xin với, em cảm ơn ạ
-
Channel: Điện tử dành cho người mới bắt đầu
30-10-2024, 15:52 -
-
bởi dqt21091997Hi mọi người,
Team mình hiện là đối tác phân phối cho 1 dịch vụ Proxy US chuẩn bị mở mang tên Proxy Compass. Mọi người có thể trải nghiệm ở đây: https://proxycompass.com/vi/free-trial/
Điểm mạnh của Proxy Compass là:
- 50 địa chỉ IP proxy
...-
Channel: Tổng quan về ngành viễn thông
30-10-2024, 14:46 -
-
Trả lời cho Thắc mắc về kiến thức điện xoay chiềubởi SteinsKMình nhớ là do điện AC không có chia cực cố định như DC, thêm vào đó thì ổ điện loại mà 2 lỗ thì cũng không có phân biệt chiều cắm, thành ra mình cắm chiều nào cũng được. Đây là em hiểu như vậy, có bác nào có ý kiến khác không ạ....
-
Channel: Điện tử dành cho người mới bắt đầu
30-10-2024, 09:57 -
-
bởi tivungvechào mọi người, em là sinh viên mới tìm hiểu về điện em có thắc mắc là tại sao điện AC ở nhà dùng có phích cắm khi cắm vào ổ điện thì cắm chiều nào cũng được, mà em đọc trên mạng thấy điện AC có dây trung tính và dây pha mà nhỉ...
-
Channel: Điện tử dành cho người mới bắt đầu
27-10-2024, 14:25 -
-
Trả lời cho ccs - 1 nút nhấn điều khiển 2 led - cần giúp ahbởi Truong2005Cám ơn nhiều! Code đẫ chạy
-
Channel: từ PIC tới dsPIC
26-10-2024, 21:21 -
-
bởi Manh.n.trCó ai từng thiết kế mạch cảm biến EC chưa ạ, cho em xin kinh nghiệm với ạ, em đang làm đề tài này bị mông lung quá
-
Channel: Hỗ trợ học tập
25-10-2024, 07:55 -
-
Trả lời cho Em muốn hỏi mọi người về nguyên lý hoạt động, tần số của mạch công suất trong máy rửa siêu âm ạ.bởi matnetgia99bạn giảm con C4, C5 (và giặt R song song với chúng) xem tần số tăng lên không
-
Channel: Hỗ trợ học tập
24-10-2024, 18:58 -
-
Trả lời cho Em muốn hỏi mọi người về nguyên lý hoạt động, tần số của mạch công suất trong máy rửa siêu âm ạ.bởi SteinsKEm cập nhật xíu nha mọi người, thì bữa trước em có mượn cái ossiloscope để đo lại thì mạch có tần số ngõ ra là 35kHz, sau khi em thay đổi L1=L2=1,5mH thì tần số có giảm xuống còn xấp xỉ 34kHz. Đổi L4=4.6mH và TR1 em có thay thành 1 con biến...
-
Channel: Hỗ trợ học tập
24-10-2024, 11:22 -
Comment