This is a documentation of the initialization sequence found in the official example code.
Values: 0x00
Bits:
7
:MY
- Page Address Order- 0: Top to Bottom (selected)
- 1: Bottom to Top
6
:MX
- Column Address Order- 0: Left to Right (selected)
- 1: Right to Left
5
:MV
- Page/Column Order- 0: Normal (selected)
- 1: Reverse Mode
4
:ML
- Line Address Order- 0: LCD Refresh Top to Bottom (selected)
- 1: LCD Refresh Bottom to Top
3
:RGB
- BRGB/BGR Order- 0: RGB
- 1: BGR
2
:MH
- Display Data Latch Order- 0: LCD Refresh Left to Right
- 1: LCD Refresh Right to Left
Values: 0x05
Bits:
6:4
: RGB interface color format101
: 65K of RGB interface110
: 262K of RGB interface0
: Undocumented value which is used here?
2:0
: Control interface color format011
: 12bit/pixel101
: 16bit/pixel (selected)110
: 18bit/pixel111
: 16M truncated
The "RGB interface color format" isn't set here; the datasheet suggests using
0x55
for our purposes... Need to check what is going on here.
Values: 0x0C 0x0C 0x00 0x33 0x33
Probably empirically gained values for the porch settings, let's keep them. "Separate porch control" is disabled.
Values: 0x35
Bits:
6:4
: VGH Setting (Voltage)- 0: 12.2 V
- 1: 12.54 V
- 2: 12.89 V
- 3: 13.26 V
- 4: 13.65 V
- 5: 14.06 V
- 6: 14.5 V
- 7: 14.97 V
2:0
: VGL Setting (Voltage)- 0: -7.16 V
- 1: -7.67 V
- 2: -8.23 V
- 3: -8.87 V
- 4: -9.6 V
- 5: -10.43 V
- 6: -11.38 V
- 7: -12.5 V
Values: 0x19
0x19
-> 0.725 V
Values: 0x2C
Bits:
6
: XMY: XOR MY setting in command 36h5
: XBGR: XOR RGB setting in command 36h (selected)4
: XREV: XOR inverse setting in command 21h3
: XMH: this bit can reverse source output order and only support for RGB interface without RAM mode (selected)2
: XMV: XOR MV setting in command 36h (selected)1
: XMX: XOR MX setting in command 36h0
: XGS: XOR GS setting in command E4h
Values: 0x01
0
: VDV and VRH register value comes from NVM.1
: VDV and VRH register value comes from command write (selected).
Values: 0x12
0x12
-> VAP: 4.45+( vcom+vcom offset+vdv)
0x12
-> VAN: -4.45+( vcom+vcom offset-vdv)
Values: 0x20
0x20
-> VDV: 0 V
Values: 0x0F
Bits:
4:0
: RTNA0x0F
-> 60 Hz
7:5
: NLA - Inversion selection in normal mode0x0
: dot inversion (selected).0x7
: column inversion.
Values: 0xA4 0xA1
0xA4
is a fixed parameter?
Second Parameter Bits:
7:6
: AVDD,2
-> 6.8 V5:4
: AVCL,2
-> -4.8 V1:0
: VDS,1
-> 2.3 V
Values: 0xD0 0x04 0x0D 0x11 0x13 0x2B 0x3F 0x54 0x4C 0x18 0x0D 0x0B 0x1F 0x23
Gamma Curve, probably calibrated for this device...
Values: 0xD0 0x04 0x0C 0x11 0x13 0x2C 0x3F 0x44 0x51 0x2F 0x1F 0x1F 0x20 0x23
Gamma Curve, probably calibrated for this device...
Self-explaining...
Self-explaining...
Interestingly, other drivers have added a delay after sending SLPOUT
but here
this is not the case. Maybe the timing allows for this here?
Self-explaining...