Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 20 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
20
Dung lượng
106,08 KB
Nội dung
E:\mach trai tim\lap trinh\hepro.c // project:mach led trai tim // Design by leduche_dt3k3 // time:20:48/13/09/2009 // hotline:0979025040 // email:leduche90@gmail.com //############################################ #include #include #include unsigned int i,j,k; //###### ham delay tao thoi gian tre 0.5s ###### void delay(unsigned int ms) { unsigned int a; unsigned char b; for(a=0;a[...]... P0=N[i]; P1=N[i]; delay(300); } P1=P0=0xff; } //##### sang tang dan tat ca cac led so le nhau 1 ### void hieu_ung_31(void) { unsigned char M[]={0xfe,0xf5,0xea,0xd5,0xaa,0x55}; unsigned char N[]={0x7f,0xaf,0x57,0xab,0x55,0xaa}; unsigned char L[]={0x55,0xaa}; unsigned char K[]={0xaa,0x55}; Page: 11 E:\mach trai tim\ lap trinh\hepro .c unsigned char H[]={0xaa,0x55}; P0=P1=P2=P3=0xff; for(i=0;i ... //##### sang dan het cac led ############## Page: E:mach trai tim lap trinhhepro .c void hieu_ung_16(void) { unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0, 0x80,0x00}; unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,... //##### sang dan het cac led ############## void hieu_ung_19(void) { unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0, 0x80,0x00}; Page: E:mach trai tim lap trinhhepro .c unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,... //##### sang dan het cac led 11 ############## void hieu_ung_25(void) Page: E:mach trai tim lap trinhhepro .c { unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0, 0x80,0x00}; unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,