Research and driving method record of Xinli Truly M128128

Keywords: stm32

1. Start

It started like this. This is a screen removed from the automatic deposit cabinet. It has been placed for two or three years. I want to use it.

It uses a rare 22 pin foot

Then it's amazing that this thing now costs hundreds of dollars. These thousands are false bid prices. The actual price should be between 200-300, or no one knows how much.

But we can still find out the previous prices. For example, this piece of Truly M128128 only costs more than ten yuan

This screen is not very easy to drive. The biggest problem is that the information is extremely difficult to find. I tried to search Truly or 128128, which are different results.

2. About Truly

3. Reference manual

truly-msp-g128128dyly-2w   This is one of the g128128, and the m128128 was not found

Online address   truly-msp-g128128dyly-2w - daokebaba

4. Reference procedure

avr_truly_M240128driver  

Online address

  avr_TRULY_M240128driver - source code download | embedded / MCU programming | MCU (51,AVR,MSP430, etc.) | source code - source code China

TRULYM240128-1A1 display program - Baidu Library

5. Data analysis

At a glance, this g128128 is actually the data of 1998  , Therefore, the relevant content is very difficult to find

Pin correspondence, but note that this is g128128. I have a look. LEDA and LEDK correspond to 21 and 22 respectively

Schematic diagram of the whole

To drive this screen, you need to provide 5V voltage, so it is best to use 5V MCU to control. Of course, if you provide voltage to MCU alone, you can also use 3.3V to control the logic part. In addition, there is a backlight drive, which needs to provide a large current of up to 380mA. The voltage of the backlight should be controlled at no more than 4.6V, typically 4.2V.

This means that the backlight must be driven with a resistance of at least 10 ohms (100 ohms should be added during debugging)

But at the same time, I found a piece of data of m128128. It can be seen that the LCD panels used are different. The sizes of the modules are different, but they are basically the same

This is M128128

By comparison, it can be found that Toshiba chip is replaced by some kind of chip encapsulated in epoxy resin

M320240 was also found

Is this installed in such a place, with the processor or ARM

6. Breakthrough, the only procedure

Then fortunately, I searched more and finally found a netizen in the digital home who can light up this screen. You can know that the screen uses KS0108, the original post address http://bbs.mydigit.cn/read.php?tid=2507002

The most important thing is to give out the pin diagram

Corresponding to the actual, it is very easy to cause misunderstanding after adding A number line. After I confirm through K and A, I confirm that this pin may be right.

 

The code copied from netizens has two files, one is ziku.h and the other is main.c. they use C51

ziku.h
 

unsigned char  code ye[]=
{
0x10,0x61,0x86,0x60,0x84,0xE4,0x1C,0x84,0x45,0x3E,0xA4,0x24,0xE6,0x04,0x00,0x00,
0x02,0x3E,0x01,0x00,0x00,0x3F,0x21,0x20,0x11,0x0A,0x04,0x0B,0x10,0x20,0x00,0x00,
};

unsigned char code jin[]=
{
0x00,0x80,0x80,0x80,0xBE,0xAA,0x2A,0x2A,0xAA,0xAA,0xBF,0x82,0x80,0x00,0x00,0x00,
0x00,0x3F,0x14,0x14,0x14,0x3F,0x00,0x00,0x3F,0x14,0x14,0x14,0x3F,0x00,0x00,0x00,
};


unsigned char code xian[]=
{
0x00,0x00,0x00,0x7E,0x2A,0xAA,0x2A,0x2A,0xAA,0x2A,0x2A,0x7F,0x02,0x00,0x00,0x00,
0x20,0x21,0x22,0x2C,0x20,0x3F,0x20,0x20,0x3F,0x28,0x24,0x22,0x31,0x20,0x00,0x00,
};

unsigned char code shi[]=
{
0x00,0x20,0x22,0x22,0xA2,0x22,0x22,0xE2,0x22,0xA2,0x22,0x23,0x32,0x20,0x00,0x00,
0x00,0x08,0x04,0x02,0x01,0x10,0x20,0x1F,0x00,0x00,0x01,0x02,0x0C,0x00,0x00,0x00,
};


