Thông báo

Collapse
No announcement yet.

các pro C ơi cho em hỏi về lỗi này với :((

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

  • các pro C ơi cho em hỏi về lỗi này với :((

    chương trình của em đây em lập trình cho 32Led đơn dùng at9c52 . em dùng keilCv.4. nhưng khi chạy nó báo lỗi C241:auto segment too larger.:các bác giúp em với
    #include <regx52.h>
    #include <stdlib.h>
    unsigned int i,j,k,n;
    // khai bao xong
    void tre(unsigned int t)
    {

    unsigned int;
    for(i=1;i<=t;i++);
    }
    //tre
    void nhay(unsigned int time,unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    P0=P1=P2=P3=0x00;
    tre(time);
    P0=P1=P2=P3=0xff;
    tre(time);
    }
    }
    //nhay
    void xepnuavong(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char V[136]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x0 8,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x0 0,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x0 0,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x0 0,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x0 0,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x0 0,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x81,0x8 2,0x84,0x88,0x90,0xa0,0xc0,0xc1,0xc2,0xc4,0xc8,0xd 0,0xe0,0xe1,0xe2,0xe4,0xe8,0xf0,0xf1,0xf2,0xf4,0xf 8,0xf9,0xfa,0xfc,0xfd,0xfe,0xff};
    unsigned char V1[136]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x81,0x82,0x84,0x88,0x90,0xa 0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc 1,0xc2,0xc4,0xc8,0xd0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe 0,0xe0,0xe0,0xe0,0xe1,0xe2,0xe4,0xe8,0xf0,0xf0,0xf 0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf1,0xf2,0xf4,0xf 8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf9,0xf a,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xf d,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff};
    unsigned char V2[136]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x0 8,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x0 0,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x0 0,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x0 0,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x0 0,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x0 0,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x81,0x8 2,0x84,0x88,0x90,0xa0,0xc0,0xc1,0xc2,0xc4,0xc8,0xd 0,0xe0,0xe1,0xe2,0xe4,0xe8,0xf0,0xf1,0xf2,0xf4,0xf 8,0xf9,0xfa,0xfc,0xfd,0xfe,0xff};
    unsigned char V3[136]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x81,0x82,0x84,0x88,0x90,0xa 0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc 1,0xc2,0xc4,0xc8,0xd0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe 0,0xe0,0xe0,0xe0,0xe1,0xe2,0xe4,0xe8,0xf0,0xf0,0xf 0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf1,0xf2,0xf4,0xf 8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf9,0xf a,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xf d,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff};
    for(j=1;j<=136;j++)
    {
    P1=V[j];
    P2=V1[j];
    P3=V2[j];
    P0=V3[j];
    tre(time);
    }
    }
    }
    //sang day
    void sangday(unsigned int time, unsigned char n)
    {
    for(i=i;i<=n;i++)
    {
    unsigned char M11[31]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x3 f,0x1f,0x0f,0x07,0x03,0x01,0x01,0x03,0x07,0x0f,0x1 f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff};
    unsigned char M12[31]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7 f,0xff};
    unsigned char M13[31]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff};
    unsigned char M14[31]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf c,0xf8,0xf0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf 8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff};
    for(j=1;j<=31;j++)
    {
    P1=M11[j];
    P2=M12[j];
    P3=M13[j];
    P0=M14[j];
    tre(time);
    }
    }
    }
    //daybon
    void daybon(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char N4[16]={0xff,0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};
    for(j=1;j<=16;j++)
    {
    P1=P2=P3=P0=N4[j];
    tre(time);
    }
    }
    }
    void daybondao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char N4[16]={0xff,0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};
    for(j=1;j<=16;j++)
    {
    P1=P2=P3=P0=~N4[j];
    tre(time);
    }
    }
    }
    void phun1nua(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char N11[32]={0x01,0x02,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    unsigned char N12[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    unsigned char N13[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x05,0x0 a,0x15,0x2a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa};
    unsigned char N14[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x01,0x02,0x05,0x0a,0x15,0x2 a,0x55,0xaa};
    for(j=1;j<=32;j++)
    {
    P1=N11[j];
    P2=N12[j];
    P3=N13[j];
    P0=N14[j];
    tre(time);
    }

    }
    }
    void phun1nua21(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char N11[32]={0x01,0x02,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    unsigned char N12[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    unsigned char N13[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x05,0x0 a,0x15,0x2a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa};
    unsigned char N14[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x01,0x02,0x05,0x0a,0x15,0x2 a,0x55,0xaa};
    for(j=1;j<=32;j++)
    {
    P1=N13[j];
    P2=N14[j];
    P3=N11[j];
    P0=N12[j];
    tre(time);
    }
    }
    }
    void phuncanguoc(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char N5[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x80,0x40,0xa0,0x50,0xa8,0x5 4,0xaa,0x55};
    unsigned char N6[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0xa0,0x5 0,0xa8,0x54,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55};
    unsigned char N7[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55};
    unsigned char N8[32]={0x80,0x40,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55};
    for(j=1;j<=32;j++)
    {
    P1=N5[j];
    P2=N6[j];
    P3=N7[j];
    P0=N8[j];
    tre(time);
    }

    }
    }
    void phuncaxuoi(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char N9[32]={0x01,0x02,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa};
    unsigned char N10[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa};
    unsigned char N11[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x05,0x0 a,0x15,0x2a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa};
    unsigned char N12[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x01,0x02,0x05,0x0a,0x15,0x2 a,0x55,0xaa};
    for(j=1;j<=32;j++)
    {
    P1=N9[j];
    P2=N10[j];
    P3=N11[j];
    P0=N12[j];
    tre(time);
    }
    }
    }
    void phunnuanguoc(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char M4[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x80,0x40,0xa0,0x50,0xa8,0x5 4,0xaa,0x55};
    unsigned char M5[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0xa0,0x5 0,0xa8,0x54,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55};
    unsigned char M6[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0xa0,0x50,0xa8,0x54,0xaa,0x55,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    unsigned char M7[32]={0x80,0x40,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    for(j=1;j<=32;j++)
    {
    P1=M4[j];
    P2=M5[j];
    P3=M6[j];
    P0=M7[j];
    tre(time);
    }
    }
    }
    void chyen4(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char M8[48]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0 f,0x1f,0x3f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char M9[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char M10[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0 f,0x1f,0x3f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xf f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char M11[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};
    for(j=1;j<=48;j++)
    {
    P1=M8[j];
    P2=M9[j];
    P3=M10[j];
    P0=M11[j];
    tre(time);
    }
    }
    }
    // chuyen 4 port dao?
    void chyen4dao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char M8[48]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0 f,0x1f,0x3f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char M9[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char M10[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0 f,0x1f,0x3f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xf f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char M11[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};
    for(j=1;j<=48;j++)
    {
    P1=~M8[j];
    P2=~M9[j];
    P3=~M10[j];
    P0=~M11[j];
    tre(time);
    }
    }
    }
    // chuyen 4 port nguoc
    void chyen4nguoc(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char K[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};
    unsigned char K1[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf 0,0xf8,0xfc,0xfe,0xff,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xf f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char K2[48]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char K3[48]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf 0,0xf8,0xfc,0xfe,0xff,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    for(j=1;j<=48;j++)
    {
    P1=K[j];
    P2=K1[j];
    P3=K2[j];
    P0=K3[j];
    tre(time);
    }
    }
    }
    // phun tu tren xuong
    void phunxuong(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char K4[16]={0x01,0x02,0x05,0x0f,0x15,0x2a,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xff};
    unsigned char K5[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x05,0x0a,0x15,0x2a,0x55,0xaa};
    unsigned char K6[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0xa0,0x50,0xa8,0x54,0xaa,0x55};
    unsigned char K7[16]={0x80,0x40,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55};
    for(j=1;j<=16;j++)
    {
    P1=K4[j];
    P2=K5[j];
    P3=K6[j];
    P0=K7[j];
    tre(time);
    }
    }
    }
    // phun tu duoi len
    void phunlen(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char K8[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0xa0,0x50,0xa8,0x54,0xaa,0x55};
    unsigned char K9[16]={0x80,0x40,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55};
    unsigned char K10[16]={0x01,0x02,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa};
    unsigned char K11[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x05,0x0a,0x15,0x2a,0x55,0xaa};
    for(j=1;j<=16;j++)
    {
    P1=K8[j];
    P2=K9[j];
    P3=K10[j];
    P0=K11[j];
    tre(time);
    }
    }
    }
    //giao nhau
    void giao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char K12[16]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0x4 0,0x20,0x10,0x08,0x04,0x02,0x01};
    unsigned char K13[16]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80};
    unsigned char K14[16]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0x4 0,0x20,0x10,0x08,0x04,0x02,0x01};
    unsigned char K15[16]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80};
    for(j=1;j<=16;j++)
    {
    P1=K12[j];
    P2=K13[j];
    P3=K14[j];
    P0=K15[j];
    tre(time);
    }
    }
    }
    //day len tu giua sau do tra ve
    void day1(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char A[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xfe,0xfc,0xf 8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    unsigned char A1[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf0,0xe 0,0xc0,0x80};
    unsigned char A2[32]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0f,0x0 7,0x03,0x01};
    unsigned char A3[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0x7f,0x3f,0x1 f,0x0f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    for(j=1;j<=32;j++)
    {
    P1=A[j];
    P2=A1[j];
    P3=A2[j];
    P0=A3[j];
    tre(time);
    }
    }
    }
    void giao4(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char A4[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80};
    unsigned char A5[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01};
    unsigned char A6[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80};
    unsigned char A7[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01};
    for(j=1;j<=53;j++)
    {
    P1=A4[j];
    P2=A5[j];
    P3=A6[j];
    P0=A7[j];
    tre(time);
    }
    }
    }
    void daybonnguoc(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char L8[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x80,0x40,0x20,0x1 0,0x08,0x04,0x02,0x01,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff};
    unsigned char L9[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x01,0x02,0x04,0x0 8,0x10,0x20,0x40,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0xff};
    unsigned char L10[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x80,0x40,0x20,0x1 0,0x08,0x04,0x02,0x01,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff};
    unsigned char L11[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x01,0x02,0x0 4,0x08,0x10,0x20,0x40,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0xff};
    for(j=1;j<=32;j++)
    {
    P1=L8[j];
    P2=L9[j];
    P3=L10[j];
    P0=L11[j];
    tre(time);
    }
    }
    }
    void chayxuong(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char A12[16]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00};
    unsigned char A13[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80};
    unsigned char A14[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0x20,0x10,0x08,0x04,0x02,0x01};
    unsigned char A15[16]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00};
    for(j=1;j<=16;j++)
    {
    P1=A12[j];
    P2=A13[j];
    P3=A14[j];
    P0=A15[j];
    tre(time);
    }
    }
    }
    void la1(unsigned int time,unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char B[16]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};
    unsigned char B1[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};
    unsigned char B2[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff};
    unsigned char B3[16]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff};
    for(j=1;j<=16;j++)
    {
    P1=B[j];
    P2=B1[j];
    P3=B2[j];
    P0=B3[j];
    tre(time);
    }
    }
    }
    void la2(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char B4[17]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff};
    unsigned char B5[17]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff};
    unsigned char B6[17]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff};
    unsigned char B7[17]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff};
    for(j=1;j<=17;j++)
    {
    P1=B4[j];
    P2=B5[j];
    P3=B6[j];
    P0=B7[j];
    tre(time);
    }
    }
    }
    void nhaythuxuong(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char B8[30]={0x00,0xfe,0x00,0xfc,0x00,0xf8,0x00,0xf0,0x00,0xe 0,0x00,0xc0,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0};
    unsigned char B9[30]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xfe,0x00,0xf c,0x00,0xf8,0x00,0xf0,0x00,0xe0,0x00,0xc0,0x00,0x8 0};
    unsigned char B10[30]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x7f,0x00,0x3 f,0x00,0x1f,0x00,0x0f,0x00,0x07,0x00,0x03,0x00,0x0 1};
    unsigned char B11[30]={0x00,0x7f,0x00,0x3f,0x00,0x1f,0x00,0x0f,0x00,0x0 7,0x00,0x03,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0};
    for(j=1;j<=30;j++)
    {
    P1=B8[j];
    P2=B9[j];
    P3=B10[j];
    P0=B11[j];
    tre(time);
    }
    }
    }
    void nhaythulen(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char B12[23]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x80,0xf0,0xe0,0xf0,0xf 8,0xfc,0xfe,0xff};
    unsigned char B13[23]={0x80,0x00,0xc0,0x00,0xe0,0x00,0xf0,0x00,0xf8,0x0 0,0xfc,0x00,0xfe,0x00,0xff,0x00,0xff,0x00,0xff,0x0 0,0xff,0x00,0xff};
    unsigned char B14[23]={0x01,0x00,0x03,0x00,0x07,0x00,0x0f,0x00,0x1f,0x0 0,0x3f,0x00,0x7f,0x00,0xff,0x00,0xff,0x00,0xff,0x0 0,0xff,0x00,0xff};
    unsigned char B15[23]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1 f,0x3f,0x7f,0xff};
    for(j=1;j<=23;j++)
    {
    P1=B12[j];
    P2=B13[j];
    P3=B14[j];
    P0=B15[j];
    tre(time);
    }
    }
    }
    void nhaynua2ben(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char C[8]={0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00};
    unsigned char C1[8]={0xff,0xfe,0xfc,0xf8,0xd0,0xe0,0xc0,0x80};
    unsigned char C2[8]={0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01};
    unsigned char C3[8]={0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00};
    for(j=1;j<=8;j++)
    {
    P1=C[j];
    P2=C1[j];
    P3=C2[j];
    P0=C3[j];
    tre(time);
    }
    }
    }
    void nhaynua(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char C4[15]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xfe,0xf c,0xf8,0xf0,0xe0,0xc0,0x80};
    unsigned char C5[15]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x7f,0x3 f,0x1f,0x0f,0x07,0x03,0x01};
    unsigned char C6[15]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00};
    unsigned char C7[15]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00};
    for(j=1;j<=15;j++)
    {
    P1=C4[j];
    P2=C5[j];
    P3=C6[j];
    P0=C7[j];
    tr(time);
    }
    }
    }
    void phun1nua2(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char C8[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x54,0xa8,0x5 0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char C9[31]={0x80,0x40,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x54,0xa8,0x50,0xa0,0x4 0,0x80};
    unsigned char C10[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x54,0xa8,0x5 0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char C11[31]={0x80,0x40,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x54,0xa8,0x50,0xa0,0x4 0,0x80};
    for(j=1;j<=31;j++)
    {
    P1=C8[j];
    P2=C9[j];
    P3=C10[j];
    P0=C11[j];
    tre(time);
    }
    }
    }
    void day1nua2(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char D[31]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x0 3,0x01};
    unsigned char D1[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char D2[31]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x0 3,0x01};
    unsigned char D3[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    for(j=1;j<=31;j++)
    {
    P1=D[j];
    P2=D1[j];
    P3=D2[j];
    P0=D3[j];
    tre(time);
    }
    }
    }
    void vaothura(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char D4[31]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char D5[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf0,0xe0,0xc 0,0x80};
    unsigned char D6[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x0 3,0x01};
    unsigned char D7[31]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    for(j=1;j<=31;j++)
    {
    P1=D4[j];
    P2=D5[j];
    P3=D6[j];
    P0=D7[j];
    tre(time);
    }
    }
    }
    void phunduoi(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char D8[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0x2a,0x15,0x0a,0x0 5,0x02};
    unsigned char D9[31]={0x80,0x40,0xa0,0x50,0xa8,0x54,0xaa,0x55,0xaa,0x5 5,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0x2a,0x1 5,0x0a,0x05,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char D10[31]={0x01,0x02,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x54,0xa 8,0x50,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char D11[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x05,0x0a,0x15,0x2a,0x55,0xaa,0x55,0xaa,0x55,0xa a,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x54,0xa8,0x50,0xa 0,0x40};
    for(j=1;j<=31;j++)
    {
    P1=D8[j];
    P2=D9[j];
    P3=D10[j];
    P0=D11[j];
    tre(time);
    }
    }
    }
    void sungban(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char D12[90]={0x01,0x03,0x07,0x0b,0x13,0x23,0x43,0x83,0x03,0x0 3,0x07,0x0b,0x13,0x23,0x43,0x83,0x03,0x03,0x03,0x0 3,0x03,0x03,0x07,0x0b,0x13,0x23,0x43,0x83,0x03,0x0 3,0x03,0x03,0x03,0x07,0x0b,0x13,0x23,0x43,0x83,0x8 3,0x83,0x83,0x83,0x87,0x8b,0x93,0xa3,0xc3,0x43,0x4 3,0x43,0x43,0x47,0x4b,0x53,0x63,0xa3,0x23,0x23,0x2 3,0x27,0x2b,0x33,0x53,0x93,0x13,0x13,0x17,0x1b,0x2 b,0x4b,0x8b,0x0b,0x0f,0x17,0x27,0x47,0x87,0x0f,0x1 7,0x27,0x47,0x8f,0x97,0xa7,0xcf,0xd7,0xef,0xf7,0xf f};
    unsigned char D13[90]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x04,0x04,0x04,0x04,0x04,0x05,0x06,0x0a,0x1 2,0x22,0x42,0x82,0x82,0x82,0x82,0x82,0x82,0x83,0x8 5,0x89,0x91,0xa1,0xc1,0xc1,0xc1,0xc1,0xc1,0xc1,0xc 2,0xc4,0xc8,0xd0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe1,0xe 2,0xe4,0xe8,0xf0,0xf0,0xf0,0xf0,0xf0,0xf1,0xf2,0xf 4,0xf8,0xf8,0xf8,0xf8,0xf8,0xf9,0xfa,0xfc,0xfc,0xf c,0xfc,0xfc,0xfd,0xfe,0xfe,0xfe,0xfe,0xfe,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f};
    unsigned char D14[90]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0x20,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x50,0x4 8,0x44,0x42,0x41,0x41,0x41,0x41,0x41,0x41,0xc1,0xa 1,0x91,0x89,0x85,0x83,0x83,0x83,0x83,0x83,0x83,0x4 3,0x23,0x13,0x0b,0x07,0x07,0x07,0x07,0x07,0x87,0x4 7,0x27,0x17,0x0f,0x0f,0x0f,0x0f,0x0f,0x8f,0x4f,0x2 f,0x1f,0x1f,0x1f,0x1f,0x1f,0x9f,0x5f,0x3f,0x3f,0x3 f,0x3f,0x3f,0xbf,0x7f,0x7f,0x7f,0x7f,0x7f,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f};
    unsigned char D15[90]={0x80,0xc0,0xe0,0xd0,0xc8,0xc4,0xc2,0xc1,0xc0,0xc 0,0xe0,0xd0,0xc8,0xc4,0xc2,0xc1,0xc0,0xc0,0xc0,0xc 0,0xc0,0xc0,0xe0,0xd0,0xc8,0xc4,0xc2,0xc1,0xc0,0xc 0,0xc0,0xc0,0xc0,0xe0,0xd0,0xc8,0xc4,0xc2,0xc1,0xc 1,0xc1,0xc1,0xc1,0xe1,0xd1,0xc9,0xc5,0xc3,0xc2,0xc 2,0xc2,0xc2,0xe2,0xd2,0xca,0xc6,0xc5,0xc4,0xc4,0xc 4,0xe4,0xd4,0xcc,0xca,0xc9,0xc8,0xc8,0xe8,0xd8,0xd 4,0xd2,0xd1,0xd0,0xf0,0xe8,0xe4,0xe2,0xe1,0xf0,0xe 8,0xe4,0xe2,0xf1,0xe9,0xe5,0xf3,0xeb,0xf7,0xef,0xf f};
    for(j=1;j<=90;j++)
    {
    P1=D12[j];
    P2=D13[j];
    P3=D14[j];
    P0=D15[j];
    tre(time);
    }


    }
    }
    void xepxuong(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char E[122]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0 1,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x0 0,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x8 0,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x2 0,0x40,0x80,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x01,0x02,0x04,0x08,0x10,0x2 0,0x40,0x80,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x8 1,0x82,0x84,0x88,0x90,0xa0,0xc1,0xc2,0xc4,0xc8,0xd 0,0xe1,0xe2,0xe4,0xe8,0xf1,0xf2,0xf4,0xf9,0xfa,0xf d,0xfe,0xff};
    unsigned char E1[122]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x81,0x82,0x84,0x88,0x90,0xa0,0xc 0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc2,0xc 4,0xc8,0xd0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe 0,0xe1,0xe2,0xe4,0xe8,0xf0,0xf0,0xf0,0xf0,0xf0,0xf 0,0xf0,0xf0,0xf1,0xf2,0xf4,0xf8,0xf8,0xf8,0xf8,0xf 8,0xf8,0xf8,0xf8,0xf9,0xfa,0xfc,0xfc,0xfc,0xfc,0xf c,0xfc,0xfc,0xfc,0xfd,0xfe,0xfe,0xfe,0xfe,0xfe,0xf e,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff};
    unsigned char E2[122]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0x20,0x10,0x08,0x04,0x02,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x81,0x41,0x21,0x11,0x09,0x05,0x0 3,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x83,0x43,0x2 3,0x13,0x0b,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0 7,0x87,0x47,0x27,0x17,0x0f,0x0f,0x0f,0x0f,0x0f,0x0 f,0x0f,0x0f,0x8f,0x4f,0x2f,0x1f,0x1f,0x1f,0x1f,0x1 f,0x1f,0x1f,0x1f,0x9f,0x5f,0x3f,0x3f,0x3f,0x3f,0x3 f,0x3f,0x3f,0x3f,0xbf,0x7f,0x7f,0x7f,0x7f,0x7f,0x7 f,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff};
    unsigned char E3[122]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x0 8,0x04,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x8 0,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x00,0x0 0,0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x0 1,0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x0 4,0x02,0x01,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x0 8,0x04,0x02,0x01,0x00,0x00,0x80,0x40,0x20,0x10,0x0 8,0x04,0x02,0x01,0x00,0x80,0x40,0x20,0x10,0x08,0x0 4,0x02,0x01,0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x8 1,0x41,0x21,0x11,0x09,0x05,0x83,0x43,0x23,0x13,0x0 b,0x87,0x47,0x27,0x17,0x8f,0x4f,0x2f,0x9f,0x5f,0xb f,0x7f,0xff};
    for(j=1;j<=122;j++)
    {
    P1=E[j];
    P2=E1[j];
    P3=E2[j];
    P0=E3[j];
    tre(time);
    }
    }
    }
    void xeplen(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char E4[123]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0x20,0x10,0x08,0x04,0x02,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x81,0x41,0x21,0x11,0x09,0x05,0x0 3,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x83,0x43,0x2 3,0x13,0x0b,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0 7,0x87,0x47,0x27,0x17,0x0f,0x0f,0x0f,0x0f,0x0f,0x0 f,0x0f,0x0f,0x8f,0x4f,0x2f,0x1f,0x1f,0x1f,0x1f,0x1 f,0x1f,0x1f,0x1f,0x9f,0x5f,0x3f,0x3f,0x3f,0x3f,0x3 f,0x3f,0x3f,0x3f,0xbf,0x7f,0x7f,0x7f,0x7f,0x7f,0x7 f,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff};
    unsigned char E5[123]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x0 8,0x04,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x8 0,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x00,0x0 0,0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x0 1,0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x0 4,0x02,0x01,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x0 8,0x04,0x02,0x01,0x00,0x00,0x80,0x40,0x20,0x10,0x0 8,0x04,0x02,0x01,0x00,0x80,0x40,0x20,0x10,0x08,0x0 4,0x02,0x01,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x4 0,0x81,0x82,0x84,0x88,0x90,0xa0,0xc1,0xc2,0xc4,0xc 8,0xd0,0xe1,0xe2,0xe4,0xe8,0xf1,0xf2,0xf4,0xf9,0xf a,0xfd,0xfe,0xff};
    unsigned char E6[123]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0 1,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x0 0,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x8 0,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x2 0,0x40,0x80,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x00,0x01,0x02,0x04,0x08,0x1 0,0x20,0x40,0x80,0x00,0x01,0x02,0x04,0x08,0x10,0x2 0,0x40,0x80,0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x0 2,0x81,0x41,0x21,0x11,0x09,0x05,0x83,0x43,0x23,0x1 3,0x0b,0x87,0x47,0x27,0x17,0x8f,0x4f,0x2f,0x9f,0x5 f,0xbf,0x7f,0xff};
    unsigned char E7[123]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x81,0x82,0x84,0x88,0x90,0xa0,0xc 0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc2,0xc 4,0xc8,0xd0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe 0,0xe1,0xe2,0xe4,0xe8,0xf0,0xf0,0xf0,0xf0,0xf0,0xf 0,0xf0,0xf0,0xf1,0xf2,0xf4,0xf8,0xf8,0xf8,0xf8,0xf 8,0xf8,0xf8,0xf8,0xf9,0xfa,0xfc,0xfc,0xfc,0xfc,0xf c,0xfc,0xfc,0xfc,0xfd,0xfe,0xfe,0xfe,0xfe,0xfe,0xf e,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff};
    for(j=1;j<=123;j++)
    {
    P1=E4[j];
    P2=E5[j];
    P3=E6[j];
    P0=E7[j];
    tre(time);
    }
    }
    }
    void game1(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char E8[192]={0x01,0x03,0x05,0x09,0x11,0x21,0x41,0x81,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x81,0xc1,0xe1,0x71,0x39,0x1d,0x0f,0x1f,0x3 d,0x79,0xf1,0xe1,0xc1,0x81,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x81,0xc1,0xe1,0xf1,0xf9,0x7 d,0x3f,0x7f,0xfd,0xf9,0xf1,0xe1,0xc1,0x81,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x81,0xc1,0xe1,0xf1,0xf9,0xfd,0xff,0xf f,0xff,0xfd,0xf9,0xf1,0xe1,0xc1,0x81,0xc1,0xe1,0xf 1,0xf9,0xfd,0xff,0xff,0xfd,0xf9,0xf1,0xe1,0xf1,0xf 9,0xfd,0xff,0xff,0xfd,0xf9,0xf1,0xf9,0xfd,0xff,0xf f,0xff,0xff};
    unsigned char E9[192]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0 e,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x01,0x03,0x07,0x0f,0x1e,0x3c,0x78,0xf 0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf 0,0xf8,0x7c,0x3e,0x1f,0x0f,0x07,0x03,0x01,0x00,0x0 0,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7 e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00,0x8 0,0x81,0x83,0x87,0x8f,0x9f,0xbf,0xff,0xff,0xbf,0x9 f,0x8f,0x87,0x83,0x87,0x8f,0x9f,0xbf,0xff,0x7f,0x3 f,0x1f,0x0f,0x1f,0x3f,0x7f,0xff,0x7f,0x3f,0x1f,0x3 f,0x7f,0xff};
    unsigned char E10[192]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0x20,0x10,0x08,0x04,0x02,0x01,0x03,0x06,0x0c,0x1 8,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x3 8,0x1c,0x0e,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x01,0x03,0x07,0x0f,0x1e,0x3c,0x78,0xf0,0xe0,0xc 0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0x7c,0x3e,0x1f,0x0f,0x07,0x03,0x0 1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7e,0xfc,0xf 8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x80,0xc0,0xe0,0xf 0,0xf8,0xfc,0xfe,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x0 1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x03,0x07,0x0f,0x1 f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff};
    unsigned char E11[192]={0x80,0xc0,0xa0,0x90,0x88,0x84,0x82,0x81,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x81,0x83,0x86,0x8c,0x98,0xb0,0xe 0,0xf0,0xb8,0x9c,0x8e,0x87,0x83,0x81,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x8 3,0x87,0x8f,0x9e,0xbc,0xf8,0xfc,0xbe,0x9f,0x8f,0x8 7,0x83,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 1,0x83,0x87,0x8f,0x9f,0xbf,0xfe,0xbf,0x9f,0x8f,0x8 7,0x83,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x81,0x83,0x87,0x8f,0x9f,0xbf,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff};
    for(j=1;j<=192;j++)
    {
    P1=E8[j];
    P2=E9[j];
    P3=E10[j];
    P0=E11[j];
    tre(time)
    }

    }
    }
    void bonport2ben(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char E12[31]={0x0f,0x1e,0x3c,0x78,0xf0,0xe0,0xc0,0x80,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0x78,0x3c,0x1 e,0x0f};
    unsigned char E13[31]={0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1 e,0x3c,0x78,0xf0,0xe0,0xc0,0x80,0xc0,0xe0,0xf0,0x7 8,0x3c,0x1e,0x0f,0x07,0x03,0x01,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char E14[31]={0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0x7 8,0x3c,0x1e,0x0f,0x07,0x03,0x01,0x03,0x07,0x0f,0x1 e,0x3c,0x78,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char E15[31]={0xf0,0x78,0x3c,0x1e,0x0f,0x07,0x03,0x01,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1e,0x3c,0x7 8,0xf0};
    for(j=1;j<=31;j++)
    {
    P1=E12[j];
    P2=E13[j];
    P3=E14[j];
    P0=E15[j];
    tre(time);
    }
    }
    }
    void game1dao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char E8[192]={0x01,0x03,0x05,0x09,0x11,0x21,0x41,0x81,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x81,0xc1,0xe1,0x71,0x39,0x1d,0x0f,0x1f,0x3 d,0x79,0xf1,0xe1,0xc1,0x81,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x81,0xc1,0xe1,0xf1,0xf9,0x7 d,0x3f,0x7f,0xfd,0xf9,0xf1,0xe1,0xc1,0x81,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0 1,0x01,0x01,0x81,0xc1,0xe1,0xf1,0xf9,0xfd,0xff,0xf f,0xff,0xfd,0xf9,0xf1,0xe1,0xc1,0x81,0xc1,0xe1,0xf 1,0xf9,0xfd,0xff,0xff,0xfd,0xf9,0xf1,0xe1,0xf1,0xf 9,0xfd,0xff,0xff,0xfd,0xf9,0xf1,0xf9,0xfd,0xff,0xf f,0xff,0xff};
    unsigned char E9[192]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 2,0x04,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0 e,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x01,0x03,0x07,0x0f,0x1e,0x3c,0x78,0xf 0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf 0,0xf8,0x7c,0x3e,0x1f,0x0f,0x07,0x03,0x01,0x00,0x0 0,0x00,0x00,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7 e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00,0x8 0,0x81,0x83,0x87,0x8f,0x9f,0xbf,0xff,0xff,0xbf,0x9 f,0x8f,0x87,0x83,0x87,0x8f,0x9f,0xbf,0xff,0x7f,0x3 f,0x1f,0x0f,0x1f,0x3f,0x7f,0xff,0x7f,0x3f,0x1f,0x3 f,0x7f,0xff};
    unsigned char E10[192]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4 0,0x20,0x10,0x08,0x04,0x02,0x01,0x03,0x06,0x0c,0x1 8,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x3 8,0x1c,0x0e,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x01,0x03,0x07,0x0f,0x1e,0x3c,0x78,0xf0,0xe0,0xc 0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0x7c,0x3e,0x1f,0x0f,0x07,0x03,0x0 1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7e,0xfc,0xf 8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x80,0xc0,0xe0,0xf 0,0xf8,0xfc,0xfe,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x0 1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 1,0x01,0x01,0x01,0x01,0x01,0x01,0x03,0x07,0x0f,0x1 f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff};
    unsigned char E11[192]={0x80,0xc0,0xa0,0x90,0x88,0x84,0x82,0x81,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x81,0x83,0x86,0x8c,0x98,0xb0,0xe 0,0xf0,0xb8,0x9c,0x8e,0x87,0x83,0x81,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x8 3,0x87,0x8f,0x9e,0xbc,0xf8,0xfc,0xbe,0x9f,0x8f,0x8 7,0x83,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 1,0x83,0x87,0x8f,0x9f,0xbf,0xfe,0xbf,0x9f,0x8f,0x8 7,0x83,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8 0,0x80,0x80,0x80,0x81,0x83,0x87,0x8f,0x9f,0xbf,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff};
    for(j=1;j<=192;j++)
    {
    P1=~E8[j];
    P2=~E9[j];
    P3=~E10[j];
    P0=~E11[j];
    tre(time)
    }

    }
    }

    void day1nua2dao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char D[31]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x0 3,0x01};
    unsigned char D1[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    unsigned char D2[31]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x0 3,0x01};
    unsigned char D3[31]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00};
    for(j=1;j<=31;j++)
    {
    P1=~D[j];
    P2=~D1[j];
    P3=~D2[j];
    P0=~D3[j];
    tre(time);
    }
    }
    }
    void nhaynuadao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char C4[15]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xfe,0xf c,0xf8,0xf0,0xe0,0xc0,0x80};
    unsigned char C5[15]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x7f,0x3 f,0x1f,0x0f,0x07,0x03,0x01};
    unsigned char C6[15]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00};
    unsigned char C7[15]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00};
    for(j=1;j<=15;j++)
    {
    P1=~C4[j];
    P2=~C5[j];
    P3=~C6[j];
    P0=~C7[j];
    tre(time);
    }
    }
    }
    void nhaythuxuongdao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char B8[30]={0x00,0xfe,0x00,0xfc,0x00,0xf8,0x00,0xf0,0x00,0xe 0,0x00,0xc0,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0};
    unsigned char B9[30]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xfe,0x00,0xf c,0x00,0xf8,0x00,0xf0,0x00,0xe0,0x00,0xc0,0x00,0x8 0};
    unsigned char B10[30]={0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xf f,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x7f,0x00,0x3 f,0x00,0x1f,0x00,0x0f,0x00,0x07,0x00,0x03,0x00,0x0 1};
    unsigned char B11[30]={0x00,0x7f,0x00,0x3f,0x00,0x1f,0x00,0x0f,0x00,0x0 7,0x00,0x03,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0};
    for(j=1;j<=30;j++)
    {
    P1=~B8[j];
    P2=~B9[j];
    P3=~B10[j];
    P0=~B11[j];
    tre(time);
    }
    }
    }
    void daybonnguocdao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsinged char A8[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x80,0x40,0x20,0x1 0,0x08,0x04,0x02,0x01,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff};
    unsigned char A9[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x01,0x02,0x04,0x0 8,0x10,0x20,0x40,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0xff};
    unsigned char A10[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x80,0x40,0x20,0x1 0,0x08,0x04,0x02,0x01,0x01,0x03,0x07,0x0f,0x1f,0x3 f,0x7f,0xff};
    unsigned char A11[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf e,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x01,0x02,0x0 4,0x08,0x10,0x20,0x40,0x80,0xc0,0xe0,0xf0,0xf8,0xf c,0xfe,0xff};
    for(j=1;j<=32;j++)
    {
    P1=~A8[j];
    P2=~A9[j];
    P3=~A10[j];
    P0=~A11[j];
    tre(time);
    }
    }
    }
    void giao4dao(unsigned int time, unsigned ch? N)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char A4[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80};
    unsigned char A5[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01};
    unsigned char A6[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80};
    unsigned char A7[53]={0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xfe,0xfc,0xf8,0xf 0,0xe0,0xc0,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xf e,0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0x7f,0x3f,0x1f,0x0 f,0x07,0x03,0x01};
    for(j=1;j<=53;j++)
    {
    P1=~A4[j];
    P2=~A5[j];
    P3=~A6[j];
    P0=~A7[j];
    tre(time);
    }
    }
    }
    void day1dao(unsigned int time, unsigned char n)
    {
    for(i=1;i<=n;i++)
    {
    unsigned char A[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc 0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xfe,0xfc,0xf 8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    unsigned char A1[32]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf0,0xe 0,0xc0,0x80};
    unsigned char A2[32]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf f,0xff,0xff,0xff,0xff,0xff,0x7f,0x3f,0x1f,0x0f,0x0 7,0x03,0x01};
    unsigned char A3[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0x7f,0x3f,0x1 f,0x0f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
    for(j=1;j<=32;j++)
    {
    P1=~A[j];
    P2=~A1[j];
    P3=~A2[j];
    P0=~A3[j];
    tre(time);
    }
    }
    }
    void main()
    {
    while(1)
    }


  • #2
    em đã bỏ đi phần whlie(1) vì bài viết chỉ tối đa 50000 kí tự

    Comment


    • #3
      các anh ơi chỉ cho em lỗi auto segment too larger là lỗi gì đi. chỉ cho em cách sửa với

      Comment


      • #4
        Summary *** Error C241 Auto Segment Too Large
        Description The required space for local objects exceeds the model dependent maximum. The maximum segment sizes are defined as follows: SMALL 128 bytes COMPACT 256 bytes LARGE 65535 bytes
        Khi bạn khai báo các biến mà không nói gì thêm thì trình dịch sẽ hiểu đó là bộ nhớ RAM. -> bị thiếu do 8051 chỉ có khoảng mấy trăm byte RAM thôi.
        Nếu dữ liệu của bạn là hằng số, bạn nên khai báo nó vào bộ nhớ data (code). từ khóa là gì thì mình quên rồi
        123...

        Comment


        • #5
          anh nbb3i ơi khai báo vào bộ nhớ data là sao hả anh em mới vào nghề nên chưa rõ lắm

          Comment


          • #6
            unsigned char A3[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0x7f,0x3f,0x1 f,0x0f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};

            em thay tất cả các mảng trên bằng cú pháp dưới đây xem sao.

            unsigned char code A3[32]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0 3,0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xff,0x7f,0x3f,0x1 f,0x0f,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00};
            123...

            Comment


            • #7
              có anh nào biết k giúp em với sao k có ai lên tiếng thế này

              Comment


              • #8
                anh ơi em làm như vậy khi chạy chương trình thì nó báo lỗi thế này
                Build target 'Target 1'
                compiling version1.c...
                linking...
                BL51 BANKED LINKER/LOCATER V6.22 - SN: Eval Version
                COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2009
                "version1.obj"
                TO "version1"
                RAMSIZE(256)
                *** ERROR L107: ADDRESS SPACE OVERFLOW
                SPACE: DATA
                SEGMENT: _DATA_GROUP_
                LENGTH: 007FH
                * RESTRICTED VERSION WITH 0800H BYTE CODE SIZE LIMIT; USED: 357CH BYTE (668%) *
                ************************************************** ****************************
                Program Size: data=144.0 xdata=0 code=13953
                LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 1 ERROR(S)
                *** ERROR L107: ADDRESS SPACE OVERFLOW
                SPACE: DATA
                SEGMENT: _DATA_GROUP_
                LENGTH: 007FH
                *** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED
                MODULE: C:\KEIL\C51\LIB\C51S.LIB (-----)
                LIMIT: 0800H BYTES
                Target not created

                Comment


                • #9
                  Cách trên không được à?
                  123...

                  Comment


                  • #10
                    em làm như trên khi chạy thì nó hiện ra cái lỗi đó anh ah

                    Comment


                    • #11
                      anh còn cách nào giúp em với

                      Comment


                      • #12
                        em up cái chương trình đầy đủ của em lên đây anh sửa giúp em nhé Đây

                        Comment


                        • #13
                          Code của em có dung lượng
                          USED: 357CH BYTE (668%)
                          tương đương với khoảng 13K code. trong khi đó 8051 chỉ có 8K bộ nhớ code.
                          Hơn nữa trình dịch em dùng là bản trial nên chỉ giới hạn dịch được các chương trình có dung lượng < 2K.

                          Cách giải quyết
                          - Giảm dung lượng chương trình xuống (bỏ bớt những mảng dữ liệu không cần thiết, tìm cách sử dụng chúng các mảng đó để tiết kiệm bộ nhớ...)
                          - Sử dụng trình dịch bản full.
                          123...

                          Comment


                          • #14
                            em dùng cái Keil version4 anh ah. nhưng hình như nó cra ck rồi mà anh

                            Comment


                            • #15
                              BL51 BANKED LINKER/LOCATER V6.22 - SN: Eval Version
                              đây này

                              giảm code của em đi, để 13K thì full cũng không làm gì được đâu
                              123...

                              Comment

                              Về tác giả

                              Collapse

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

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

                              Collapse

                              Đang tải...
                              X