pub enum Command {
Show 68 variants
SleepMode(Logical),
PartialMode,
NormalDisplayMode,
DisplayInversion(Logical),
DisplayState(Logical),
ColumnAddressSet(u16, u16),
RowAddressSet(u16, u16),
VertialScrollDef(u16, u16),
TearingEffectLine(Logical),
MemoryAccessControl(Logical, Logical, Logical, Logical, Logical, Logical),
VerticalScrollStartAddresss(u16),
IdleMode(Logical),
PixelFormatSet(Dbi, Dpi),
SetTearScanline(u16),
DisplayBrightness(u8),
CtrlDisplay(Logical, Logical, Logical),
RGBInterfaceSignalCtrl(DEPolarity, DOTClk, XSpl, XSpl, RCMMode),
BlankingPorchControl(u8, u8, u8),
DispalyFunctionControl(GSMode, SSMode, u8, u8),
TEControl(TEPolarity, u8),
Interface(DMMode, RMMode, RIMMode),
PowerCriterioControl(VCIRe),
VCoreVoltageControl(VddAd),
Vreg1aVoltageControl(u8),
Vreg1bVoltageControl(u8),
Vreg2aVoltageControl(u8),
FrameRate(DINVMode),
Spi2dataControl(Data2EN, DataFormatMDT),
ChargePumpFrequentControl(u8, u8, u8, u8, u8),
InnerRegisterEnable1,
InnerRegisterEnable2,
SetGamma1(Gamma1),
SetGamma2(Gamma2),
SetGamma3(Gamma3),
SetGamma4(Gamma4),
SetUndocumented0EBh(u8),
SetUndocumented084h(u8),
SetUndocumented085h(u8),
SetUndocumented086h(u8),
SetUndocumented087h(u8),
SetUndocumented088h(u8),
SetUndocumented089h(u8),
SetUndocumented08Ah(u8),
SetUndocumented08Bh(u8),
SetUndocumented08Ch(u8),
SetUndocumented08Dh(u8),
SetUndocumented08Eh(u8),
SetUndocumented08Fh(u8),
SetUndocumented090h,
SetUndocumented062h,
SetUndocumented063h,
SetUndocumented064h,
SetUndocumented066h,
SetUndocumented067h,
SetUndocumented074h,
SetUndocumented098h,
SetUndocumented0BEh,
SetUndocumented0BCh,
SetUndocumented0BDh,
SetUndocumented0E1h,
SetUndocumented0DFh,
SetUndocumented0EDh,
SetUndocumented0AEh,
SetUndocumented0CDh,
SetUndocumented070h,
SetUndocumented0FFh,
MemoryWrite,
MemoryWriteContinue,
}Expand description
GC9A01 Commands
Variants§
SleepMode(Logical)
Set Sleep mode (10h/11h)
This command turns on/off sleep mode.
§Description
This command causes the LCD module to enter the minimum power consumption mode. In this mode e.g. the DC/DC converter is stopped, Internal oscillator is stopped, and panel scanning is stopped
§Restriction
§On Logical On (10h)
It will be necessary to wait 5msec before sending next to command, this is to allow time for the supply voltages and clock circuits to stabilize.
§On Logical Off (11h)
It will be necessary to wait 120msec after sending Sleep Out command (when in Sleep In Mode) before Sleep In command can be sent.
PartialMode
Set Partial mode (12h)
This command turns on Partial mode.
§Description
This command turns on partial mode. The Partial mode window is described by the Partial Area command (30h). To leave Partial mode, the Normal Display Mode On command (13h) should be written.
§Restriction
This command has no effect when Partial mode is active.
NormalDisplayMode
Set Normal Display mode (13h)
This command turns on Normal Display mode.
§Description
Normal display mode on means Partial mode off. Exit from NORON by the Partial mode On command (12h)
§Restriction
This command has no effect when Normal Display mode is active.
DisplayInversion(Logical)
Set Display Inversion (20h/21h)
This command turns on/off Display Inversion
§Description
This command is used to recover from display inversion mode. This command makes no change of the content of frame memory. This command doesn’t change any other status.
§Restriction
This command has no effect when module already is inversion OFF mode.
DisplayState(Logical)
Set Display State (28h/29h)
This command turns on/off Display
§Description
In this mode, the output from Frame Memory is disabled and blank page inserted.
§Restriction
This command has no effect when module is already in display OFF mode.
ColumnAddressSet(u16, u16)
Set Column Address (start, end) (2Ah)
§Parameters
- SC
.0=> Start Column - EC
.1=> End Column
This command is used to defined area of frame memory where MCU can access.
§Description
This command makes no change on the other driver status. The values of SC [15:0] and EC [15:0] are referred when RAMWR command comes. Each value represents one column line in the frame memory.
§Restriction
SC [15:0] always must be equal to or less than EC [15:0].
NOTE: When SC [15:0] or EC [15:0] is greater than 013Fh (When MADCTL’s B5 = 0) or 00EFh (When MADCTL’s B5 = 1), data of out of range will be ignored.
RowAddressSet(u16, u16)
Set Row Address (start, end) (2Bh)
§Parameters
- SP
.0=> Start Page/Row - EP
.1=> End Page/Row
This command is used to define area of frame memory where MCU can access.
§Description
This command makes no change on the other driver status. The values of SP [15:0] and EP [15:0] are referred when RAMWR command comes. Each value represents one Page line in the Frame Memory
§Restriction
SP [15:0] always must be equal to or less than EP [15:0]
NOTE:When SP [15:0] or EP [15:0] is greater than 00EFh (When MADCTL’s B5 = 0) or 013Fh (When MADCTL’s B5 = 1), data of out of range will be ignored.
VertialScrollDef(u16, u16)
Vertical Scrolling Definition (33h)
§Parameters
- TFA
.0=> Top Fixed Area - VSA
.1=> Vertical Scrolling Area
This command is used to define area of frame memory where MCU can access.
§Description
This command defines the Vertical Scrolling Area of the display.
§When MADCTL B4=0
The 1st & 2nd parameter TFA [15…0] describes the Top Fixed Area (in No. of lines from Top of the Frame Memory and Display). The 3rd & 4th parameter VSA [15…0] describes the height of the Vertical Scrolling Area (in No. of lines of the Frame Memory [not the display] from the Vertical Scrolling Start Address). The first line read from Frame Memory appears immediately after the bottom most line of the Top Fixed Area.
§When MADCTL B4=1
The 1st & 2nd parameter TFA [15…0] describes the Top Fixed Area (in No. of lines from Bottom of the Frame Memory and Display). The 3rd & 4th parameter VSA [15…0] describes the height of the Vertical Scrolling Area (in No. of lines of the Frame Memory [not the display] from the Vertical Scrolling Start Address). The first line read from Frame Memory appears immediately after the top most line of the Top Fixed Area
TearingEffectLine(Logical)
Tearing Effect Line OFF (35h) Tearing Effect Line OFF (34h)
This command turns on tearing effect line with a parameters.
§Parameters
- M
.0=> Mode (Logical)
§Description
This command is used to turn ON the Tearing Effect output signal from the TE signal line. This output is not affected by changing MADCTL bit B4. The Tearing Effect Line On has one parameter which describes the mode of the Tearing Effect Output Line.
This command is used to turn OFF (Active Low) the Tearing Effect output signal from the TE signal line.
§Restriction
This command has no effect when Tearing Effect output is already ON
MemoryAccessControl(Logical, Logical, Logical, Logical, Logical, Logical)
Memory Access Control (36h)
This command defines read/write scanning direction of frame memory. This command makes no change on the other driver status
§Parameters
- MY Row Address Order
- MX Column Address Order These 3 bits control MCU to memory write/read direction.
- MV Row / Column Exchange
- ML Vertical Refresh Order LCD vertical refresh direction control.
- BGR RGB-BGR Order
- Color selector switch control (0=RGB color filter panel, 1=BGR color filter panel)
- MH Horizontal Refresh ORDER LCD horizontal refreshing direction control.
§Description
Note: When BGR bit is changed, the new setting is active immediately without update the content in Frame Memory again.
§Restriction
This command has no effect when Tearing Effect output is already ON
VerticalScrollStartAddresss(u16)
Vertical Scrolling Start Address (37h)
§Parameters
- VSP
.0=> Vertical Start Page
§Description
This command is used together with Vertical Scrolling Definition (33h). These two commands describe the scrolling area and the scrolling mode.
The Vertical Scrolling Start Address command has one parameter which describes the address of the line in the Frame Memory that will be written as the first line after the last line of the Top Fixed Area (TFA) on the display.
§Restriction
This command has no effect when Tearing Effect output is already ON.
IdleMode(Logical)
Set Idle Mode (38h/39h)
This command turns on/off Idle Mode
§Parameters
- State
.0=> On/Off
§Description
In the idle off mode, LCD can display maximum 262,144 colors.
§Restriction
This command has no effect when module is already in idle same mode.
PixelFormatSet(Dbi, Dpi)
Pixel Format Set (3Ah) COLMOD
§Parameters
- DBI
.0=> MCU Interface Format - DPI
.1=> RGB Interface Format
§Description
This command sets the pixel format for the RGB image data used by the interface. DPI [2:0] is the pixel format select of RGB interface and DBI [2:0] is the pixel format of MCU interface. If a particular interface, either RGB interface or MCU interface, is not used then the corresponding bits in the parameter are ignored. The pixel format is shown in the table below.
§Restriction
This command has no effect when module is already in idle off mode.
SetTearScanline(u16)
Set Tear Scanline (44h)
§Parameters
- STS => Set Tear Scanline 0-239
§Description
This command turns on the display Tearing Effect output signal on the TE signal line when the display reaches line equal the value of STS[8:0].
NOTE: that set_tear_scanline with STS is equivalent to set_tear_on with 8+GateN(N=1、2、3…240)
DisplayBrightness(u8)
Write Display Brightness (51h)
This command is used to adjust the brightness value of the display
§Parameters
- DBV
.0=>
§Description
It should be checked what is the relationship between this written value and output brightness of the display. This relationship between this written value and output brightness of the display. This relationship is defined on the display module specification. In principle relationship is that 00h value means the lowest brightness and FFh value means the highest brightness.
§Math
- DBV[7:0]/255 x period (affected by OSC frequency)
For example: LEDPWM period = 3ms, and DBV[7:0] = ‘200DEC’. Then LEDPWM duty = 200 / 255=78.1%. Correspond to the LEDPWM period = 3 ms, the high-level of LEDPWM (high effective) = 2.344ms, and the low-level of LEDPWM = 0.656ms.
CtrlDisplay(Logical, Logical, Logical)
Write CTRL Display (53h)
§Parameters
- BCTRL
.0=> Brightness Control Block On/Off - DD
.1=> Display Dimming On/Off - BL
.2=> Backlight On/Off
§Restriction
The display module is sending 2nd parameter value on the data line if the MCU wants to read more than one parameters (=more than 2 RDX Cyle) on DBI Only 2nd parameter is sent on DSI (The 1st parameter is not sent).
RGBInterfaceSignalCtrl(DEPolarity, DOTClk, XSpl, XSpl, RCMMode)
RGB Interface Signal Control (B0h)
§Parameters
- EPL
.0=> DE polarity (“0”= High enable for RGB interface, “1”= Low enable for RGB interface) - DP
.1=> DOTCLK polarity set (“0”= data fetched at the rising time, “1”= data fetched at the falling time) - HSP
.2=> HSYNC polarity (“0”= Low level sync clock, “1”= High level sync clock) - VSP
.3=> VSYNC polarity (“0”= Low level sync clock, “1”= High level sync clock) - RCM
.4=> RGB interface selection (refer to the RGB interface section).
BlankingPorchControl(u8, u8, u8)
Blanking Porch Control (B5h)
§Parameters
- VFP
.0=> The line number of Vertical Front Porch - VBP
.1=> The line number of Vertical Back Porch - HBP
.2=> The line number of Horizontal Back Porch
§Description
NOTE: The Third parameter must write,but it is not valid
DispalyFunctionControl(GSMode, SSMode, u8, u8)
Display Function Control (B6h)
§Parameters
- GS
.0=> Sets the direction of scan by the gate driver in the range determined by SCN [4:0] - SS
.1=> Select the shift direction of outputs from the source driver. - SM
.2=> Sets the gate driver pin arrangement in combination with the GS bit to select the optimal scan mode for the module - NL
.3=> Sets the number of lines to drive the LCD at an interval of 8 lines.
§Restriction
EXTC should be high to enable this command
TEControl(TEPolarity, u8)
TE Control (BAh)
§Parameters
- te_pol
.0=>TEPolarityis used to adjust the Tearing Effect output signal pulse polarity - te_width
.1=> TODO
§Restriction
NOTE: During Sleep In Mode with Tearing Effect Line On, Tearing Effect Output pin will be active Low This command has no effect when Tearing Effect output is already ON
Interface(DMMode, RMMode, RIMMode)
Interface Control (F6h)
§Parameters
- DM
.0=> TODO - RM
.1=> TODO - RIM
.2=> TODO
§Restriction
EXTC should be high to enable this command
PowerCriterioControl(VCIRe)
VCoreVoltageControl(VddAd)
Vreg1aVoltageControl(u8)
Vreg 1a Voltage Control (C3h)
§Parameters
- vreg1_vbp_d
.0=> TODO
§Description
Set the voltage level value to output the VREG1A and VREG1B OUT level, which is a reference level for the grayscale voltage level.(Table is valid when vrh=0x28) VREG1A=(vrh+vbp_d)0.02+4 VREG1B=vbp_d0.02+0.3
Vreg1bVoltageControl(u8)
Vreg 1b Voltage Control (C4h)
§Parameters
- vreg1_vbn_d
.0=> TODO
§Description
Set the voltage level value to output the VREG2A OUT level, which is a reference level for the grayscale voltage level(Table is valid when vrh=0x28) VREG2A=(vbn_d-vrh)0.02-3.4 VREG2B=vbn_d0.02+0.3
Vreg2aVoltageControl(u8)
Vreg 2a Voltage Control (C9h)
§Parameters
- vrh
.0=> TODO
§Description
Set the voltage level value to output the VREG1A OUT level, which is a reference level for the grayscale voltage level. (Table is valid when vbp_d=0x3C and vbn_d=0x3C) VREG1A=(vrh+vbp_d)*0.02+4 VREG2A=(vbn_d-vrh)*0.02-3.4
FrameRate(DINVMode)
Frame Rate (E8h)
§Parameters
- DINV
.0=>DINVMode - (unused) RTN1
.1=> TODO - (undocumented) RTN2
.2=> TODO (Misleading information)
Spi2dataControl(Data2EN, DataFormatMDT)
SPI 2data Control (E9h)
§Parameters
- 2data_en
.0=>Data2EN - 2data_mdt
.1=>DataFormatMDT
§Restriction
Inter command should be set high to enable this command
ChargePumpFrequentControl(u8, u8, u8, u8, u8)
Charge Pump Frequent Control (ECh)
§Parameters
- avdd_clk_ad
.0=> TODO / Undocumented - avee_clk_ad
.1=> TODO / Undocumented - vcl_clk_ad
.2=> TODO / Undocumented - vgh_clk_ad
.3=> TODO / Undocumented - vgl_clk_ad
.4=> TODO / Undocumented
InnerRegisterEnable1
Inner Register Enable 1 (FEh)
§Description
This command is used for Inter_command controlling. To set Inter_command high ,you should write Inter register enable 1 (FEh) and Inter register enable 2 (EFh) continuously. Once Inter_command is set high, only hardware or software reset can turn it to low.
InnerRegisterEnable2
Inner Register Enable 2 (EFh)
§Description
This command is used for Inter_command controlling. To set Inter_command high ,you should write Inter register enable 1 (FEh) and Inter register enable 2 (EFh) continuously. Once Inter_command is set high, only hardware or software reset can turn it to low.
SetGamma1(Gamma1)
Set GAMMA 1 (F0h)
§Parameters
- Gamma1
.0
§Restriction
Inter_command should be set high to enable this command
SetGamma2(Gamma2)
Set GAMMA 2 (F1h)
§Parameters
- Gamma2
.0
§Restriction
Inter_command should be set high to enable this command
SetGamma3(Gamma3)
Set GAMMA 3 (F2h)
§Parameters
- Gamma3
.0
§Restriction
Inter_command should be set high to enable this command
SetGamma4(Gamma4)
Set GAMMA 4 (F3h)
§Parameters
- Gamma4
.0
§Restriction
Inter_command should be set high to enable this command
SetUndocumented0EBh(u8)
Set Undocumented EBh (EBh)
SetUndocumented084h(u8)
Set Undocumented 084h (084h)
SetUndocumented085h(u8)
Set Undocumented 085h (085h)
SetUndocumented086h(u8)
Set Undocumented 086h (086h)
SetUndocumented087h(u8)
Set Undocumented 087h (087h)
SetUndocumented088h(u8)
Set Undocumented 088h (088h)
SetUndocumented089h(u8)
Set Undocumented 089h (089h)
SetUndocumented08Ah(u8)
Set Undocumented 08Ah (08Ah)
SetUndocumented08Bh(u8)
Set Undocumented 08Bh (08Bh)
SetUndocumented08Ch(u8)
Set Undocumented 08Ch (08Ch)
SetUndocumented08Dh(u8)
Set Undocumented 08Dh (08Dh)
SetUndocumented08Eh(u8)
Set Undocumented 08Eh (08Eh)
SetUndocumented08Fh(u8)
Set Undocumented 08Fh (08Fh)
SetUndocumented090h
Set Undocumented 090h (090h)
SetUndocumented062h
Set Undocumented 062h (0x62h)
SetUndocumented063h
Set Undocumented 063h (0x63h)
SetUndocumented064h
Set Undocumented 064h (0x64h)
SetUndocumented066h
Set Undocumented 066h (0x66h)
SetUndocumented067h
Set Undocumented 067h (0x67h)
SetUndocumented074h
Set Undocumented 074h (0x74h)
SetUndocumented098h
Set Undocumented 098h (0x98h)
SetUndocumented0BEh
Set SUndocumented 0BEh (0xBEh)
SetUndocumented0BCh
Set SUndocumented 0BCh (0xBCh)
SetUndocumented0BDh
Set SUndocumented 0BDh (0xBDh)
SetUndocumented0E1h
Set SUndocumented 0E1h (0xE1h)
SetUndocumented0DFh
Set SUndocumented 0DFh (0xDFh)
SetUndocumented0EDh
Set SUndocumented 0EDh (0xEDh)
SetUndocumented0AEh
Set SUndocumented 0AEh (0xAEh)
SetUndocumented0CDh
Set SUndocumented 0CDh (0xCDh)
SetUndocumented070h
Set SUndocumented 070h (0x70h)
SetUndocumented0FFh
Set SUndocumented 0FFh (0xFFh)
MemoryWrite
Memory Write (F2Ch)
§Description
change to the other driver status. When this command is accepted, the column register and the page register are reset to the Start Column/Start Page positions. The Start Column/Start Page positions are different in accordance with MADCTL setting.) Then D [17:0] isstored in frame memory and the column register and the page register incremented. Sending any other command can stop frame Write. X = Don’t care
§Restriction
In all color modes, there is no restriction on length of parameters.
MemoryWriteContinue
Write Memory Contiue (3Ch)
§Description
This command transfers image data from the host processor to the display module’s frame memory continuing from the pixel location following the previous write_memory_continue or write_memory_start command.
§If set_address_mode B5 = 0:
Data is written continuing from the pixel location after the write range of the previous write_memory_start or write_memory_continue. The column register is then incremented and pixels are written to the frame memory until the column register equals the End Column (EC) value. The column register is then reset to SC and the page register is incremented. Pixels are written to the frame memory until the page register equals the End Page (EP) value and the column register equals the EC value, or the host processor sends another command. If the number of pixels exceeds (EC –SC + 1) * (EP – SP + 1) the extra pixels are ignored.
§If set_address_mode B5 = 1:
Data is written continuing from the pixel location after the write range of the previous write_memory_start or write_memory_continue. The page register is then incremented and pixels are written to the frame memory until the page register equals the End Page (EP) value. The page register is then reset to SP and the column register is incremented. Pixels are written to the frame memory until the column register equals the End column (EC) value and the page register equals the EP value, or the host processor sends another command. If the number of pixels exceeds (EC – SC + 1) * (EP –SP + 1) the extra pixels are ignored. Sending any other command can stop frame Write. Frame Memory Access and Interface setting (B3h), WEMODE=0 When the transfer number of data exceeds (EC-SC+1)*(EP-SP+1), the exceeding data will be ignored. Frame Memory Access and Interface setting (B3h), WEMODE=1
When the transfer number of data exceeds (EC-SC+1)*(EP-SP+1), the column and page number will be reset, and the exceeding data will be written into the following column and page
§Restriction
A write_memory_start should follow a set_column_address, set_page_address or set_address_mode to define the write address. Otherwise, data written with write_memory_continue is written to undefined addresses