unsigned char code she[]=
{
0x20,0x20,0x21,0xE6,0x40,0x20,0x5E,0xC2,0x42,0x42,0x4F,0xD2,0x10,0x10,0x00,0x00,
0x00,0x00,0x00,0x0F,0x24,0x22,0x10,0x11,0x0A,0x04,0x0A,0x11,0x30,0x10,0x00,0x00,
};


unsigned char code ji[]=
{
0x20,0x21,0x22,0xE6,0x00,0x20,0x20,0x20,0x20,0xFF,0x20,0x20,0x30,0x20,0x00,0x00,
0x00,0x00,0x00,0x1F,0x08,0x04,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,
};


unsigned char code shang[]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x20,0x20,0x20,0x20,0x30,0x20,0x00,0x00,0x00,
0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0x10,0x10,0x10,0x10,0x10,0x18,0x10,0x00,0x00,
};


unsigned char code shan[]=
{
0x40,0x44,0x54,0x54,0xD5,0x56,0x54,0xFC,0x56,0xD5,0x54,0x56,0x44,0x40,0x00,0x00,
0x00,0x01,0x01,0x3D,0x25,0x25,0x25,0x25,0x25,0x25,0x3D,0x01,0x01,0x00,0x00,0x00,
};


unsigned char code ruo[]=
{
0x44,0x44,0x44,0x44,0x44,0xCF,0x74,0x44,0x44,0x4F,0x44,0x44,0x66,0x44,0x00,0x00,
0x08,0x08,0x04,0x02,0x3F,0x11,0x11,0x11,0x11,0x11,0x3F,0x00,0x00,0x00,0x00,0x00,
};


unsigned char code shui[]=
{
0x00,0x10,0x10,0x10,0xF0,0x00,0x00,0xFF,0xC0,0x20,0x10,0x08,0x00,0x00,0x00,0x00,
0x10,0x08,0x04,0x03,0x00,0x10,0x20,0x1F,0x00,0x01,0x02,0x04,0x08,0x08,0x00,0x00,
};


unsigned char code zhong[]=
{
//0x00,0xF8,0x08,0x08,0x08,0x08,0xFF,0x08,0x08,0x08,0x08,0xFC,0x08,0x00,0x00,0x00,
//0x00,0x01,0x01,0x01,0x01,0x01,0x3F,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,
// wo
0x20,0x24,0x24,0x24,0xFE,0x23,0x22,0x20,0x20,0xFF,0x20,0x22,0x2C,0xA0,0x20,0x00,
0x00,0x08,0x48,0x84,0x7F,0x02,0x41,0x40,0x20,0x13,0x0C,0x14,0x22,0x41,0xF8,0x00,
};

unsigned char code nan[]=
{
0x04,0x04,0xF4,0x14,0x14,0x54,0x94,0x1F,0x94,0x54,0x14,0x14,0xF6,0x04,0x00,0x00,
0x00,0x00,0x3F,0x00,0x05,0x05,0x05,0x1F,0x05,0x05,0x15,0x20,0x1F,0x00,0x00,0x00,
};

unsigned char code da[]=
{
0x10,0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x10,0x10,0x18,0x10,0x00,0x00,
0x20,0x20,0x10,0x08,0x04,0x03,0x00,0x01,0x02,0x04,0x08,0x10,0x30,0x10,0x00,0x00,
};


unsigned char code xue[]=
{
0x20,0x18,0x08,0x29,0x2E,0x28,0x29,0xAE,0xA8,0x6C,0x2B,0x08,0x28,0x18,0x00,0x00,
0x02,0x02,0x02,0x02,0x02,0x12,0x22,0x1F,0x02,0x02,0x02,0x02,0x03,0x02,0x00,0x00,
};

main.c   7 + 8 = 15 lines need to be connected


 


//      ÉÏÉÆÈôË® 2010 3 9        //
//       ÖÐÄÏ´óѧ               //
//   ÐÅÏ¢¿ÆѧÓ빤³ÌѧԺ         //

#include "reg51.h"
#include <string.h>
#include"ziku.h"
#define uchar unsigned char
#define  LCD_DB P0

sbit cs1=P3^2;
sbit cs2=P3^3;
sbit cs3=P3^4;
sbit cs4=P3^5;
sbit rs=P2^6;
sbit rw=P2^5;
sbit e=P2^7;

