/* G160BLGFGSP6WTC3XAM Graphic Display Driver File Created on August 26, 2020, 11:18 AM @Company Focus LCDs LCDs Made Simple www.focuslcds.com @File Name G160BLGFGSP6WTC3XAM-init.txt @Summary This is the driver source file for the Graphic Display Display: 160x100 Graphic LCD Controller Chip: ST7528 Interface: I2C MCU/MPU: Generic @Version Version 1.0.0 (Semantic Versioning 2.0.0) @Description This source file provides initialization for the 160x100 Graphic display. */ /*******************************************************************************/ /******************************************************************************* (c) 2023 Focus LCDs and its subsidiaries. You may use this software and any derivatives exclusively with Focus LCDs products. THIS SOFTWARE IS SUPPLIED BY FOCUS LCDS "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE, OR ITS INTERACTION WITH FOCUS LCDS PRODUCTS, COMBINATION WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. IN NO EVENT WILL FOCUS LCDS BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF FOCUS LCDS HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, FOCUS LCDS' TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO FOCUSLCDS FOR THIS SOFTWARE. FOCUS LCDS PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE TERMS. *******************************************************************************/ void initial(void) { delay(300); ST7528_REST=0; delay(500); ST7528_REST=1; delay(300); vopcode=0x20; //0x20_11.5v start(); wcom(0X7E); /*wcom slave address*/ wcom(0x00); /*wcom slave chip sign bit*/ /*set the RS=0(command) C0=1(command)*/ wcom(0x48); // Set partial display duty ration wcom(0x64); // 1/100 duty wcom(0xa0); // ADC select wcom(0xc8); // SHL select wcom(0x44); // set initial com0 register wcom(0x00); // scan from com0 wcom(0xab); // OSC on wcom(0x26); // x=0~7 wcom(0x81); // set electronic volume register wcom(vopcode); // n=0~3f wcom(0x56); // n=0~7 Set 1/11 bias wcom(0x64); // 3x delay(30); // 200m S wcom(0x2c); wcom(0x66); // 5x£¨n=4~7£© delay(10); // 200 mS wcom(0x2e); delay(30); wcom(0x2f); // power control wcom(0xf3); // bias save circuit wcom(0x00); wcom(0x96); // frc and pwm wcom(0x38); // external mode wcom(0xA5); // //16-gray set start wcom(0x97); // 3frc,45pwm wcom(0x80); wcom(0x00); wcom(0x81); wcom(0x00); wcom(0x82); wcom(0x00); wcom(0x83); wcom(0x00); wcom(0x84); wcom(0x06); wcom(0x85); wcom(0x06); wcom(0x86); wcom(0x06); wcom(0x87); wcom(0x06); wcom(0x88); wcom(0x0b); wcom(0x89); wcom(0x0b); wcom(0x8a); wcom(0x0b); wcom(0x8b); wcom(0x0b); wcom(0x8c); wcom(0x10); wcom(0x8d); wcom(0x10); wcom(0x8e); wcom(0x10); wcom(0x8f); wcom(0x10); wcom(0x90); wcom(0x15); wcom(0x91); wcom(0x15); wcom(0x92); wcom(0x15); wcom(0x93); wcom(0x15); wcom(0x94); wcom(0x1a); wcom(0x95); wcom(0x1a); wcom(0x96); wcom(0x1a); wcom(0x97); wcom(0x1a); wcom(0x98); wcom(0x1e); wcom(0x99); wcom(0x1e); wcom(0x9a); wcom(0x1e); wcom(0x9b); wcom(0x1e); wcom(0x9c); wcom(0x23); wcom(0x9d); wcom(0x23); wcom(0x9e); wcom(0x23); wcom(0x9f); wcom(0x23); wcom(0xa0); wcom(0x27); wcom(0xa1); wcom(0x27); wcom(0xa2); wcom(0x27); wcom(0xa3); wcom(0x27); wcom(0xa4); wcom(0x2b); wcom(0xa5); wcom(0x2b); wcom(0xa6); wcom(0x2b); wcom(0xa7); wcom(0x2b); wcom(0xa8); wcom(0x2f); wcom(0xa9); wcom(0x2f); wcom(0xaa); wcom(0x2f); wcom(0xab); wcom(0x2f); wcom(0xac); wcom(0x32); wcom(0xad); wcom(0x32); wcom(0xae); wcom(0x32); wcom(0xaf); wcom(0x32); wcom(0xb0); wcom(0x35); wcom(0xb1); wcom(0x35); wcom(0xb2); wcom(0x35); wcom(0xb3); wcom(0x35); wcom(0xb4); wcom(0x38); wcom(0xb5); wcom(0x38); wcom(0xb6); wcom(0x38); wcom(0xb7); wcom(0x38); wcom(0xb8); wcom(0x3a); wcom(0xb9); wcom(0x3a); wcom(0xba); wcom(0x3a); wcom(0xbb); wcom(0x3a); wcom(0xbc); wcom(0x3c); wcom(0xbd); wcom(0x3c); wcom(0xbe); wcom(0x3c); wcom(0xbf); wcom(0x3c); //16-gray set over wcom(0x38); wcom(0x74); // wcom(0xaf); // display on stop(); }