k01调试lcd代码
authorp15692025051 <846603105@qq.com>
Fri, 28 Jul 2023 07:34:56 +0000 (15:34 +0800)
committerp15692025051 <846603105@qq.com>
Fri, 28 Jul 2023 07:34:56 +0000 (15:34 +0800)
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/lcd.py

index ed10e9a..50f33a1 100644 (file)
@@ -8,28 +8,25 @@ from misc import PWM
 
     
 init_data = (
-
-    # 0, 0, 0x11,
-    # 2, 0, 120, 
-
+       0, 0, 0xfe,
     0, 0, 0xfe,
     0, 0, 0xEF,
-
+    
     0, 1, 0x36,
-    1, 1, 0xc8,
-
-    0, 2, 0xe8,
-    1, 1, 0x11,
-    1, 1, 0x00,
+    1, 1, 0xd8,
 
     0, 1, 0x3A,
     1, 1, 0x05,
 
-    #0, 0, 0x21,
-
     0, 1, 0x35,
     1, 1, 0x00,
 
+    0, 1, 0xA8,
+    1, 1, 0x0c,
+
+    0, 1, 0xB4,
+    1, 1, 0x00,
+
     0, 1, 0xB0,
     0, 0, 0xC0,
 
@@ -37,7 +34,7 @@ init_data = (
     1, 1, 0x2F,
 
     0, 1, 0xB3,
-    1, 1, 0x03,
+    1, 1, 0x13,
 
     0, 1, 0xB6,
     1, 1, 0x19,
@@ -51,84 +48,75 @@ init_data = (
     0, 1, 0xAB,
     1, 1, 0x07,
 
-    0, 1, 0xB4,
-    1, 1, 0x04,
-
-    0, 1, 0xA8,
-    1, 1, 0x0C,
-
-    
-
+ 
     0, 1, 0xb8,
     1, 1, 0x08,
 
     0, 1, 0xE8,
-    1, 1, 0x20,
+    1, 1, 0x27,
 
     0, 1, 0xE9,
-    1, 1, 0x44,
+    1, 1, 0x47,
 
     0, 1, 0xea,
     1, 1, 0x44,
 
     0, 1, 0xeb,
-    1, 1, 0xb0,
-
-    0, 1, 0xED,
-    1, 1, 0x03,
+    1, 1, 0xe0,
+    
+    0, 1, 0x44,
+    1, 1, 0x00,
 
     0, 1, 0xc6,
-    1, 1, 0x3d,
+    1, 1, 0x20,
 
     0, 1, 0xc7,
-    1, 1, 0x10,
+    1, 1, 0x14,
+
+    
 
     0, 14, 0xF0,
-    1, 1, 0x0F,
-    1, 1, 0x20,
-    1, 1, 0x25,            
+    1, 1, 0x1d,
+    1, 1, 0x38,
+    1, 1, 0x09,            
+    1, 1, 0x4d,
+    1, 1, 0x92,
+    1, 1, 0x2f,
     1, 1, 0x35,
-    1, 1, 0x26,
-    1, 1, 0x3f,
-    1, 1, 0x30,
-    1, 1, 0x60,
-    1, 1, 0x26,
-    1, 1, 0x03,
-    1, 1, 0x00,
-    1, 1, 0x09,
-    1, 1, 0x13,
-    1, 1, 0x1a,
+    1, 1, 0x52,
+    1, 1, 0x1e,
+    1, 1, 0x0c,
+    1, 1, 0x40,
+    1, 1, 0x12,
+    1, 1, 0x14,
+    1, 1, 0x1f,
 
     0, 14, 0xF1,
+    1, 1, 0x16,
+    1, 1, 0x40,
+    1, 1, 0x1c,
+    1, 1, 0x54,
+    1, 1, 0xa9,
+    1, 1, 0x2d,
+    1, 1, 0x2e,
+    1, 1, 0x56,
+    1, 1, 0x10,
+    1, 1, 0x0d,
+    1, 1, 0x0c,
+    1, 1, 0x1a,
+    1, 1, 0x14,
+    1, 1, 0x1F,
+   
+    0, 3, 0xF4,
     1, 1, 0x00,
-    1, 1, 0x28,
-    1, 1, 0x7f,
-    1, 1, 0x39,
-    1, 1, 0xa5,
-    1, 1, 0x0f,
-    1, 1, 0x30,
-    1, 1, 0x60,
     1, 1, 0x00,
-    1, 1, 0x05,
-    1, 1, 0x01,
-    1, 1, 0x0f,
-    1, 1, 0x0f,
-    1, 1, 0x1F,
-
+    1, 1, 0xff,            
 
     0, 0, 0x11,
     2, 0, 120,
     0, 0, 0x29,
     0, 0, 0x2c,
 
-    # 0, 0, 0x28,
-    # 2, 0, 120,
-    # 0, 0, 0x10,
-    # 2, 0, 60,
-    # 0, 0, 0x11,
-    # 2, 0, 120,
-    # 0, 0, 0x29,
-
 )
 
 XSTART_H = 0xf0+36
@@ -194,7 +182,7 @@ btn_device.start()
 
 print("lcd_init2 ...")
 lcd_ctrl = Pin(Pin.GPIO18, Pin.OUT, Pin.PULL_DISABLE, 1)
-lcd.lcd_init(init_buf, 128, 128, 52000, 1, 4, 0, invalid, displayon, displayoff, None,TESel = True,TEPin = 17)
+lcd.lcd_init(init_buf, 128, 128, 26000, 1, 4, 0, invalid, displayon, displayoff, None,TESel = True,TEPin = 17)
 # gpio_backlight = Pin(Pin.GPIO37, Pin.OUT, Pin.PULL_DISABLE, 0)
 # gpio_backlight.write(1)
 PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_10US, 0, 1)