Void ST7305 HSD_Initial_Code(void) { RESET=1; Delayms(10); RESET=0; Delayms(10); RESET=1; Delayms(120); //ÑÓʱ120ms SPI4W_WRITECOM(0xD6); //NVM Load Control SPI4W_WRITEDATA(0X17); SPI4W_WRITEDATA(0X02); SPI4W_WRITECOM(0xD1); //Booster Enable SPI4W_WRITEDATA(0X01); SPI4W_WRITECOM(0xC0); //Gate Voltage Setting SPI4W_WRITEDATA(0X0E); //VGH=15V SPI4W_WRITEDATA(0X05); //VGL=-7.5V SPI4W_WRITECOM(0xC1); //VSHP Setting SPI4W_WRITEDATA(0X41); //VSHP1=5V SPI4W_WRITEDATA(0X41); //VSHP2=5V SPI4W_WRITEDATA(0X41); //VSHP3=5V SPI4W_WRITEDATA(0X41); //VSHP4=5V SPI4W_WRITECOM(0xC2); //VSLP Setting SPI4W_WRITEDATA(0X32); //VSLP1=1V SPI4W_WRITEDATA(0X32); //VSLP2=1V SPI4W_WRITEDATA(0X32); //VSLP3=1V SPI4W_WRITEDATA(0X32); //VSLP4=1V SPI4W_WRITECOM(0xC4); //VSHN Setting SPI4W_WRITEDATA(0X4B); //VSHN1=-4V SPI4W_WRITEDATA(0X4B); //VSHN2=-4V SPI4W_WRITEDATA(0X4B); //VSHN3=-4V SPI4W_WRITEDATA(0X4B); //VSHN4=-4V SPI4W_WRITECOM(0xC5); //VSLN Setting SPI4W_WRITEDATA(0X00); //VSLN1=1V SPI4W_WRITEDATA(0X00); //VSLN2=1V SPI4W_WRITEDATA(0X00); //VSLN3=1V SPI4W_WRITEDATA(0X00); //VSLN4=1V SPI4W_WRITECOM(0xD8); //HPM=32Hz SPI4W_WRITEDATA(0XA6); SPI4W_WRITEDATA(0XE9); SPI4W_WRITECOM(0xB2); //Frame Rate Control SPI4W_WRITEDATA(0X11); //HPM=32hz ; LPM=0.5hz SPI4W_WRITECOM(0xB3); //Update Period Gate EQ Control in HPM SPI4W_WRITEDATA(0XE5); // SPI4W_WRITEDATA(0XF6); // SPI4W_WRITEDATA(0X05); //HPM EQ Control SPI4W_WRITEDATA(0X46); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X76); // SPI4W_WRITEDATA(0X45); // SPI4W_WRITECOM(0xB4); //Update Period Gate EQ Control in LPM SPI4W_WRITEDATA(0X05); //LPM EQ Control SPI4W_WRITEDATA(0X46); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X77); // SPI4W_WRITEDATA(0X76); // SPI4W_WRITEDATA(0X45); // SPI4W_WRITECOM(0xB7); //Source EQ Enable SPI4W_WRITEDATA(0X13); // SPI4W_WRITECOM(0xB0); //Gate Line Setting SPI4W_WRITEDATA(0X3F); //252 line SPI4W_WRITECOM(0x11); //Sleep out Delayms(120); SPI4W_WRITECOM(0xC9); //Source Voltage Select SPI4W_WRITEDATA(0x00); //VSHP1; VSLP1 ; VSHN1 ; VSLN1 SPI4W_WRITECOM(0xC7); //ultra low power code SPI4W_WRITEDATA(0xC1); SPI4W_WRITEDATA(0x41); SPI4W_WRITEDATA(0x26); SPI4W_WRITECOM(0x36); //Memory Data Access Control SPI4W_WRITEDATA(0X00); //MX=0 ; DO=0 SPI4W_WRITECOM(0x3A); //Data Format Select SPI4W_WRITEDATA(0X11); //10:4write for 24bit ; 11: 3write for 24bit SPI4W_WRITECOM(0xB9); //Gamma Mode Setting SPI4W_WRITEDATA(0X20); //20: Mono 00:4GS SPI4W_WRITECOM(0xB8); //Panel Setting SPI4W_WRITEDATA(0X25); //dot inversion; one line interval; dot inversion //SPI4W_WRITECOM(0x21); //Inverse //WRITE RAM 122x250 SPI4W_WRITECOM(0x2A); //Column Address Setting SPI4W_WRITEDATA(0X19); SPI4W_WRITEDATA(0X23); SPI4W_WRITECOM(0x2B); //Row Address Setting SPI4W_WRITEDATA(0X00); SPI4W_WRITEDATA(0X7C); SPI4W_WRITECOM(0x35); //TE SPI4W_WRITEDATA(0X00); // SPI4W_WRITECOM(0xD0); //Auto power down SPI4W_WRITEDATA(0XFF); // SPI4W_WRITECOM(0x39); //0x39 low power 0x38 high power SPI4W_WRITECOM(0x29); //DISPLAY ON } /**************ÏÔʾµØÖ·*******************/ { //WRITE RAM 122x250 SPI4W_WRITECOM(0x2A); //Column Address Setting SPI4W_WRITEDATA(0X19); SPI4W_WRITEDATA(0X23); SPI4W_WRITECOM(0x2B); //Row Address Setting SPI4W_WRITEDATA(0X00); SPI4W_WRITEDATA(0X7C); }