void wrcomleft(uchar);
void wrcomright(uchar);
void wrcomleftdown(uchar);
void wrcomrightdown(uchar);
void wrdataleft(uchar);
void wrdataright(uchar);
void wrdataleftdown(uchar);
void wrdatarightdown(uchar);
void busycheck();
void disp(uchar,uchar,uchar);
void cursor(uchar, uchar);
delay1ms(int t);
void clc_screen();

main()
{
        uchar *p;
        P1 &= 0xf0;    
        clc_screen();
        while(1)
        {
            p=&ye;
            disp(0xbe,0x40,p);
            p=&ye;
            disp(0xbe,0x50,p);
            p=&ye;
            disp(0xbe,0x60,p);
            p=&ye;
            disp(0xbe,0x70,p);
            
            p=&ye;
            disp(0xbe,0x80,p);
            p=&ye;
            disp(0xbe,0xa8,p);
            p=&ye;
            disp(0xbe,0xd0,p);
        }
}

void disp(uchar page, uchar col, uchar *p)
{
        int i;
        if(col<0x80)
        {
            wrcomleft(0x3f);
            wrcomleft(page);
            wrcomleft(col);
            for(i=0;i<16;i++)
            {
                wrdataleft(p);
            }
            wrcomleft(page+1);
            wrcomleft(col);
            for(i=16;i<32;i++)
            {
                wrdataleft(p);
            }
        }
        if(col>0x7f && col<0xA8)
        {
            col=col-64;
            wrcomright(0x3f);
            wrcomright(page);
            wrcomright(col);
            for(i=0;i<16;i++)
            {
                wrdataright(p);
            }
            wrcomright(page+1);
            wrcomright(col);
            for(i=16;i<32;i++)
            {
                wrdataright(p);
            }
        }
        if(col>0xA7 && col<0xD0)
        {
            col=col-104;
            wrcomleftdown(0x3f);
            wrcomleftdown(page);
            wrcomleftdown(col);
            for(i=0;i<16;i++)
            {
                wrdataleftdown(p);
            }
            wrcomleftdown(page+1);
            wrcomleftdown(col);
            for(i=16;i<32;i++)
            {
                wrdataleftdown(p);
            }
        }
        if(col>0xCf && col<0xF8)
        {
            col=col-144;
            wrcomrightdown(0x3f);
            wrcomrightdown(page);
            wrcomrightdown(col);
            for(i=0;i<16;i++)
            {
                wrdatarightdown(p);
            }
            wrcomrightdown(page+1);
            wrcomrightdown(col);
            for(i=16;i<32;i++)
            {
                wrdatarightdown(p);
            }
        }
}


void clc_screen()// ÇåÆÁº¯Êý
{
        int i,j;
        wrcomleft(0x3f);
        wrcomright(0x3f);
        wrcomleftdown(0x3f);
        wrcomrightdown(0x3f);
        for(i=0;i<8;i++)
        {
            wrcomleft(0xb8+i);
            wrcomright(0xb8+i);
            wrcomleft(0x40);
            wrcomright(0x40);
            wrcomleftdown(0xb8+i);
            wrcomrightdown(0xb8+i);
            wrcomleftdown(0x40);
            wrcomrightdown(0x40);
            for(j=0;j<0x40;j++)
            {
                wrdataleft(0);
                wrdataright(0);
                wrdataleftdown(0);
                wrdatarightdown(0);
            }
        }
}





void wrcomleft(uchar h)//×óƬдָÁî³ÌÐò
{
        cs1=0;
        cs2=1;
        cs3=0;
        cs4=0;
        rw=0;            //дÓÐЧ
        rs=0;            //дָÁî״̬
        LCD_DB=h;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;  //e ϽµÑØдÈëÊý¾Ý
}


void wrcomright(uchar l)// ÓÒƬдָÁî³ÌÐò
{
        cs1=1;
        cs2=0;
        cs3=0;
        cs4=0;
        e=1;
        rw=0;//дÓÐЧ
        rs=0;//дָÁî״̬
        LCD_DB=l;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;  //e ϽµÑØдÈëÊý¾Ý

}

