Thông báo

Collapse
No announcement yet.

Cần giúp code 8051 ma trận led đa sắc

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

  • Cần giúp code 8051 ma trận led đa sắc

    Bọn em đang làm phải bt lớn về VDK đề:
    Thiết kế mô hình bảng led điện tử dùng 01 ma trận led đa sắc.

    1.Thiết kế mô hình bảng led điện tử dùng 01 ma trận led đa sắc.
    Yêu cầu:
    - Mạch điện tử được thiết kế trên máy tính bằng phần mềm chuyên dụng.
    - Xây dựng bộ mã font gồm 26 chữ cái không dấu (A – Z) và 10 chữ số (0 – 9).
    - Hệ thống có thể hiển thị lần lượt từng chữ cái và chữ số với 03 màu: xanh, đỏ, vàng.

    ai có code giúp em với.

  • #2
    cậu có phải là Hiếu. học lớp cddt1.k5 đh công nghiệp hn k? nếu phải thì ll với minh. 098259241x

    Comment


    • #3
      minh cung the,minh cung dang can code nay,troi oi nghien cuu gan 1 thang roi van chua ra,help me

      Comment


      • #4
        sao không ai trả lời vậy

        Comment


        • #5
          tra loi gi bạn?
          không tiếp nhận cuộc gọi qua điện thoại vì đi làm toàn tập, tính khí thất thường, hay nóng võ công lại cao

          Comment


          • #6
            cho mình xin mã font từ A đến Z dịch trong led ma trận....
            và code hiển thị 26 kí tự đc không?
            thank!!!

            Comment


            • #7
              Nguyên văn bởi skillman91 Xem bài viết
              cho mình xin mã font từ A đến Z dịch trong led ma trận....
              và code hiển thị 26 kí tự đc không?
              thank!!!
              Đây là mã quét cột tích cực mức 1,xếp theo mã Ascii của kí tự tương ứng với thứ tự hàng nhé,bạn chỉ cần quan tâm tới cái nào có chú thích thôi nhé
              ma[]={
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44, // null
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x34,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // space
              0xBE,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // !
              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,
              0x28,0x68,0x38,0x2C,0x68,0x38,0x2C,0x28, // #
              0x4C,0x92,0xFF,0x92,0x64,0x00,0x00,0x00, // $
              0x43,0x23,0x10,0x08,0x04,0x62,0x61,0x00, // %
              0x70,0x8A,0x8D,0x9D,0x62,0x60,0x90,0x00, // &
              0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00, // '
              0x3C,0x42,0x81,0x00,0x00,0x00,0x00,0x00, // (
              0x81,0x42,0x3C,0x00,0x00,0x00,0x00,0x00, // )
              0xA8,0x70,0x20,0x70,0xA8,0x00,0x00,0x00, // *
              0x10,0x10,0x7C,0x10,0x10,0x00,0x00,0x00, // +
              0x00,0x00,0x80,0x40,0x00,0x00,0x00,0x00, // ,
              0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00, // -
              0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // .
              0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x00, // /
              0x7C,0x82,0x82,0x82,0x7C,0x00,0x00,0x00, // 0
              0x88,0x84,0xFE,0x80,0x80,0x00,0x00,0x00, // 1
              0xC4,0xA2,0x92,0x8A,0x84,0x00,0x00,0x00, // 2
              0x44,0x82,0x92,0x92,0x6C,0x00,0x00,0x00, // 3
              0x30,0x28,0x24,0xFE,0x20,0x00,0x00,0x00, // 4
              0x4E,0x8A,0x8A,0x8A,0x72,0x00,0x00,0x00, // 5
              0x7C,0x96,0x92,0x92,0x64,0x00,0x00,0x00, // 6
              0x02,0x02,0xF2,0x0A,0x06,0x00,0x00,0x00, // 7
              0x6C,0x92,0x92,0x92,0x6C,0x00,0x00,0x00, // 8
              0x4C,0x92,0x92,0x92,0x7C,0x00,0x00,0x00, // 9
              0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x00, // :
              0x00,0x80,0x50,0x00,0x00,0x00,0x00,0x00, // ;
              0x10,0x28,0x44,0x82,0x00,0x00,0x00,0x00, // <
              0x48,0x48,0x48,0x48,0x48,0x48,0x00,0x00, // =
              0x82,0x44,0x28,0x10,0x00,0x00,0x00,0x00, // >
              0x04,0x02,0xA2,0x12,0x0C,0x00,0x00,0x00, // ?
              0x04,0x72,0x8A,0x8A,0xF2,0x82,0x7C,0x00, // @
              0xF8,0x14,0x12,0x12,0x14,0xF8,0x00,0x00, // A
              0xFE,0x92,0x92,0x92,0x6C,0x00,0x00,0x00, // B
              0x7C,0x82,0x82,0x82,0x82,0x44,0x00,0x00, // C
              0xFE,0x82,0x82,0x82,0x44,0x38,0x00,0x00, // D
              0xFE,0x92,0x92,0x92,0x92,0x00,0x00,0x00, // E
              0xFE,0x12,0x12,0x12,0x12,0x00,0x00,0x00, // F
              0x7C,0x82,0x82,0x82,0xA2,0x64,0x20,0x00, // G
              0xFE,0x10,0x10,0x10,0x10,0xFE,0x00,0x00, // H
              0x00,0x82,0x82,0xFE,0x82,0x82,0x00,0x00, // I
              0x42,0x82,0x7E,0x02,0x02,0x00,0x00,0x00, // J
              0xFE,0x10,0x28,0x44,0x82,0x00,0x00,0x00, // K
              0xFE,0x80,0x80,0x80,0x80,0x00,0x00,0x00, // L
              0xFE,0x04,0x08,0x10,0x08,0x04,0xFE,0x00, // M
              0xFE,0x04,0x08,0x10,0x20,0xFE,0x00,0x00, // N
              0x7C,0x82,0x82,0x82,0x82,0x7C,0x00,0x00, // O
              0xFE,0x22,0x22,0x22,0x1C,0x00,0x00,0x00, // P
              0x7C,0x82,0x82,0xA2,0xC2,0xFC,0x80,0x00, // Q
              0xFE,0x32,0x32,0x52,0x8C,0x00,0x00,0x00, // R
              0x4C,0x92,0x92,0x92,0x64,0x00,0x00,0x00, // S
              0x02,0x02,0xFE,0x02,0x02,0x00,0x00,0x00, // T
              0x7E,0x80,0x80,0x80,0x80,0x7E,0x00,0x00, // U
              0x1E,0x20,0x40,0x80,0x40,0x20,0x1E,0x00, // V
              0x3E,0x40,0xC0,0x30,0xC0,0x40,0x3E,0x00, // W
              0x86,0x48,0x30,0x30,0x48,0x86,0x00,0x00, // X
              0x06,0x08,0x10,0xE0,0x10,0x08,0x06,0x00, // Y
              0xC2,0xA2,0x92,0x8A,0x86,0x82,0x00,0x00, // Z
              0xFE,0x82,0x82,0x00,0x00,0x00,0x00,0x00, // [
              0x00,0x02,0x04,0x08,0x10,0x20,0x40,0x80, //
              0x82,0x82,0xFE,0x00,0x00,0x00,0x00,0x00, // ]
              0x20,0x10,0x08,0x08,0x10,0x20,0x00,0x00, // ^
              0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00, // _
              0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00, // '
              0x60,0x94,0x94,0x94,0xF8,0x00,0x00,0x00, // a
              0xFE,0x90,0x88,0x88,0x70,0x00,0x00,0x00, // b
              0x78,0x84,0x84,0x84,0x48,0x00,0x00,0x00, // c
              0x70,0x88,0x88,0x90,0x7E,0x00,0x00,0x00, // d
              0x70,0xA8,0xA4,0xA4,0x18,0x00,0x00,0x00, // e
              0x80,0x90,0x7C,0x12,0x02,0x00,0x00,0x00, // f
              0x98,0xA4,0xA4,0xA4,0x78,0x00,0x00,0x00, // g
              0xFE,0x10,0x08,0x08,0xF0,0x00,0x00,0x00, // h
              0x88,0xFA,0x80,0x00,0x00,0x00,0x00,0x00, // i
              0x80,0x80,0x7A,0x00,0x00,0x00,0x00,0x00, // j
              0xFC,0x30,0x48,0x84,0x80,0x00,0x00,0x00, // k
              0x82,0xFE,0x80,0x00,0x00,0x00,0x00,0x00, // l
              0xF8,0x04,0xF8,0x04,0xF8,0x00,0x00,0x00, // m
              0xF8,0x04,0x04,0x04,0xF8,0x00,0x00,0x00, // n
              0x78,0x84,0x84,0x84,0x78,0x00,0x00,0x00, // o
              0xFC,0x24,0x24,0x18,0x00,0x00,0x00,0x00, // p
              0x0C,0x12,0x12,0x12,0xFC,0x00,0x00,0x00, // q
              0xFC,0x08,0x04,0x04,0x18,0x00,0x00,0x00, // r
              0x48,0x94,0x94,0x94,0x60,0x00,0x00,0x00, // s
              0x08,0x7E,0x88,0x48,0x00,0x00,0x00,0x00, // t
              0x78,0x80,0x80,0x80,0x78,0x00,0x00,0x00, // u
              0x3C,0x40,0x80,0x40,0x3C,0x00,0x00,0x00, // v
              0xF8,0x40,0x20,0x40,0xF8,0x00,0x00,0x00, // w
              0x88,0x50,0x20,0x50,0x88,0x00,0x00,0x00, // x
              0x4C,0x90,0x90,0x90,0x7C,0x00,0x00,0x00, // y
              0x88,0xC8,0xA8,0x98,0x88,0x00,0x00,0x00, // z
              0x10,0x6E,0x81,0x00,0x00,0x00,0x00,0x00, // {
              0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // |
              0x81,0x6E,0x10,0x00,0x00,0x00,0x00,0x00, // }
              0x40,0x20,0x20,0x40,0x40,0x20,0x00,0x00 // ~
              };
              vanduc0211@gmail.com

              Comment


              • #8
                #include<reg52.h>
                #include<stdio.h>
                unsigned char mangcot[8]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
                unsigned int m,n,z,k;
                unsigned char congtac;
                void delay(unsigned int t)
                {
                unsigned int i;
                for(i=0;i<=t;i++);
                }
                void xoa(void)
                {
                P0=0x00;
                }
                void chaychu1(void)
                {
                unsigned char mangchu1[83]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
                0x07,0xEB,0xED,0xEB,0x07,0xFF, //chu A
                0x01,0x6D,0x6D,0x6D,0x93,0xFF, //chu B
                0x83,0x7D,0x7D,0x7D,0xBB,0xFF, //chu C
                0x01,0x7D,0x7D,0x7D,0x83,0xFF, //chu D
                0x01,0x6D,0x6D,0x6D,0x6D,0xFF, //chu E
                0x01,0xED,0xED,0xED,0xED,0xFF, //chu F
                0x83,0x7D,0x7D,0x5D,0x9B,0xFF, //chu G
                0x01,0xEF,0xEF,0xEF,0x01,0xFF, //chu H
                0x7D,0x01,0x7D,0xFF, //chu I
                0xBF,0x7D,0x81,0xFD,0xFF, //chu J
                0x01,0xEF,0xD7,0xBB,0x7D,0xFF, //chu K
                0x01,0x7F,0x7F,0x7F,0xFF, //chu L
                0x01,0xFB,0xF7,0xFB,0x01,0xFF, //chu M
                0xFF,0xFF};
                z=0;
                while(z<=73)
                {
                for(m=1;m<=12;m++)
                {
                for(n=z;n<=7+z;n++)
                {
                P0=mangcot[n-z];
                if(congtac==1)
                {
                P2=mangchu1[n];
                P1=0xFF;
                }
                else if(congtac==2)
                {
                P1=mangchu1[n];
                P2=0xFF;
                }
                else if(congtac==3)
                {
                P1=P2=mangchu1[n];
                }
                delay(200);
                xoa();
                }
                }
                ++z;
                }
                }
                void chaychu2(void)
                {
                unsigned char mangchu2[86]={0x01,0xFB,0xF7,0xFB,0x01,0xFF,
                0x01,0xF7,0xEF,0xDF,0x01,0xFF, //chu N
                0x83,0x7D,0x7D,0x7D,0x83,0xFF, //chu O
                0x01,0xED,0xED,0xED,0xF3,0xFF, //chu P
                0x83,0x7D,0x5D,0xBD,0x43,0xFF, //chu Q
                0x01,0xED,0xCD,0xAD,0x73,0xFF, //chu R
                0xB3,0x6D,0x6D,0x6D,0x9B,0xFF, //chu S
                0xFD,0xFD,0x01,0xFD,0xFD,0xFF, //chu T
                0x81,0x7F,0x7F,0x7F,0x81,0xFF, //chu U
                0xC1,0xBF,0x7F,0xBF,0xC1,0xFF, //chu V
                0x81,0x7F,0x8F,0x7F,0x81,0xFF, //chu W
                0x39,0xD7,0xEF,0xD7,0x39,0xFF, //chu X
                0xF9,0xF7,0x0F,0xF7,0xF9,0xFF, //chu Y
                0x3D,0x5D,0x6D,0x75,0x79,0xFF, //chu Z
                0xFF,0xFF};
                z=0;
                while(z<=78)
                {
                for(m=1;m<=12;m++)
                {
                for(n=z;n<=7+z;n++)
                {
                P0=mangcot[n-z];
                if(congtac==1)
                {
                P2=mangchu2[n];
                P1=0xFF;
                }
                else if(congtac==2)
                {
                P1=mangchu2[n];
                P2=0xFF;
                }
                else if(congtac==3)
                {
                P1=P2=mangchu2[n];
                }
                delay(200);
                xoa();
                }
                }
                ++z;
                }
                }

                void chayso(void)
                {
                unsigned char mangso[73]={0x3D,0x5D,0x6D,0x75,0x79,0xFF,
                0x83,0x7D,0x7D,0x7D,0x83,0xFF, //so 0
                0xF7,0xFB,0x01,0xFF, //so 1
                0x7B,0x3D,0x5D,0x6D,0x73,0xFF, //so 2
                0xBB,0x7D,0x6D,0x6D,0x93,0xFF, //so 3
                0xDF,0xCF,0xD7,0xDB,0x01,0xFF, //so 4
                0x61,0x6D,0x6D,0x6D,0x9D,0xFF, //so 5
                0x83,0x6D,0x6D,0x6D,0x9B,0xFF, //so 6
                0x7D,0xBD,0xDD,0xED,0xF1,0xFF, //so 7
                0x93,0x6D,0x6D,0x6D,0x93,0xFF, //so 8
                0xB3,0x6D,0x6D,0x6D,0x83,0xFF, //so 9
                0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
                z=0;
                while(z<=65)
                {
                for(m=1;m<=12;m++)
                {
                for(n=z;n<=7+z;n++)
                {
                P0=mangcot[n-z];
                if(congtac==1)
                {
                P2=mangso[n];
                P1=0xFF;
                }
                else if(congtac==2)
                {
                P1=mangso[n];
                P2=0xFF;
                }
                else if(congtac==3)
                {
                P1=P2=mangso[n];
                }
                delay(200);
                xoa();
                }
                }
                ++z;
                }
                }
                void chaychu(void)
                {
                unsigned char mangchu[97]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
                0x81,0x7F,0x8F,0x7F,0x81,0xFF, //chu W
                0x01,0x6D,0x6D,0x6D,0x6D,0xFF, //chu E
                0x01,0x7F,0x7F,0x7F,0xFF, //chu L
                0x83,0x7D,0x7D,0x7D,0xBB,0xFF, //chu C
                0x83,0x7D,0x7D,0x7D,0x83,0xFF, //chu O
                0x01,0xFB,0xF7,0xFB,0x01,0xFF, //chu M
                0x01,0x6D,0x6D,0x6D,0x6D,0xFF, //chu E
                0xFF,0xFF,0xFF,
                0xFD,0xFD,0x01,0xFD,0xFD,0xFF, //chu T
                0x83,0x7D,0x7D,0x7D,0x83,0xFF, //chu O
                0xFF,0xFF,0xFF,
                0x01,0xEF,0xEF,0xEF,0x01,0xFF, //chu H
                0x07,0xEB,0xED,0xEB,0x07,0xFF, //chu A
                0x81,0x7F,0x7F,0x7F,0x81,0xFF, //chu U
                0x7D,0x01,0x7D,0xFF, //chu I
                0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
                z=0;
                while(z<=89)
                {
                for(m=1;m<=12;m++)
                {
                for(n=z;n<=7+z;n++)
                {
                P0=mangcot[n-z];
                if(congtac==1)
                {
                P2=mangchu[n];
                P1=0xFF;
                }
                else if(congtac==2)
                {
                P1=mangchu[n];
                P2=0xFF;
                }
                else if(congtac==3)
                {
                P1=P2=mangchu[n];
                }
                delay(200);
                xoa();
                }
                }
                ++z;
                }
                }
                void main(void)
                {
                congtac=1;
                IE=0x85;
                IT0=1;
                IT1=1;
                k=1;
                while(1)
                {
                if(k==1)
                {
                chaychu1();
                chaychu2();
                chayso();
                }
                if(k==2)
                {
                chaychu();
                }
                }
                }
                void ngatngoai0(void) interrupt 0
                {
                if (congtac<3)
                congtac++;
                else
                congtac=1;
                }
                void ngatngoai1(void) interrupt 2
                {
                if (k<2)
                k++;
                else
                k=1;
                }

                Comment

                Về tác giả

                Collapse

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

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

                Collapse

                Đang tải...
                X