Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说
8237a初始化编程_st7701s驱动程序,希望能够帮助你!!!。
void initi(void) { // VCI=2.8V //************* Reset LCD Driver ****************// res=1; delay(10); res=0; delay(100); res=1; delay(500); write_command(0x11); delay(120); //Delay 120ms //--------------------------------Display and color format setting------------------- write_command(0x36); write_data(0x00); write_command(0x3a); write_data(0x05); //--------------------------------ST7789S Frame rate setting------------------------- write_command(0xb2); write_data(0x0c); write_data(0x0c); write_data(0x00); write_data(0x33); write_data(0x33); write_command(0xb7); write_data(0x35); //---------------------------------ST7789S Power setting----------------------------- write_command(0xbb); write_data(0x35); write_command(0xc0); write_data(0x2c); write_command(0xc2); write_data(0x01); write_command(0xc3); write_data(0x13); write_command(0xc4); write_data(0x20); write_command(0xc6); write_data(0x0f); write_command(0xca); write_data(0x0f); write_command(0xc8); write_data(0x08); write_command(0x55); write_data(0x90); write_command(0xd0); write_data(0xa4); write_data(0xa1); //--------------------------------ST7789S gamma setting------------------------------ write_command(0xe0); write_data(0xd0); write_data(0x00); write_data(0x06); write_data(0x09); write_data(0x0b); write_data(0x2a); write_data(0x3c); write_data(0x55); write_data(0x4b); write_data(0x08); write_data(0x16); write_data(0x14); write_data(0x19); write_data(0x20); write_command(0xe1); write_data(0xd0); write_data(0x00); write_data(0x06); write_data(0x09); write_data(0x0b); write_data(0x29); write_data(0x36); write_data(0x54); write_data(0x4b); write_data(0x0d); write_data(0x16); write_data(0x14); write_data(0x21); write_data(0x20); write_command(0x29); } 参考写命令/参数函数 ////////////////////////////////// void write_command(byte cmd) { cs=0; rs=0; rd=1; if(h_or_lflag==0) { DBH=0x00; DBL=cmd; } else { DBH=cmd; DBL=0x00; } rw=0; rw=1; cs=1; rs=1; } void write_data(byte dat) { cs=0; rs=1; rd=1; if(h_or_lflag==0) { DBH=0x00; DBL=dat; } else { DBH=dat; DBL=0x00; } rw=0; rw=1; cs=1; }
今天的分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。
上一篇
已是最后文章
下一篇
已是最新文章