void wrcomleftdown(uchar h)//×óƬдָÁî³ÌÐò
{
        cs1=0;
        cs2=0;
        cs3=0;
        cs4=1;
        rw=0;            //дÓÐЧ
        rs=0;            //дָÁî״̬
        LCD_DB=h;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;  //e ϽµÑØдÈëÊý¾Ý
}


void wrcomrightdown(uchar l)// ÓÒƬдָÁî³ÌÐò
{
        cs1=0;
        cs2=0;
        cs3=1;
        cs4=0;
        e=1;
        rw=0;//дÓÐЧ
        rs=0;//дָÁî״̬
        LCD_DB=l;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;  //e ϽµÑØдÈëÊý¾Ý

}

void wrdataleft(uchar k)// ×óƬдÊý¾Ý³ÌÐò
{
        cs1=0;
        cs2=1;
        cs3=0;
        cs4=0;
        rw=0;      //дÓÐЧ
        rs=1;      //дÊý¾Ý״̬
        LCD_DB=k;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;       //e ϽµÑØдÈëÊý¾Ý
}

void wrdataright(uchar j)// ÓÒƬдÊý¾Ý³ÌÐò
{
        cs1=1;
        cs2=0;
        cs3=0;
        cs4=0;
        e=1;
        rw=0;      //дÓÐЧ
        rs=1;      //дÊý¾Ý״̬

        LCD_DB=j;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;       //e ϽµÑØдÈëÊý¾Ý
}

void wrdataleftdown(uchar k)// ×óƬдÊý¾Ý³ÌÐò
{
        cs1=0;
        cs2=0;
        cs3=0;
        cs4=1;
        rw=0;      //дÓÐЧ
        rs=1;      //дÊý¾Ý״̬
        LCD_DB=k;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;       //e ϽµÑØдÈëÊý¾Ý
}

void wrdatarightdown(uchar j)// ÓÒƬдÊý¾Ý³ÌÐò
{
        cs1=0;
        cs2=0;
        cs3=1;
        cs4=0;
        e=1;
        rw=0;      //дÓÐЧ
        rs=1;      //дÊý¾Ý״̬

        LCD_DB=j;
        delay1ms(0);
        e=1;
        delay1ms(0);
        e=0;       //e ϽµÑØдÈëÊý¾Ý
}

delay1ms(int t)
{
        int i,j;
        for(i=0;i<t;i++)
        for(j=0;j<120;j++)
        ;
}

7. Modification and transplantation of driver

I want to migrate it to the Arduino IDE to reduce development time.

VO does not need to be connected, and then A and K should not be connected during the test.

I modified the code based on the above one, but it can not drive normally. Because of wiring or other reasons, the voltage of VCC and GND is not enough. Anyway, as a reference


 

#include <Arduino.h>

#define RS 2

#define EN 3

#define RW 4

#define I0 5

#define I2 6

#define I1 7

#define I3 8

#define I4 9

#define I6 10

#define I5 11

#define I7 12

#define CS1 13

#define CS3 A0

#define CS2 A1

#define CS4 A2

#define uchar unsigned char

void wrcomleft(uchar);

void wrcomright(uchar);

void wrcomleftdown(uchar);

void wrcomrightdown(uchar);

void wrdataleft(uchar);

void wrdataright(uchar);

void wrdataleftdown(uchar);

void wrdatarightdown(uchar);

void busycheck();

void disp(uchar,uchar,uchar);

void cursor(uchar, uchar);

void delay1ms(int t);

void clc_screen();

void maintest();

void lg(String s)

{

  Serial.println(s);

}

void LCD_DB(uchar u)

{

 

  digitalWrite(I0,u&0x01);

  digitalWrite(I1,u>>1&0x01);

  digitalWrite(I2,u>>2&0x01);

  digitalWrite(I3,u>>3&0x01);

  digitalWrite(I4,u>>4&0x01);

  digitalWrite(I5,u>>5&0x01);

  digitalWrite(I6,u>>6&0x01);

  digitalWrite(I7,u>>7&0x01);

  Serial.println("Run Lcd_db");

}


void pinInit()

{

  for(int i=2;i<=13;i++)

  {

    pinMode(i,OUTPUT);

    digitalWrite(i,HIGH);

  }

  for(int i=A0;i<=A4;i++)

  {

    pinMode(i,OUTPUT);

    digitalWrite(i,HIGH);

  }

 

  Serial.println("Pininit");

}

