#=== Power Off power.off all #=== Power-On Sequence mipi.host.reset delay 100 #=== output mode #mipi.mode dual LR mipi.mode 2ch mipi.lane.enable delay 100 #=== Setdata rate #(burst)(nonburst)(nonburst-pulse) #mipi.dsi 4 1000 nonburst eot mipi.dsi 1 300 nonburst #MDL delay 100 #=== Set Timing Parameter #mipi.autotiming.enable #delay 100 # 1. LP Timing(T_LPX, TA_GO, TA_GET, TA_SURE) : Unit is 8UI, T_LPX #mipi.timing.lp 6 4 5 2 # 8*UI (LP_Timing(T_LPX, TA_GO, TA_GET, TA_SURE) : Unit is 8*UI, T_LPX) # 2. HS Data Timing(Pre, Zero, Trail, Exit) : Unit is 8UI #mipi.timing.data 8 25 5 2 # 8*UI (HS_Data_Timing(Pre, Zero, Trail, CLK_PRE) : Unit is 8*UI # 3. HS clk Timing(Pre, Zero, Trail, Exit) : Unit is 8UI #mipi.timing.clk 4 16 8 2 # 8*UI (HS_clk_Timing(Pre, Zero, Trail, CLK_POST) : Unit is 8*UI) #=== Set LCM Information:Resolution Frame Rate Porch #(V) (H) (frame rate) (VBP) (VFP) (HBP) (HFP) (Vsync) (Hsync) #mipi.video 2160 1080 60 53 4 26 130 10 2 mipi.video 400 400 60 4 2 20 20 2 2 #===== Power setting VIO VDD VCC #power.on 5v 12v #delay 100 power.level 1.8 2.8 power.on vio vdd delay 100 #power.vspn.level 5.5 -5.5 #power.on vsp vsn #delay 100 #=== Set Link Level gpio.Level 1.8 gpio.output.enable #===== Setting GPIO gpio.write 0x00 gpio.dir 0x7F #===== Init. GPIO : GPIO4(RESX):high->low->high gpio.write 0xFF delay 100 gpio.write 0x00 delay 100 gpio.write 0xFF delay 100 #=== HS Clock Enable mipi.clock.enable #mipi.nonconti.disable #mipi.nonconti.enable #========================================================== #=== initial code start #========================================================== delay 120 mipi.write 0x29 0xF0 0xC3 mipi.write 0x29 0xF0 0x96 mipi.write 0x29 0xF0 0xA5 mipi.write 0x29 0xC1 0x00 0x08 0xAE 0x13 #VOP=4.6V,VGH=12.54V,VGL=-11.6V,AVDD=6.66V,AVEE=-4.3V mipi.write 0x29 0xC2 0x00 0x08 0xA5 0x13 mipi.write 0x29 0xC3 0x44 0x04 0x44 0x04 # mipi.write 0x29 0xC4 0x44 0x04 0x44 0x04 # mipi.write 0x29 0xC5 0x51 #VCOM=1.05V mipi.write 0x29 0xD6 0x00 mipi.write 0x29 0xD7 0x00 mipi.write 0x29 0xE0 0xD2 0x07 0x0C 0x0A 0x09 0x26 0x34 0x44 0x4B 0x19 0x14 0x14 0x2D 0x33 #Gamma 2.2 P 2023 1 11 mipi.write 0x29 0xE1 0xD2 0x07 0x0C 0x09 0x08 0x25 0x33 0x44 0x4A 0x19 0x14 0x13 0x2D 0x33 #Gamma 2.2 N 2023 1 11 mipi.write 0x29 0xE5 0xBD 0xF5 0xC1 0x33 0x22 0x25 0x10 0x55 0x55 0x55 0x55 0x55 0x55 0x55 #GVDD=6.6V,GVEE=-4.3V,SVDD=6.6V,SVEE=-4.3V mipi.write 0x29 0xE6 0xBD 0xF5 0xC1 0x33 0x22 0x25 0x10 0x55 0x55 0x55 0x55 0x55 0x55 0x55 mipi.write 0x29 0xEC 0x00 0x55 0x00 0x00 0x00 0x08 mipi.write 0x29 0x36 0x0C mipi.write 0x29 0x3A 0x07 mipi.write 0x29 0xB2 0x09 mipi.write 0x29 0xB3 0x01 mipi.write 0x29 0xB4 0x01 mipi.write 0x29 0xB5 0x00 0x08 0x00 0x08 mipi.write 0x29 0xB6 0xC7 0x31 #400RGB x 400 mipi.write 0x29 0xA4 0xC0 0x63 #Enable First Line OP 2022 4 19 mipi.write 0x29 0xA5 0x00 0x00 0x00 0x00 0x00 0x15 0x2A 0xBA 0x02 mipi.write 0x29 0xA6 0x00 0x00 0x00 0x00 0x00 0x15 0x2A 0xBA 0x02 mipi.write 0x29 0xBA 0x1A 0x0A 0x45 0x00 0x23 0x01 0x00 mipi.write 0x29 0xBB 0x00 0x24 0x00 0x2F 0x83 0x07 0x18 0x00 mipi.write 0x29 0xBC 0x00 0x24 0x00 0x2F 0x83 0x07 0x18 0x00 mipi.write 0x29 0xBD 0x22 0x11 0xFF 0xFF 0x55 0x44 0x77 0x66 0xFF 0xFF 0x0F mipi.write 0x39 0xED 0xC3 mipi.write 0x39 0xE4 0x40 0x0F 0x2F mipi.write 0x29 0x35 0x00 mipi.write 0x05 0x21 mipi.write 0x05 0x11 delay 120 mipi.write 0x05 0x29 delay 120 #===== Enter Video Mode mipi.write 0x29 0x35 0x00 mipi.video.enable delay 100 #===== Image write image.fill 255 0 0 delay 100 #=== confirm Voltage power.current vio delay 100 power.current vdd delay 100