mikroSDK Reference Manual
ili9341_cmd.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2023 MikroElektronika d.o.o.
4 ** Contact: https://www.mikroe.com/contact
5 **
6 ** This file is part of the mikroSDK package
7 **
8 ** Commercial License Usage
9 **
10 ** Licensees holding valid commercial NECTO compilers AI licenses may use this
11 ** file in accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The MikroElektronika Company.
14 ** For licensing terms and conditions see
15 ** https://www.mikroe.com/legal/software-license-agreement.
16 ** For further information use the contact form at
17 ** https://www.mikroe.com/contact.
18 **
19 **
20 ** GNU Lesser General Public License Usage
21 **
22 ** Alternatively, this file may be used for
23 ** non-commercial projects under the terms of the GNU Lesser
24 ** General Public License version 3 as published by the Free Software
25 ** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
26 **
27 ** The above copyright notice and this permission notice shall be
28 ** included in all copies or substantial portions of the Software.
29 **
30 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31 ** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
32 ** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
34 ** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
35 ** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36 ** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 **
38 ****************************************************************************/
60 #ifndef _ILI9341_CMD_H_
61 #define _ILI9341_CMD_H_
62 
66 #define ILI9341_CMD_NO_OPERATION 0x00
67 
72 #define ILI9341_CMD_SOFTWARE_RESET 0x01
73 
81 #define ILI9341_CMD_READ_DISPLAY_INDETIFICATION_IINFORMATION 0x04
82 
86 #define ILI9341_CMD_READ_DISPLAY_STATUS 0x09
87 #define ILI9341_CMD_READ_DISPLAY_POWER_MODE 0x0A
88 #define ILI9341_CMD_READ_DISPLAY_MADCTL 0x0B
89 #define ILI9341_CMD_READ_DISPLAY_PIXEL_FORMAT 0x0C
90 #define ILI9341_CMD_READ_DISPLAY_IMAGE_FORMAT 0x0D
91 #define ILI9341_CMD_READ_DISPLAY_SIGNAL_MODE 0x0E
92 #define ILI9341_CMD_READ_DISPLAY_SELF_DIAGNOSTIC_RESULT 0x0F
93 
99 #define ILI9341_CMD_ENTER_SLEEP_MODE 0x10
100 
105 #define ILI9341_CMD_SLEEP_OUT 0x11
106 
111 #define ILI9341_CMD_PARTIAL_MODE_ON 0x12
112 
118 #define ILI9341_CMD_NORMAL_DISPLAY_MODE_ON 0x13
119 
125 #define ILI9341_CMD_DISPLAY_INVERSION_MODE_OFF 0x20
126 
133 #define ILI9341_CMD_DISPLAY_INVERSION_MODE_ON 0x21
134 
144 #define ILI9341_CMD_GAMMA_SET 0x26
145 #define ILI9341_PARAM_1_GAMMA_CURVE_BITS 0x01
146 
154 #define ILI9341_CMD_DISPLAY_OFF 0x28
155 
161 #define ILI9341_CMD_DISPLAY_ON 0x29
162 
168 #define ILI9341_CMD_COLUMN_ADDRESS_SET 0x2A
169 
174 #define ILI9341_CMD_PAGE_ADDRESS_SET 0x2B
175 
183 #define ILI9341_CMD_MEMORY_WRITE 0x2C
184 
191 #define ILI9341_CMD_COLOR_SET 0x2D
192 
197 #define ILI9341_CMD_MEMORY_READ 0x2E
198 
204 #define ILI9341_CMD_PARTIAL_AREA 0x30
205 
217 #define ILI9341_CMD_VERTICAL_SCROLLING_DEFINITION 0x33
218 
222 #define ILI9341_CMD_TEARING_EFFECT_LINE_OFF 0x34
223 
229 #define ILI9341_CMD_TEARING_EFFECT_LINE_ON 0x35
230 
241 #define ILI9341_CMD_MEMORY_ACCESS_CONTROL 0x36
242 #define ILI9341_PARAM_1_NO_ROTATION 0x28
243 #define ILI9341_PARAM_1_ROTATE_180 0xE8
244 #define ILI9341_PARAM_1_ROTATE_90 0x48
245 #define ILI9341_PARAM_1_ROTATE_270 0x88
246 
252 #define ILI9341_CMD_VERTICAL_SCROLLING_START_ADDRESS 0x37
253 
258 #define ILI9341_CMD_IDLE_MODE_OFF 0x38
259 
265 #define ILI9341_CMD_IDLE_MODE_ON 0x39
266 
278 #define ILI9341_CMD_PIXEL_FORMAT_SET 0x3A
279 #define ILI9341_PARAM_1_18_BITS_INTERFACE_PIXEL_FORMAT 0x66
280 
285 #define ILI9341_CMD_WRITE_MEMORY_CONTINUE 0x3C
286 
291 #define ILI9341_CMD_READ_MEMORY_CONTINUE 0x3E
292 
298 #define ILI9341_CMD_SET_TEAR_SCANLINE 0x44
299 
306 #define ILI9341_CMD_GET_SCANLINE 0x45
307 
314 #define ILI9341_CMD_WRITE_DISPLAY_BRIGHTNESS 0x51
315 
322 #define ILI9341_CMD_READ_DISPLAY_BRIGHTNESS 0x52
323 
327 #define ILI9341_CMD_WRITE_CTRL_DISPLAY 0x53
328 
332 #define ILI9341_CMD_READ_CTRL_DISPLAY 0x54
333 
338 #define ILI9341_CMD_WRITE_CONTENT_ADAPTIVE_BRIGHTNESS_CONTROL 0x55
339 
344 #define ILI9341_CMD_READ_CONTENT_ADAPTIVE_BRIGHTNESS_CONTROL 0x56
345 
358 #define ILI9341_CMD_WRITE_CABC_MINIMUM_BRIGHTNESS 0x5E
359 
367 #define ILI9341_CMD_READ_CABC_MINIMUM_BRIGHTNESS 0x5F
368 
372 #define ILI9341_CMD_READ_ID_1 0xDA
373 
378 #define ILI9341_CMD_READ_ID_2 0xDB
379 
383 #define ILI9341_CMD_READ_ID_3 0xDC
384 
388 #define ILI9341_CMD_RGB_INTERFACE_SIGNAL_CONTROL 0xB0
389 
397 #define ILI9341_CMD_FRAME_CONTROL_NORMAL_MODE 0xB1
398 #define ILI9341_PARAM_1_INTERNAL_CLOCK_DIVISION_RATIO_BITS 0x00
399 #define ILI9341_PARAM_2_CLOCK_PER_LINE_BITS 0x1B
400 
404 #define ILI9341_CMD_FRAME_CONTROL_IDLE_MODE 0xB2
405 
409 #define ILI9341_CMD_FRAME_CONTROL_PARTIAL_MODE 0xB3
410 
417 #define ILI9341_CMD_DISPLAY_INVERSION_CONTROL 0xB4
418 
425 #define ILI9341_CMD_BLANKING_PORCH_CONTROL 0xB5
426 
447 #define ILI9341_CMD_DISPLAY_FUNCTION_CONTROL 0xB6
448 #define ILI9341_PARAM_1_PTG_PT_BITS 0x0A
449 #define ILI9341_PARAM_2_ISC_SM_SS_GS_REV_BITS 0x82
450 #define ILI9341_PARAM_3_NL_BITS 0x27
451 #define ILI9341_PARAM_4_PCDIV_BITS 0x00
452 
464 #define ILI9341_CMD_ENTRY_MODE_SET 0xB7
465 #define ILI9341_PARAM_1_GAS_DTE_GON_BITS 0x06
466 
472 #define ILI9341_CMD_BACKLIGHT_CONTROL_1 0xB8
473 
482 #define ILI9341_CMD_BACKLIGHT_CONTROL_2 0xB9
483 
489 #define ILI9341_CMD_BACKLIGHT_CONTROL_3 0xBA
490 
496 #define ILI9341_CMD_BACKLIGHT_CONTROL_4 0xBB
497 
504 #define ILI9341_CMD_BACKLIGHT_CONTROL_5 0xBC
505 
510 #define ILI9341_CMD_BACKLIGHT_CONTROL_7 0xBE
511 
517 #define ILI9341_CMD_BACKLIGHT_CONTROL_8 0xBF
518 
522 #define ILI9341_CMD_POWER_CONTROL_1 0xC0
523 #define ILI9341_PARAM_1_GVDD_VOLTAGE_LEVEL_BITS 0x21
524 
529 #define ILI9341_CMD_POWER_CONTROL_2 0xC1
530 #define ILI9341_PARAM_1_OPERATING_VOLTAGE_STEP_UP_FACTOR_BITS 0x10
531 
539 #define ILI9341_CMD_VCOM_CONTROL_1 0xC5
540 #define ILI9341_PARAM_1_VCOMH_VOLTAGE_BITS 0x31
541 #define ILI9341_PARAM_2_VCOML_VOLTAGE_BITS 0x3C
542 
548 #define ILI9341_CMD_VCOM_CONTROL_2 0xC7
549 #define ILI9341_PARAM_1_VCOM_OFFSET_VOLTAGE_BITS 0xC0
550 
557 #define ILI9341_CMD_NV_MEMMORY_WRITE 0xD0
558 
564 #define ILI9341_CMD_NV_MEMORY_PROTECTION_KEY 0xD1
565 
571 #define ILI9341_CMD_NV_MEMORY_STATUS_READ 0xD2
572 
576 #define ILI9341_CMD_READ_ID_4 0xD3
577 
597 #define ILI9341_CMD_POSITIVE_GAMMA_CORRECTION 0xE0
598 #define ILI9341_PARAM_1_POSITIVE_GAMMA_CORRECTION_BITS 0x1F
599 #define ILI9341_PARAM_2_POSITIVE_GAMMA_CORRECTION_BITS 0x1A
600 #define ILI9341_PARAM_3_POSITIVE_GAMMA_CORRECTION_BITS 0x18
601 #define ILI9341_PARAM_4_POSITIVE_GAMMA_CORRECTION_BITS 0x0A
602 #define ILI9341_PARAM_5_POSITIVE_GAMMA_CORRECTION_BITS 0x0F
603 #define ILI9341_PARAM_6_POSITIVE_GAMMA_CORRECTION_BITS 0x06
604 #define ILI9341_PARAM_7_POSITIVE_GAMMA_CORRECTION_BITS 0x45
605 #define ILI9341_PARAM_8_POSITIVE_GAMMA_CORRECTION_BITS 0x87
606 #define ILI9341_PARAM_9_POSITIVE_GAMMA_CORRECTION_BITS 0x32
607 #define ILI9341_PARAM_10_POSITIVE_GAMMA_CORRECTION_BITS 0x0A
608 #define ILI9341_PARAM_11_POSITIVE_GAMMA_CORRECTION_BITS 0x07
609 #define ILI9341_PARAM_12_POSITIVE_GAMMA_CORRECTION_BITS 0x02
610 #define ILI9341_PARAM_13_POSITIVE_GAMMA_CORRECTION_BITS 0x07
611 #define ILI9341_PARAM_14_POSITIVE_GAMMA_CORRECTION_BITS 0x05
612 #define ILI9341_PARAM_15_POSITIVE_GAMMA_CORRECTION_BITS 0x00
613 
632 #define ILI9341_CMD_NEGATIVE_GAMMA_CORRECTION 0xE1
633 #define ILI9341_PARAM_1_NEGATIVE_GAMMA_CORRECTION_BITS 0x00
634 #define ILI9341_PARAM_2_NEGATIVE_GAMMA_CORRECTION_BITS 0x25
635 #define ILI9341_PARAM_3_NEGATIVE_GAMMA_CORRECTION_BITS 0x27
636 #define ILI9341_PARAM_4_NEGATIVE_GAMMA_CORRECTION_BITS 0x05
637 #define ILI9341_PARAM_5_NEGATIVE_GAMMA_CORRECTION_BITS 0x10
638 #define ILI9341_PARAM_6_NEGATIVE_GAMMA_CORRECTION_BITS 0x09
639 #define ILI9341_PARAM_7_NEGATIVE_GAMMA_CORRECTION_BITS 0x3A
640 #define ILI9341_PARAM_8_NEGATIVE_GAMMA_CORRECTION_BITS 0x78
641 #define ILI9341_PARAM_9_NEGATIVE_GAMMA_CORRECTION_BITS 0x4D
642 #define ILI9341_PARAM_10_NEGATIVE_GAMMA_CORRECTION_BITS 0x05
643 #define ILI9341_PARAM_11_NEGATIVE_GAMMA_CORRECTION_BITS 0x18
644 #define ILI9341_PARAM_12_NEGATIVE_GAMMA_CORRECTION_BITS 0x0D
645 #define ILI9341_PARAM_13_NEGATIVE_GAMMA_CORRECTION_BITS 0x38
646 #define ILI9341_PARAM_14_NEGATIVE_GAMMA_CORRECTION_BITS 0x3A
647 #define ILI9341_PARAM_15_NEGATIVE_GAMMA_CORRECTION_BITS 0x1F
648 
652 #define ILI9341_CMD_DIGITAL_GAMMA_CONTROL_1 0xE2
653 
658 #define ILI9341_CMD_DIGITAL_GAMMA_CONTROL_2 0xE3
659 
676 #define ILI9341_CMD_INTERFACE_CONTROL 0xF6
677 
706 #define ILI9341_CMD_POWER_CONTROL_A 0xCB
707 #define ILI9341_PARAM_1_POWER_CONTROL_A_BITS 0x39
708 #define ILI9341_PARAM_2_POWER_CONTROL_A_BITS 0x2C
709 #define ILI9341_PARAM_3_POWER_CONTROL_A_BITS 0x00
710 #define ILI9341_PARAM_4_VCORE_CONTROL_BITS 0x34
711 #define ILI9341_PARAM_5_DDVDH_CONTROL_BITS 0x02
712 
727 #define ILI9341_CMD_POWER_CONTROL_B 0xCF
728 #define ILI9341_PARAM_1_POWER_CONTROL_B_BITS 0x00
729 #define ILI9341_PARAM_2_POWER_CONTROL_B_BITS 0x81
730 #define ILI9341_PARAM_3_POWER_CONTROL_B_BITS 0x30
731 
751 #define ILI9341_CMD_DRIVER_TIMING_CONTROL_A 0xE8
752 #define ILI9341_PARAM_1_GATE_DRIVER_NON_OVERLAP_BITS 0x84
753 #define ILI9341_PARAM_2_EQ_CR_TIMING_CONTROL_BITS 0x11
754 #define ILI9341_PARAM_3_PRE_CHARGE_TIMING_CONTROL_BITS 0x7A
755 
759 #define ILI9341_CMD_EXT_DRIVER_TIMING_CONTROL_A 0xE9
760 
774 #define ILI9341_CMD_DRIVER_TIMING_CONTROL_B 0xEA
775 #define ILI9341_PARAM_1_GATE_DRIVER_TIMING_CONTROL_B_BITS 0x66
776 #define ILI9341_PARAM_2_DRIVER_TIMING_CONTROL_B_BITS 0x00
777 
794 #define ILI9341_CMD_POWER_ON_SEQUENCE_CONTROL 0xED
795 #define ILI9341_PARAM_1_SOFT_START_CONTROL_BITS 0x55
796 #define ILI9341_PARAM_2_DDVDH_VCL_ENABLE_BITS 0x01
797 #define ILI9341_PARAM_3_VGL_VGH_ENABLE_BITS 0x23
798 #define ILI9341_PARAM_4_DDVDH_ENHANCE_MODE_ENABLE_BITS 0x01
799 
806 #define ILI9341_CMD_ENABLE_3G 0xF2
807 #define ILI9341_PARAM_1_GAMA_CONTROL_ENABLE_BITS 0x02
808 
817 #define ILI9341_CMD_PUMP_RATIO_CONTROL 0xF7
818 #define ILI9341_PARAM_1_PUMP_RATIO_CONTROL_BITS 0x10
819  // ILI9341 // ILI9341 // mwgroup
823 
824 #endif // _ILI9341_CMD_H_
825 // ------------------------------------------------------------------------- END