void logicInit()

{

  for(int i=13;i<=A4;i++)

  {

    digitalWrite(i,HIGH);

  }

 

  Serial.println("Set pin high");

}




void disp(uchar page, uchar col, uchar *p)

{

        int i;

        lg("Run disp");

        if(col<0x80)

        {

            wrcomleft(0x3f);

            wrcomleft(page);

            wrcomleft(col);

            for(i=0;i<16;i++)

            {

                wrdataleft(p);

            }

            wrcomleft(page+1);

            wrcomleft(col);

            for(i=16;i<32;i++)

            {

                wrdataleft(p);

            }

        }

        if(col>0x7f && col<0xA8)

        {

            col=col-64;

            wrcomright(0x3f);

            wrcomright(page);

            wrcomright(col);

            for(i=0;i<16;i++)

            {

                wrdataright(p);

            }

            wrcomright(page+1);

            wrcomright(col);

            for(i=16;i<32;i++)

            {

                wrdataright(p);

            }

        }

        if(col>0xA7 && col<0xD0)

        {

            col=col-104;

            wrcomleftdown(0x3f);

            wrcomleftdown(page);

            wrcomleftdown(col);

            for(i=0;i<16;i++)

            {

                wrdataleftdown(p);

            }

            wrcomleftdown(page+1);

            wrcomleftdown(col);

            for(i=16;i<32;i++)

            {

                wrdataleftdown(p);

            }

        }

        if(col>0xCf && col<0xF8)

        {

            col=col-144;

            wrcomrightdown(0x3f);

            wrcomrightdown(page);

            wrcomrightdown(col);

            for(i=0;i<16;i++)

            {

                wrdatarightdown(p);

            }

            wrcomrightdown(page+1);

            wrcomrightdown(col);

            for(i=16;i<32;i++)

            {

                wrdatarightdown(p);

            }

        }

        lg("Disp over");

}


void clc_screen()// ÇåÆÁº¯Êý

{

        int i,j;

        wrcomleft(0x3f);

        wrcomright(0x3f);

        wrcomleftdown(0x3f);

        wrcomrightdown(0x3f);

        for(i=0;i<8;i++)

        {

            wrcomleft(0xb8+i);

            wrcomright(0xb8+i);

            wrcomleft(0x40);

            wrcomright(0x40);

            wrcomleftdown(0xb8+i);

            wrcomrightdown(0xb8+i);

            wrcomleftdown(0x40);

            wrcomrightdown(0x40);

            for(j=0;j<0x40;j++)

            {

                wrdataleft(0);

                wrdataright(0);

                wrdataleftdown(0);

                wrdatarightdown(0);

            }

        }

}





void wrcomleft(uchar h)//×óƬдָÁî³ÌÐò

{

        digitalWrite(CS1,LOW);

        digitalWrite(CS2,HIGH);

        digitalWrite(CS3,LOW);

        digitalWrite(CS4,LOW);

        digitalWrite(RW,LOW);            //дÓÐЧ

        digitalWrite(RS,LOW);            //дָÁî״̬

        LCD_DB(h);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);  //e ϽµÑØдÈëÊý¾Ý

}



void wrcomright(uchar l)// ÓÒƬдָÁî³ÌÐò

{

        digitalWrite(CS1,HIGH);

        digitalWrite(CS2,LOW);

        digitalWrite(CS3,LOW);

        digitalWrite(CS4,LOW);

        digitalWrite(EN,HIGH);

        digitalWrite(RW,LOW);//дÓÐЧ

        digitalWrite(RS,LOW);//дָÁî״̬

        LCD_DB(l);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);  //e ϽµÑØдÈëÊý¾Ý


}


void wrcomleftdown(uchar h)//×óƬдָÁî³ÌÐò

{

        digitalWrite(CS1,LOW);

        digitalWrite(CS2,LOW);

        digitalWrite(CS3,LOW);

        digitalWrite(CS4,HIGH);

        digitalWrite(RW,LOW);            //дÓÐЧ

        digitalWrite(RS,LOW);            //дָÁî״̬

        LCD_DB(h);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);  //e ϽµÑØдÈëÊý¾Ý

}



