Thông báo

Collapse
No announcement yet.

led trái tim 32 bóng dùng chip điều khiển

Collapse
X
 
  • Lọc
  • Giờ
  • Show
Clear All
new posts

  • led trái tim 32 bóng dùng chip điều khiển

    Mình muốn làm 1 cái led trái tim 32 bóng và dùng chip 89c52, các bạn ào làm rối có thể chia sẽ kinh nghiệm cho mình đc ko, mình ko biết bắt đầu như thế nào cả, bạn nào có thể cho mình sơ đồ nguyên lý đc ko nếu có sơ đồ nguyên lý trên protues thì càng tốt'
    Mong các bạn giúp mình với
    Last edited by BOT_deptrai; 30-06-2011, 19:55.

  • #2
    Cái này thì bạn vào trang:

    http://www.chipkool.tk/2011/03/mach-...g-ban-gai.html

    trong đó có cái mạch nguyên lý đấy,bạn vào xem đi rùj làm.chào bạn!

    Comment


    • #3
      Nguyên văn bởi BOT_deptrai Xem bài viết
      Mình muốn làm 1 cái led trái tim 32 bóng và dùng chip 89c52, các bạn ào làm rối có thể chia sẽ kinh nghiệm cho mình đc ko, mình ko biết bắt đầu như thế nào cả, bạn nào có thể cho mình sơ đồ nguyên lý đc ko nếu có sơ đồ nguyên lý trên protues thì càng tốt'
      Mong các bạn giúp mình với
      bên box vi điều khiển 8051 nhiều lắm rồi, ko search

      Comment


      • #4
        Các bạn có thể tham khảo LED trái tim ở đây!
        VDNT Group!: Code LED Trai Tim ngôn ngữ C
        Phần Code viết bằng C dài không quá 400 dòng gồm gần 50 hiệu ứng cơ bản.
        Hàm viết rất ngắn gọn, đơn giản và có độ linh hoạt cao.Trong void main các bạn chỉ cần gọi hàm và truyền vào các tham số như độ trễ, chiều chạy, kiểu chạy, số LED,..
        Các bạn có thể dựa vào đó để tự sáng tạo theo ý của mình rất đơn giản. Chúc các bạn thành công!
        void main(void){
        while(1){

        for(i=3;i>0;i--){
        EF5pro_1(nhanh,1,0,1);
        }
        EF4(0,vua,1,0);
        EF4(0,vua,0,0);
        EF4(1,vua,1,0);
        EF4(1,vua,0,0);
        EF6_2(vua);
        for(i=3;i>0;i--){
        EF5pro_1(nhanh,1,1,1);
        }
        delayt(vua);
        for(i=5;i>0;i--){
        EF5pro_1(nhanh,1,0,1);
        }
        delayt(vua);
        for(i=3;i>0;i--){
        EF5pro_1(nhanh,1,1,1);
        }
        EF4(0,vua,1,0);
        EF4(0,vua,0,0);

        EF4(1,vua,1,0);
        EF6_1(vua);
        for(i=3;i>0;i--){
        EF5pro_1(nhanh,1,0,1);
        }
        delayt(vua);
        for(i=5;i>0;i--){
        EF5pro_1(nhanh,1,1,1);
        }
        delayt(vua);
        for(i=3;i>0;i--){
        EF5pro_1(nhanh,1,0,1);
        }

        EF4(0,vua,1,0);
        EF4(0,vua,0,0);

        EF1_1(vua,0,1,0);
        EF1_1(vua,0,0,1);
        EF1_1(vua,0,1,1);
        EF1_1(nhanh,1,0,1);
        EF1_1(nhanh,0,0,0);
        EF1_1(vua,1,1,1);
        EF1_1(vua,1,0,0);
        EF1_1(vua,1,1,0);
        EF1(nhanh,0,0,1);


        EF1(vua,0,1,0);
        EF1(vua,0,0,1);
        EF1(vua,0,1,1);
        EF1(vua,1,0,1);

        EF1(vua,0,0,0);

        EF1(vua,1,1,0);
        EF1(vua,1,1,1);
        EF1(vua,1,0,0);




        EF2(1,vua,8);
        EF2(2,vua,8);
        EF2(1,vua,8);
        EF2(2,vua,8);



        EF3(1,vua,0);
        EF3(1,vua,1);

        EF4(0,vua,0,1);
        EF4(0,vua,1,1);
        EF4(1,vua,0,1);
        EF4(1,vua,1,1);

        EF5pro(1,nhanh,0,0);
        EF3(0,vua,0);

        EF5pro(1,vua,1,1);
        EF5pro(1,nhanh,0,1);
        EF3(0,nhanh,1);
        EF5pro(1,nhanh,1,0);


        EF5pro(2,nhanh,0,0);
        EF5pro(2,vua,1,0);
        EF4(1,nhanh,0,1);
        EF5pro(2,vua,1,1);
        EF5pro(2,vua,0,1);

        EF5pro(4,vua,0,0);
        EF5pro(4,vua,1,0);

        for(i=0;i<8;i++){
        EF5pro_1(nhanh,i,1,0);}
        EF5pro(4,vua,0,1);
        EF5pro(4,vua,1,1);
        EF3(0,nhanh,1);
        for(i=0;i<8;i++){
        EF5pro_1(nhanh,i,1,0);}
        for(i=0;i<8;i++){
        EF5pro_1(nhanh,i,0,1);}
        for(i=0;i<8;i++){
        EF5pro_1(nhanh,i,0,0);}
        for(i=0;i<8;i++){
        EF5pro_1(nhanh,i,1,1);}
        EF5pro(4,vua,0,0);
        EF5pro(4,vua,1,0);

        EF6(nhanh,1);
        EF6(nhanh,2);
        }}

        Comment


        • #5
          hay lắm mình rất thích .
          hy vọng mình làm đc chắn chắn làm đc chứ bạn

          Comment


          • #6
            sao dạo này nhiều người làm led trái tim thế nhỉ? post bài dạng này quá trời luôn!
            ĐT: 0972 20 58 68
            Gmail:

            Comment


            • #7
              sao e làm mà mạch chẳng chạy ổn định gì cả
              luc được lúc k
              cho e hỏi chân 9 nố tụ bao nhiêu

              Comment


              • #8
                Nguyên văn bởi chuthuongbg Xem bài viết
                sao e làm mà mạch chẳng chạy ổn định gì cả
                luc được lúc k
                cho e hỏi chân 9 nố tụ bao nhiêu
                chân 9 nối tụ 10uF lên dương nguồn và nối với trở 10k xuống mass.
                ĐT: 0972 20 58 68
                Gmail:

                Comment


                • #9
                  Nguyên văn bởi hoangnam555 Xem bài viết
                  chân 9 nối tụ 10uF lên dương nguồn và nối với trở 10k xuống mass.
                  chân reset đây mà.mà chắc dạo nỳ sắp đến mùa ấm áp đó mà bác.chuẩn bị là vừa.lại đến ngày va linh tinh nữa còn mệt.hehe mình làm đc nhiều có điều k có ai để va với chạm.kkk
                  good luck !!!!

                  Email:
                  Gmail:

                  Comment


                  • #10
                    Nguyên văn bởi BOT_deptrai Xem bài viết
                    Mình muốn làm 1 cái led trái tim 32 bóng và dùng chip 89c52, các bạn ào làm rối có thể chia sẽ kinh nghiệm cho mình đc ko, mình ko biết bắt đầu như thế nào cả, bạn nào có thể cho mình sơ đồ nguyên lý đc ko nếu có sơ đồ nguyên lý trên protues thì càng tốt'
                    Mong các bạn giúp mình với
                    Của bác đây
                    MACH LED TRAI TIM.rar
                    Cuộc sống là một sự tìm kiếm, hãy sống đúng nghĩa để rồi sau mỗi chuyến đi ta luôn nhận được những gì mà đang tìm kiếm.

                    Comment


                    • #11
                      em de tu 100mF dc kjo anh
                      neu e ko can tu va ko can tro mach co chay dc ko anh

                      Comment


                      • #12
                        Nguyên văn bởi luan1991 Xem bài viết
                        em de tu 100mF dc kjo anh
                        neu e ko can tu va ko can tro mach co chay dc ko anh
                        Bạn nói tụ và trở nào cơ, nếu là tụ và trở reset thì phải có rồi
                        Cuộc sống là một sự tìm kiếm, hãy sống đúng nghĩa để rồi sau mỗi chuyến đi ta luôn nhận được những gì mà đang tìm kiếm.

                        Comment


                        • #13
                          led trai tim

                          Led.rar

                          Comment


                          • #14
                            CODE LED TRAI TIM OK DA TEST NGON: GUI ANH EM!
                            ////////////ahungcdt@gmail.com////////////
                            ////////////LED trai tim c52///////////
                            #include<reg52.h>
                            #include<stdio.h>
                            #include<intrins.h>
                            unsigned int i,j,k;
                            //////////////////////////////////////////////////////////
                            //ham phuc vu tre delay/////
                            void delay(unsigned int ms)
                            {
                            unsigned int a;
                            unsigned char b;
                            for(a=0;a<ms;a++)
                            {
                            for(b=0;b<125;b++)
                            {
                            }
                            }
                            }
                            ////////////////////////////////////////cac hieu ung LED////////////////
                            //hieu ung nhay toan bo LED
                            void hieu_ung_1(time,n)
                            {
                            for(k=0;k<n;k++)
                            {
                            P0=P1=P2=P3=0xff;
                            delay(time);
                            P0=P1=P2=P3=0x00;
                            delay(time);
                            }
                            }
                            //hieu ung nhay 2 nua cheo trai tim
                            void hieu_ung_2(time,n)
                            {
                            for(i=0;i<n;i++)
                            {
                            P0=P3=0x00;
                            delay(time);
                            P0=P3=0xff;
                            P1=P2=0x00;
                            delay(time);
                            P1=P2=0xff;
                            }
                            }
                            ////////##### hieu ung chop 2 nua trai phai trai tim
                            void hieu_ung_3(time,n)
                            {
                            for(i=0;i<n;i++)
                            {
                            P1=P3=0x00;
                            delay(time);
                            P1=P3=0xff;
                            P0=P2=0x00;
                            delay(time);
                            P0=P2=0xff;
                            delay(time);
                            P0=P2=0x00;
                            delay(time);
                            P0=P2=0xff;
                            delay(time);
                            //// /////////////////
                            P2=P0=0x00;
                            delay(time);
                            P2=P0=0xff;
                            P1=P3=0x00;
                            delay(time);
                            P1=P3=0xff;
                            delay(time);
                            P1=P3=0x00;
                            delay(time);
                            P1=P3=0xff;
                            delay(time);
                            }
                            }
                            //hieu ung nhay 2 nua tren
                            void hieu_ung_4(time,n)
                            {
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<n;i++)
                            {
                            P1=P0=0x00;
                            delay(time);
                            P1=P0=0xff;
                            P3=P2=0x00;
                            delay(time);
                            P3=P2=0xff;
                            delay(time);
                            P3=P2=0x00;
                            delay(time);
                            P3=P2=0xff;
                            delay(time);
                            P3=P2=0x00;
                            delay(time);
                            P3=P2=0xff;
                            delay(time);
                            }
                            }
                            //hieu ung nhay 2 nua duoi
                            void hieu_ung_5(time,n)
                            {
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<n;i++)
                            {
                            P2=P3=0x00;
                            delay(time);
                            P2=P3=0xff;
                            P1=P0=0x00;
                            delay(time);
                            P1=P0=0xff;
                            delay(time);
                            P1=P0=0x00;
                            delay(time);
                            P1=P0=0xff;
                            delay(time);
                            P1=P0=0x00;
                            delay(time);
                            P1=P0=0xff;
                            delay(time);

                            }
                            }
                            //hieu ung duoi 4 port thuan
                            void hieu_ung_6(void)
                            {
                            P0=P1=P2=P3=0XFF;
                            for(k=0;k<1;k++)
                            {
                            P0=0x00;
                            delay(600);
                            P2=0x00;
                            delay(600);
                            P3=0x00;
                            delay(600);
                            P1=0x00;
                            delay(600);
                            P0=P1=P2=P3=0Xff;
                            delay(500);
                            }
                            }
                            //hieu ung duoi 4 port nguoc
                            void hieu_ung_7(void)
                            {
                            P0=P1=P2=P3=0XFF;
                            delay(700);
                            for(k=0;k<1;k++)
                            {
                            P1=0x00;
                            delay(600);
                            P3=0x00;
                            delay(600);
                            P2=0x00;
                            delay(600);
                            P0=0x00;
                            delay(600);
                            P0=P1=P2=P3=0Xff;
                            delay(500);
                            }
                            }
                            //sang dan het cac led theo chieu thuan
                            void hieu_ung_8(unsigned char time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P0=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P2=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=N[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P1=N[i];
                            delay(time);
                            }
                            }
                            //tat dan het cac led theo chieu thuan
                            void hieu_ung_9(unsigned char time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0x00;
                            for(i=0;i<8;i++)
                            {
                            P0=~M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P2=~M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=~N[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P1=~N[i];
                            delay(time);
                            }
                            }
                            //sang dan het cac led theo chieu nguoc
                            void hieu_ung_10(unsigned char time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P2=N[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P0=N[i];
                            delay(time);
                            }
                            }
                            //tat dan het cac led theo chieu nguoc
                            void hieu_ung_11(unsigned char time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0x00;
                            for(i=0;i<8;i++)
                            {
                            P1=~M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=~M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P2=~N[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P0=~N[i];
                            delay(time);
                            }
                            }
                            //sang duoi dan het tu tren xuong
                            void hieu_ung_12(time,n)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(k=0;k<=n;k++)
                            {
                            for(i=0;i<8;i++)
                            {
                            P1=M[i];
                            P0=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P1=~M[i];
                            P0=~M[i];
                            P3=M[i];
                            P2=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=~M[i];
                            P2=~M[i];
                            delay(time);
                            }
                            }
                            }
                            //sang duoi dan het tu duoi len
                            void hieu_ung_13(time,n)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(k=0;k<=n;k++)
                            {
                            for(i=0;i<8;i++)
                            {
                            P1=M[i];
                            P0=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P1=~N[i];
                            P0=~N[i];
                            P3=M[i];
                            P2=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=~M[i];
                            P2=~M[i];
                            delay(time);
                            }
                            }
                            }
                            //sang dan tu giua
                            void hieu_ung_14(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=N[i];
                            P0=N[i];
                            P3=M[i];
                            P2=M[i];
                            delay(time);
                            }
                            }
                            //tat dan vao giua
                            void hieu_ung_15(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0x00;
                            for(i=0;i<8;i++)
                            {
                            P1=~N[i];
                            P0=~N[i];
                            P3=~M[i];
                            P2=~M[i];
                            delay(time);
                            }
                            }
                            //SANG THEO 2 NUA thuan
                            void hieu_ung_16(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xFF;
                            for(i=0;i<8;i++)
                            {
                            P1=M[i];
                            P2=N[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=M[i];
                            P0=N[i];
                            delay(time);
                            }
                            }
                            //SANG THEO 2 NUA nguoc
                            void hieu_ung_17(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xFF;
                            for(i=0;i<8;i++)
                            {
                            P3=N[i];
                            P0=M[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P1=N[i];
                            P2=M[i];
                            delay(time);
                            }
                            }

                            //SANG THEO 2 NUA ON/OFF thuan
                            void hieu_ung_18(time,n)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xFF;
                            for(i=0;i<8;i++)
                            {
                            P1=M[i];
                            P2=N[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P1=~M[i];
                            P2=~N[i];
                            P3=M[i];
                            P0=N[i];
                            delay(time);
                            }
                            }
                            //sang dan LED 4 nua thuan
                            void hieu_ung_19(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=M[i];
                            P3=M[i];
                            P0=N[i];
                            P2=N[i];
                            delay(time);
                            }
                            }
                            //tat dan LED 4 nua thuan
                            void hieu_ung_20(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=~N[i];
                            P3=~N[i];
                            P0=~M[i];
                            P2=~M[i];
                            delay(time);
                            }
                            }
                            //sang dan LED 4 nua nguoc
                            void hieu_ung_21(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=N[i];
                            P3=N[i];
                            P0=M[i];
                            P2=M[i];
                            delay(time);
                            }
                            }
                            //tat dan LED 4 nua nguoc
                            void hieu_ung_22(time)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};///////TU 0-7
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; //////TU 7-0
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=~M[i];
                            P3=~M[i];
                            P0=~N[i];
                            P2=~N[i];
                            delay(time);
                            }
                            }
                            /// 2 LED sang chay thuan
                            void hieu_ung_23(time)
                            {
                            unsigned char E[]={0xfc,0xf3,0xcf,0x3f};
                            unsigned char N[]={0x3f,0xcf,0xf3,0xfc};
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<4;i++)
                            {
                            P0=E[i];
                            delay(time);
                            }
                            for(i=0;i<4;i++)
                            {
                            P0=0xff;
                            P2=E[i];
                            delay(time);
                            }
                            for(i=0;i<4;i++)
                            {
                            P2=0xff;
                            P3=N[i];
                            delay(time);
                            }
                            for(i=0;i<4;i++)
                            {
                            P3=0xff;
                            P1=N[i];
                            delay(time);
                            }
                            P1=0xff;
                            }
                            // 2 LED tat chay thuan
                            void hieu_ung_24(time)
                            {
                            unsigned char E[]={0xfc,0xf3,0xcf,0x3f};
                            unsigned char N[]={0x3f,0xcf,0xf3,0xfc};
                            P0=P1=P2=P3=0x00;
                            for(i=0;i<4;i++)
                            {
                            P0=~E[i];
                            delay(time);
                            }
                            for(i=0;i<4;i++)
                            {
                            P0=0x00;
                            P2=~E[i];
                            delay(time);
                            }
                            for(i=0;i<4;i++)
                            {
                            P2=0x00;
                            P3=~N[i];
                            delay(time);
                            }
                            for(i=0;i<4;i++)
                            {
                            P3=0x00;
                            P1=~N[i];
                            delay(time);
                            }
                            P1=0x00;
                            }
                            //hieu ung sang don LED 4 nua thuan
                            void hieu_ung_25(time)
                            {
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,
                            0xbf,0x7f,0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f,0x3e,
                            0x3d,0x3b,0x37,0x2f,0x1f,0x1e,0x1d,0x1b,0x17,0x0f,
                            0x0e,0x0d,0x0b,0x07,0x06,0x05,0x03,0x02,0x01,0x00} ;
                            unsigned char N[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,
                            0xfd,0xfe,0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc,0x7c,
                            0xbc,0xdc,0xec,0xf4,0xf8,0x78,0xb8,0xd8,0xe8,0xf0,
                            0x70,0xb0,0xd0,0xe0,0x60,0xa0,0xc0,0x40,0x80,0x00} ;

                            for(i=0;i<36;i++)
                            {
                            P0=P2=M[i];
                            P1=P3=N[i];
                            delay(time);
                            }
                            }
                            //hieu ung TAT don LED 4 nua thuan
                            void hieu_ung_26(time)
                            {
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,
                            0xbf,0x7f,0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f,0x3e,
                            0x3d,0x3b,0x37,0x2f,0x1f,0x1e,0x1d,0x1b,0x17,0x0f,
                            0x0e,0x0d,0x0b,0x07,0x06,0x05,0x03,0x02,0x01,0x00} ;
                            unsigned char N[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,
                            0xfd,0xfe,0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc,0x7c,
                            0xbc,0xdc,0xec,0xf4,0xf8,0x78,0xb8,0xd8,0xe8,0xf0,
                            0x70,0xb0,0xd0,0xe0,0x60,0xa0,0xc0,0x40,0x80,0x00} ;

                            for(i=0;i<36;i++)
                            {
                            P0=P2=~M[i];
                            P1=P3=~N[i];
                            delay(time);
                            }
                            }


                            //hieu ung sang don LED 4 nua NGUOC
                            void hieu_ung_27(time)
                            {
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,
                            0xbf,0x7f,0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f,0x3e,
                            0x3d,0x3b,0x37,0x2f,0x1f,0x1e,0x1d,0x1b,0x17,0x0f,
                            0x0e,0x0d,0x0b,0x07,0x06,0x05,0x03,0x02,0x01,0x00} ;
                            unsigned char N[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,
                            0xfd,0xfe,0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc,0x7c,
                            0xbc,0xdc,0xec,0xf4,0xf8,0x78,0xb8,0xd8,0xe8,0xf0,
                            0x70,0xb0,0xd0,0xe0,0x60,0xa0,0xc0,0x40,0x80,0x00} ;

                            for(i=0;i<36;i++)
                            {
                            P0=P2=N[i];
                            P1=P3=M[i];
                            delay(time);
                            }
                            }
                            //hieu ung tat don LED 4 nua NGUOC
                            void hieu_ung_28(time)
                            {
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,
                            0xbf,0x7f,0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f,0x3e,
                            0x3d,0x3b,0x37,0x2f,0x1f,0x1e,0x1d,0x1b,0x17,0x0f,
                            0x0e,0x0d,0x0b,0x07,0x06,0x05,0x03,0x02,0x01,0x00} ;
                            unsigned char N[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,
                            0xfd,0xfe,0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc,0x7c,
                            0xbc,0xdc,0xec,0xf4,0xf8,0x78,0xb8,0xd8,0xe8,0xf0,
                            0x70,0xb0,0xd0,0xe0,0x60,0xa0,0xc0,0x40,0x80,0x00} ;

                            for(i=0;i<36;i++)
                            {
                            P0=P2=~N[i];
                            P1=P3=~M[i];
                            delay(time);
                            }
                            }

                            //sang dan tu phai
                            void hieu_ung_29(void)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,
                            0x80,0x00};
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,
                            0x01,0x00};
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P0=N[i];
                            P2=M[i];
                            delay(300);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=N[i];
                            P1=M[i];
                            delay(300);
                            }
                            }
                            //sang led tu phai
                            void hieu_ung_30(void)
                            {
                            unsigned char M[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,
                            0x80,0x00};
                            unsigned char N[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,
                            0x01,0x00};
                            P0=P1=P2=P3=0xFF;
                            for(i=0;i<8;i++)
                            {
                            P3=M[i];
                            P1=N[i];
                            delay(300);
                            }
                            for(i=0;i<8;i++)
                            {
                            P2=N[i];
                            P0=M[i];
                            delay(300);
                            }
                            }
                            //hieu ung led nhay so le 1
                            void hieu_ung_31(void)
                            {
                            for(i=0;i<8;i++)
                            {
                            P0=P1=P2=P3=0xaa;
                            delay(300);
                            P0=P1=P2=P3=0x55;
                            delay(300);
                            }
                            }
                            //sang tang dan tat ca cac led so le nhau 1
                            void hieu_ung_32(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};
                            unsigned char H[]={0xaa,0x55};
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<4;i++)
                            {
                            P0=M[i];
                            delay(300);
                            }
                            for(i=0;i<4;i++)
                            {
                            P0=K[i];
                            P2=M[i];

                            delay(300);
                            }
                            for(i=0;i<4;i++)
                            {
                            P0=K[i];
                            P2=K[i];
                            P3=N[i];

                            delay(300);
                            }
                            for(i=0;i<4;i++)
                            {
                            P0=K[i];
                            P2=K[i];
                            P3=K[i];
                            P1=N[i];

                            delay(300);
                            }
                            for(i=0;i<6;i++)
                            {
                            P0=K[i];
                            P2=K[i];
                            P3=K[i];
                            P1=K[i];
                            delay(300);
                            }
                            }
                            //sang tang dan tat ca cac led so le nhau 2
                            void hieu_ung_33(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};
                            unsigned char H[]={0xaa,0x55};
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<4;i++)
                            {
                            P1=M[i];
                            delay(300);
                            }
                            for(i=0;i<4;i++)
                            {
                            P1=K[i];
                            P3=M[i];

                            delay(300);
                            }
                            for(i=0;i<4;i++)
                            {
                            P1=K[i];
                            P3=K[i];
                            P2=N[i];

                            delay(300);
                            }
                            for(i=0;i<4;i++)
                            {
                            P1=K[i];
                            P3=K[i];
                            P2=K[i];
                            P0=N[i];

                            delay(300);
                            }
                            for(i=0;i<6;i++)
                            {
                            P0=K[i];
                            P2=K[i];
                            P3=K[i];
                            P1=K[i];
                            delay(300);
                            }
                            }
                            // chay bo 1 led tar thuan
                            void hieu_ung_34(time)
                            {
                            unsigned char R[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
                            unsigned char code U[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
                            P0=P1=P2=P3=0x00;
                            for(i=0;i<8;i++)
                            {
                            P1=R[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=R[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P2=U[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P0=U[i];
                            delay(time);
                            }
                            }
                            // chay bo 1 led sang thuan
                            void hieu_ung_35(time)
                            {
                            unsigned char R[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
                            unsigned char code U[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=~R[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P3=~R[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P2=~U[i];
                            delay(time);
                            }
                            for(i=0;i<8;i++)
                            {
                            P0=~U[i];
                            delay(time);
                            }
                            }
                            //chay 1 led sang
                            void hieu_ung_36(time)
                            {
                            unsigned char M[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0x7e,
                            0xbe,0xde,0xee,0xf6,0xfa,0xfc,0x7c,0xbc,0xdc,0xec, 0xf4,0xf8,0x78,0xb8,
                            0xd8,0xe8,0xf0,0x70,0xb0,0xd0,0xe0,0x60,0xa0,0xc0, 0x40,0x80,0x00};
                            unsigned char N[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,
                            0xbf,0x7f,0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f,0x3e,
                            0x3d,0x3b,0x37,0x2f,0x1f,0x1e,0x1d,0x1b,0x17,0x0f,
                            0x0e,0x0d,0x0b,0x07,0x06,0x05,0x03,0x02,0x01,0x00} ;
                            P0=P1=P2=P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P1=N[i];
                            delay(time);
                            }
                            P1=0xff;
                            for(i=0;i<8;i++)
                            {
                            P3=N[i];
                            delay(time);
                            }
                            P3=0xff;
                            for(i=0;i<8;i++)
                            {
                            P2=M[i];
                            delay(time);
                            }
                            P2=0xff;
                            for(i=0;i<8;i++)
                            {
                            P0=M[i];
                            delay(time);
                            }
                            P0=0xff;
                            }
                            //chay 1 led tat
                            void hieu_ung_37(time)
                            {
                            unsigned char M[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0x7e,
                            0xbe,0xde,0xee,0xf6,0xfa,0xfc,0x7c,0xbc,0xdc,0xec, 0xf4,0xf8,0x78,0xb8,
                            0xd8,0xe8,0xf0,0x70,0xb0,0xd0,0xe0,0x60,0xa0,0xc0, 0x40,0x80,0x00};
                            unsigned char N[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,
                            0xbf,0x7f,0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f,0x3e,
                            0x3d,0x3b,0x37,0x2f,0x1f,0x1e,0x1d,0x1b,0x17,0x0f,
                            0x0e,0x0d,0x0b,0x07,0x06,0x05,0x03,0x02,0x01,0x00} ;
                            P0=P1=P2=P3=0x00;
                            for(i=0;i<8;i++)
                            {
                            P1=~N[i];
                            delay(time);
                            }
                            P1=0x00;
                            for(i=0;i<8;i++)
                            {
                            P3=~N[i];
                            delay(time);
                            }
                            P3=0x00;
                            for(i=0;i<8;i++)
                            {
                            P2=~M[i];
                            delay(time);
                            }
                            P2=0x00;
                            for(i=0;i<8;i++)
                            {
                            P0=~M[i];
                            delay(time);
                            }
                            P0=0x00;
                            }
                            // sang don LED thuan
                            void hieu_ung_38(time)
                            {
                            unsigned char Q[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff}; /////THUAN
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};///8
                            unsigned char N[]={0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f}; ///7
                            unsigned char U[]={0x3e,0x3d,0x3b,0x37,0x2f,0x1f};/////6
                            unsigned char V[]={0x1e,0x1d,0x1b,0x17,0xf};/////5
                            unsigned char W[]={0xe,0xd,0xb,0x7};/////4
                            unsigned char R[]={0x6,0x5,0x3};/////3
                            unsigned char S[]={0x2,0x1};/////2
                            unsigned char X[]={0x00};/////1
                            unsigned char A[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};///// NGUOC
                            unsigned char B[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};/////8
                            unsigned char C[]={0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc}; ///7
                            unsigned char D[]={0x7c,0xbc,0xdc,0xec,0xf4,0xf8}; ///6
                            unsigned char E[]={0x78,0xb8,0xd8,0xe8,0xf0}; ///5
                            unsigned char F[]={0x70,0xb0,0xd0,0xe0}; ///4
                            unsigned char K[]={0x60,0xa0,0xc0}; ///3
                            unsigned char G[]={0x40,0x80}; ///2
                            unsigned char H[]={0x00}; //1

                            P0=P1=P2=P3=0xff;
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P3=M[i];
                            P2=M[i];
                            delay(time);
                            }
                            ////////////////1
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P3=N[i];
                            P2=N[i];
                            delay(time);
                            }
                            ////////////////2
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P3=U[i];
                            P2=U[i];
                            delay(time);
                            }
                            ////////////////3
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P3=V[i];
                            P2=V[i];
                            delay(time);
                            }
                            ////////////////4
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P3=W[i];
                            P2=W[i];
                            delay(time);
                            }
                            ////////////////5
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P3=R[i];
                            P2=R[i];
                            delay(time);
                            }
                            ////////////////6
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=S[i];
                            P2=S[i];
                            delay(time);
                            }

                            ////////////////7
                            for(i=0;i<=8;i++)
                            {
                            P0=Q[i];
                            P1=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=0X00;
                            P2=0X00;
                            }
                            for(i=0;i<=8;i++)
                            {
                            P1=P0=M[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P1=P0=N[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P1=P0=U[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P1=P0=V[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P1=P0=W[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P1=P0=R[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P1=P0=S[i];
                            delay(time);

                            }
                            P1=P0=0X00;
                            delay(time);
                            }
                            // tat don LED thuan
                            void hieu_ung_39(time)
                            {
                            unsigned char Q[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff}; /////THUAN
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};///8
                            unsigned char N[]={0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f}; ///7
                            unsigned char U[]={0x3e,0x3d,0x3b,0x37,0x2f,0x1f};/////6
                            unsigned char V[]={0x1e,0x1d,0x1b,0x17,0xf};/////5
                            unsigned char W[]={0xe,0xd,0xb,0x7};/////4
                            unsigned char R[]={0x6,0x5,0x3};/////3
                            unsigned char S[]={0x2,0x1};/////2
                            unsigned char X[]={0x00};/////1
                            unsigned char A[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};///// NGUOC
                            unsigned char B[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};/////8
                            unsigned char C[]={0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc}; ///7
                            unsigned char D[]={0x7c,0xbc,0xdc,0xec,0xf4,0xf8}; ///6
                            unsigned char E[]={0x78,0xb8,0xd8,0xe8,0xf0}; ///5
                            unsigned char F[]={0x70,0xb0,0xd0,0xe0}; ///4
                            unsigned char K[]={0x60,0xa0,0xc0}; ///3
                            unsigned char G[]={0x40,0x80}; ///2
                            unsigned char H[]={0x00}; //1

                            P0=P1=P2=P3=0x00;
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P3=~M[i];
                            P2=~M[i];
                            delay(time);
                            }
                            ////////////////1
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P3=~N[i];
                            P2=~N[i];
                            delay(time);
                            }
                            ////////////////2
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P3=~U[i];
                            P2=~U[i];
                            delay(time);
                            }
                            ////////////////3
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P3=~V[i];
                            P2=~V[i];
                            delay(time);
                            }
                            ////////////////4
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P3=~W[i];
                            P2=~W[i];
                            delay(time);
                            }
                            ////////////////5
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P3=~R[i];
                            P2=~R[i];
                            delay(time);
                            }
                            ////////////////6
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=~S[i];
                            P2=~S[i];
                            delay(time);
                            }

                            ////////////////7
                            for(i=0;i<=8;i++)
                            {
                            P0=~Q[i];
                            P1=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=0Xff;
                            P2=0Xff;
                            }
                            for(i=0;i<=8;i++)
                            {
                            P1=P0=~M[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P1=P0=~N[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P1=P0=~U[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P1=P0=~V[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P1=P0=~W[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P1=P0=~R[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P1=P0=~S[i];
                            delay(time);

                            }
                            P1=P0=0Xff;
                            delay(time);
                            }
                            //sang don 2 nua thuan
                            void hieu_ung_40(time)
                            {
                            unsigned char Q[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff}; /////THUAN
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};///8
                            unsigned char N[]={0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f}; ///7
                            unsigned char U[]={0x3e,0x3d,0x3b,0x37,0x2f,0x1f};/////6
                            unsigned char V[]={0x1e,0x1d,0x1b,0x17,0xf};/////5
                            unsigned char W[]={0xe,0xd,0xb,0x7};/////4
                            unsigned char R[]={0x6,0x5,0x3};/////3
                            unsigned char S[]={0x2,0x1};/////2
                            unsigned char X[]={0x00};/////1
                            unsigned char A[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff};///// NGUOC
                            unsigned char B[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};/////8
                            unsigned char C[]={0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc}; ///7
                            unsigned char D[]={0x7c,0xbc,0xdc,0xec,0xf4,0xf8}; ///6
                            unsigned char E[]={0x78,0xb8,0xd8,0xe8,0xf0}; ///5
                            unsigned char F[]={0x70,0xb0,0xd0,0xe0}; ///4
                            unsigned char K[]={0x60,0xa0,0xc0}; ///3
                            unsigned char G[]={0x40,0x80}; ///2
                            unsigned char H[]={0x00}; //1
                            P0=P1=P2=P3=0XFF;
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P3=M[i];
                            P0=B[i];
                            delay(time);
                            }
                            //////////////1
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P3=N[i];
                            P0=C[i];
                            delay(time);
                            }
                            //////////////2
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P3=U[i];
                            P0=D[i];
                            delay(time);
                            }
                            //////////////3
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P3=V[i];
                            P0=E[i];
                            delay(time);
                            }
                            //////////////4
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P3=W[i];
                            P0=F[i];
                            delay(time);
                            }
                            //////////////5
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P3=R[i];
                            P0=K[i];
                            delay(time);
                            }
                            //////////////6
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=S[i];
                            P0=G[i];
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P1=Q[i];
                            P2=A[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=0x00;
                            P0=0x00;
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P1=M[i];
                            P2=B[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P1=N[i];
                            P2=C[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P1=U[i];
                            P2=D[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P1=V[i];
                            P2=E[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P1=W[i];
                            P2=F[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P1=R[i];
                            P2=K[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P1=S[i];
                            P2=G[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P1=P2=0X00;
                            delay(time);
                            }
                            }
                            //sang don 2 nua nguoc
                            void hieu_ung_41(time)
                            {
                            unsigned char Q[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff}; /////THUAN
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};///8
                            unsigned char N[]={0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f}; ///7
                            unsigned char U[]={0x3e,0x3d,0x3b,0x37,0x2f,0x1f};/////6
                            unsigned char V[]={0x1e,0x1d,0x1b,0x17,0xf};/////5
                            unsigned char W[]={0xe,0xd,0xb,0x7};/////4
                            unsigned char R[]={0x6,0x5,0x3};/////3
                            unsigned char S[]={0x2,0x1};/////2
                            unsigned char X[]={0x00};/////1
                            unsigned char A[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff};///// NGUOC
                            unsigned char B[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};/////8
                            unsigned char C[]={0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc}; ///7
                            unsigned char D[]={0x7c,0xbc,0xdc,0xec,0xf4,0xf8}; ///6
                            unsigned char E[]={0x78,0xb8,0xd8,0xe8,0xf0}; ///5
                            unsigned char F[]={0x70,0xb0,0xd0,0xe0}; ///4
                            unsigned char K[]={0x60,0xa0,0xc0}; ///3
                            unsigned char G[]={0x40,0x80}; ///2
                            unsigned char H[]={0x00}; //1
                            P0=P1=P2=P3=0XFF;
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P1=B[i];
                            P2=M[i];
                            delay(time);
                            }
                            //////////////1
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P1=C[i];
                            P2=N[i];
                            delay(time);
                            }
                            //////////////2
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P1=D[i];
                            P2=U[i];
                            delay(time);
                            }
                            //////////////3
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P1=E[i];
                            P2=V[i];
                            delay(time);
                            }
                            //////////////4
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P1=F[i];
                            P2=W[i];
                            delay(time);
                            }
                            //////////////5
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P1=K[i];
                            P2=R[i];
                            delay(time);
                            }
                            //////////////6
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P1=G[i];
                            P2=S[i];
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P3=A[i];
                            P0=Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P1=0x00;
                            P2=0x00;
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P3=B[i];
                            P0=M[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P3=C[i];
                            P0=N[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P3=D[i];
                            P0=U[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P3=E[i];
                            P0=V[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P3=F[i];
                            P0=W[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P3=K[i];
                            P0=R[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P3=G[i];
                            P0=S[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=P0=0X00;
                            delay(time);
                            }
                            }
                            //TAT don 2 nua thuan
                            void hieu_ung_42(time)
                            {
                            unsigned char Q[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff}; /////THUAN
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};///8
                            unsigned char N[]={0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f}; ///7
                            unsigned char U[]={0x3e,0x3d,0x3b,0x37,0x2f,0x1f};/////6
                            unsigned char V[]={0x1e,0x1d,0x1b,0x17,0xf};/////5
                            unsigned char W[]={0xe,0xd,0xb,0x7};/////4
                            unsigned char R[]={0x6,0x5,0x3};/////3
                            unsigned char S[]={0x2,0x1};/////2
                            unsigned char X[]={0x00};/////1
                            unsigned char A[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff};///// NGUOC
                            unsigned char B[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};/////8
                            unsigned char C[]={0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc}; ///7
                            unsigned char D[]={0x7c,0xbc,0xdc,0xec,0xf4,0xf8}; ///6
                            unsigned char E[]={0x78,0xb8,0xd8,0xe8,0xf0}; ///5
                            unsigned char F[]={0x70,0xb0,0xd0,0xe0}; ///4
                            unsigned char K[]={0x60,0xa0,0xc0}; ///3
                            unsigned char G[]={0x40,0x80}; ///2
                            unsigned char H[]={0x00}; //1
                            P0=P1=P2=P3=0X00;
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P3=~M[i];
                            P0=~B[i];
                            delay(time);
                            }
                            //////////////1
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P3=~N[i];
                            P0=~C[i];
                            delay(time);
                            }
                            //////////////2
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P3=~U[i];
                            P0=~D[i];
                            delay(time);
                            }
                            //////////////3
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P3=~V[i];
                            P0=~E[i];
                            delay(time);
                            }
                            //////////////4
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P3=~W[i];
                            P0=~F[i];
                            delay(time);
                            }
                            //////////////5
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P3=~R[i];
                            P0=~K[i];
                            delay(time);
                            }
                            //////////////6
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=~S[i];
                            P0=~G[i];
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P1=~Q[i];
                            P2=~A[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=0xFF;
                            P0=0xFF;
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P1=~M[i];
                            P2=~B[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P1=~N[i];
                            P2=~C[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P1=~U[i];
                            P2=~D[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P1=~V[i];
                            P2=~E[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P1=~W[i];
                            P2=~F[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P1=~R[i];
                            P2=~K[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P1=~S[i];
                            P2=~G[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P1=P2=0XFF;
                            delay(time);
                            }
                            }
                            //sang don 2 nua nguoc
                            void hieu_ung_43(time)
                            {
                            unsigned char Q[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff}; /////THUAN
                            unsigned char M[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};///8
                            unsigned char N[]={0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f}; ///7
                            unsigned char U[]={0x3e,0x3d,0x3b,0x37,0x2f,0x1f};/////6
                            unsigned char V[]={0x1e,0x1d,0x1b,0x17,0xf};/////5
                            unsigned char W[]={0xe,0xd,0xb,0x7};/////4
                            unsigned char R[]={0x6,0x5,0x3};/////3
                            unsigned char S[]={0x2,0x1};/////2
                            unsigned char X[]={0x00};/////1
                            unsigned char A[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff};///// NGUOC
                            unsigned char B[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};/////8
                            unsigned char C[]={0x7e,0xbe,0xde,0xee,0xf6,0xfa,0xfc}; ///7
                            unsigned char D[]={0x7c,0xbc,0xdc,0xec,0xf4,0xf8}; ///6
                            unsigned char E[]={0x78,0xb8,0xd8,0xe8,0xf0}; ///5
                            unsigned char F[]={0x70,0xb0,0xd0,0xe0}; ///4
                            unsigned char K[]={0x60,0xa0,0xc0}; ///3
                            unsigned char G[]={0x40,0x80}; ///2
                            unsigned char H[]={0x00}; //1
                            P0=P1=P2=P3=0X00;
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P1=~B[i];
                            P2=~M[i];
                            delay(time);
                            }
                            //////////////1
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P1=~C[i];
                            P2=~N[i];
                            delay(time);
                            }
                            //////////////2
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P1=~D[i];
                            P2=~U[i];
                            delay(time);
                            }
                            //////////////3
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P1=~E[i];
                            P2=~V[i];
                            delay(time);
                            }
                            //////////////4
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P1=~F[i];
                            P2=~W[i];
                            delay(time);
                            }
                            //////////////5
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P1=~K[i];
                            P2=~R[i];
                            delay(time);
                            }
                            //////////////6
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P1=~G[i];
                            P2=~S[i];
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P3=~A[i];
                            P0=~Q[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P1=0xFF;
                            P2=0xFF;
                            delay(time);
                            }
                            //////////////7
                            for(i=0;i<=8;i++)
                            {
                            P3=~B[i];
                            P0=~M[i];
                            delay(time);
                            }
                            for(i=0;i<=7;i++)
                            {
                            P3=~C[i];
                            P0=~N[i];
                            delay(time);
                            }
                            for(i=0;i<=6;i++)
                            {
                            P3=~D[i];
                            P0=~U[i];
                            delay(time);
                            }
                            for(i=0;i<=5;i++)
                            {
                            P3=~E[i];
                            P0=~V[i];
                            delay(time);
                            }
                            for(i=0;i<=4;i++)
                            {
                            P3=~F[i];
                            P0=~W[i];
                            delay(time);
                            }
                            for(i=0;i<=3;i++)
                            {
                            P3=~K[i];
                            P0=~R[i];
                            delay(time);
                            }
                            for(i=0;i<=2;i++)
                            {
                            P3=~G[i];
                            P0=~S[i];
                            delay(time);
                            }
                            for(i=0;i<=1;i++)
                            {
                            P3=P0=0XFF;
                            delay(time);
                            }
                            }






                            // /////////////////////////////////chuong trinh chinh///////////////
                            main()
                            {
                            while(1)
                            {

                            hieu_ung_43(100);
                            hieu_ung_42(100);
                            hieu_ung_41(100);


                            hieu_ung_40(100);

                            hieu_ung_39(200);

                            hieu_ung_38(200);
                            hieu_ung_37(400);
                            hieu_ung_34(200);
                            hieu_ung_35(200);
                            hieu_ung_36(200);

                            hieu_ung_32();

                            hieu_ung_33();

                            hieu_ung_29();

                            hieu_ung_30();

                            hieu_ung_25(300);
                            hieu_ung_28(300);
                            hieu_ung_27(300);
                            hieu_ung_26(300);
                            hieu_ung_23(500);

                            hieu_ung_19(300);

                            hieu_ung_20(300);
                            hieu_ung_21(300);
                            hieu_ung_22(300);
                            hieu_ung_21(200);
                            hieu_ung_19(200);
                            hieu_ung_21(200);
                            hieu_ung_19(200);
                            hieu_ung_21(200);
                            hieu_ung_17(200);
                            hieu_ung_16(200);
                            hieu_ung_17(300);
                            hieu_ung_7();
                            hieu_ung_18(300);

                            hieu_ung_14(300);
                            hieu_ung_15(300);
                            hieu_ung_12(100,1);
                            hieu_ung_13(100,1);

                            hieu_ung_10(500);
                            hieu_ung_9(500);
                            hieu_ung_8(500);
                            hieu_ung_11(500);
                            hieu_ung_9(500);
                            hieu_ung_7();
                            hieu_ung_6();
                            hieu_ung_7();




                            }
                            }

                            Comment


                            • #15
                              ai comtrais tim lồng thì chuyển cho mình nhe! kảm ơn nhiều
                              liên hệ với mình wa gmail: phamhauddtk9@gmail.com

                              Comment

                              Về tác giả

                              Collapse

                              BOT_deptrai Tìm hiểu thêm về BOT_deptrai

                              Bài viết mới nhất

                              Collapse

                              Đang tải...
                              X