void wrcomrightdown(uchar l)// ÓÒƬдָÁî³ÌÐò

{

        digitalWrite(CS1,LOW);

        digitalWrite(CS2,LOW);

        digitalWrite(CS3,HIGH);

        digitalWrite(CS4,LOW);

        digitalWrite(EN,HIGH);

        digitalWrite(RW,LOW);//дÓÐЧ

        digitalWrite(RS,LOW);//дָÁî״̬

        LCD_DB(l);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);  //e ϽµÑØдÈëÊý¾Ý


}


void wrdataleft(uchar k)// ×óƬдÊý¾Ý³ÌÐò

{

        digitalWrite(CS1,LOW);

        digitalWrite(CS2,HIGH);

        digitalWrite(CS3,LOW);

        digitalWrite(CS4,LOW);

        digitalWrite(RW,LOW);      //дÓÐЧ

        digitalWrite(RS,HIGH);      //дÊý¾Ý״̬

        LCD_DB(k);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);       //e ϽµÑØдÈëÊý¾Ý

}


void wrdataright(uchar j)// ÓÒƬдÊý¾Ý³ÌÐò

{

        digitalWrite(CS1,HIGH);

        digitalWrite(CS2,LOW);

        digitalWrite(CS3,LOW);

        digitalWrite(CS4,LOW);

        digitalWrite(EN,HIGH);

        digitalWrite(RW,LOW);      //дÓÐЧ

        digitalWrite(RS,HIGH);      //дÊý¾Ý״̬


        LCD_DB(j);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);       //e ϽµÑØдÈëÊý¾Ý

}


void wrdataleftdown(uchar k)// ×óƬдÊý¾Ý³ÌÐò

{

        digitalWrite(CS1,LOW);

        digitalWrite(CS2,LOW);

        digitalWrite(CS3,LOW);

        digitalWrite(CS4,HIGH);

        digitalWrite(RW,LOW);      //дÓÐЧ

        digitalWrite(RS,HIGH);      //дÊý¾Ý״̬

        LCD_DB(k);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);       //e ϽµÑØдÈëÊý¾Ý

}


void wrdatarightdown(uchar j)// ÓÒƬдÊý¾Ý³ÌÐò

{

        digitalWrite(CS1,LOW);

        digitalWrite(CS2,LOW);

        digitalWrite(CS3,HIGH);

        digitalWrite(CS4,LOW);

        digitalWrite(EN,HIGH);

        digitalWrite(RW,LOW);      //дÓÐЧ

        digitalWrite(RS,HIGH);      //дÊý¾Ý״̬


        LCD_DB(j);

        delay1ms(0);

        digitalWrite(EN,HIGH);

        delay1ms(0);

        digitalWrite(EN,LOW);       //e ϽµÑØдÈëÊý¾Ý

}


void delay1ms(int t)

{

        int i,j;

        delay(t);

}


void setup()

{

  // put your setup code here, to run once:

  Serial.begin(115200);

  pinInit();

  Serial.println("Pin Init Over");

  delay(1000);

}




void loop()

{

  maintest();

 

  // put your main code here, to run repeatedly:


}

unsigned char  ye[]=

{

0x10,0x61,0x86,0x60,0x84,0xE4,0x1C,0x84,0x45,0x3E,0xA4,0x24,0xE6,0x04,0x00,0x00,

0x02,0x3E,0x01,0x00,0x00,0x3F,0x21,0x20,0x11,0x0A,0x04,0x0B,0x10,0x20,0x00,0x00,

};


void maintest()

{

        uchar *p;

       

        clc_screen();

       

        while(1)

        {

            logicInit();

            p=ye;

            disp(0xbe,0x40,p);

            p=ye;

            disp(0xbe,0x50,p);

            p=ye;

            disp(0xbe,0x60,p);

            p=ye;

            disp(0xbe,0x70,p);

           

            p=ye;

            disp(0xbe,0x80,p);

            p=ye;

            disp(0xbe,0xa8,p);

            p=ye;

            disp(0xbe,0xd0,p);

            delay(100);

        }

}

 

Posted by ragefu on Thu, 07 Oct 2021 15:11:50 -0700