TFT with ILI9163C and MCU control

Recently I have bought a TFT, in this case whitout touch panel. This screen doesn't have SPI comunication, it needs MCU 8 bits comunication. The controller is a ILI9163C model and I don't find a lot of information about this. I have seen that this controller is equivalent to ST7735 model but I just find SPI libraries for this. I have used MCUfriend library for other TFT with MCU 8 bits but I have checked that is not valid for this controller. Do you know other MCU library that support this controller model?




It is a mystery why anyone would buy a 128x160 display with parallel interface.
Especially when 128x160 SPI modules are cheap and available.

Yes, I could support it in MCUFRIEND_kbv if you are prepared to do the testing.
This means that I want to see your 3.3V test platform.

ILI9163C is similar to ST7735 and several other 132x162 MIPI controllers.

David.

I have tested the LCD_ID_readreg example in MCU library for check if it support the controller and this is the result:

Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 00 00           ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 54 80 66               Manufacturer ID
reg(0x0009) 00 00 61 00 00         Status Register
reg(0x000A) 00 08           Get Power Mode
reg(0x000C) 00 06           Get Pixel Format
reg(0x0061) 00 00           RDID1 HX8347-G
reg(0x0062) 00 00           RDID2 HX8347-G
reg(0x0063) 00 00           RDID3 HX8347-G
reg(0x0064) 00 00           RDID1 HX8347-A
reg(0x0065) 00 00           RDID2 HX8347-A
reg(0x0066) 00 00           RDID3 HX8347-A
reg(0x0067) 00 00           RDID Himax HX8347-A
reg(0x0070) 00 00           Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00         RD_DDB SSD1963
reg(0x00B0) 00 00           RGB Interface Signal Control
reg(0x00B4) 00 02           Inversion Control
reg(0x00B6) 00 06 02 02 02         Display Control
reg(0x00B7) 00 00           Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00C0) 00 0A 00 00 00 00 00 00 00               Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00       GAMMA
reg(0x00CC) 00 04           Panel Control
reg(0x00D0) 00 00 00     Power Control
reg(0x00D2) 00 00 00 00 00        NVM Read
reg(0x00D3) 00 91 63 00              ILI9341, ILI9488
reg(0x00D4) 00 00 00 00              Novatek ID
reg(0x00DA) 00 54           RDID1
reg(0x00DB) 00 00           RDID2
reg(0x00DC) 00 66           RDID3
reg(0x00E0) 00 06 07 1E 2C 09 0D 79 49 4F 1E 2B 31 3C 2F 02     GAMMA-P
reg(0x00E1) 00 0F 05 28 2C 32 16 4E DA 51 11 29 23 0F 0E 36     GAMMA-N
reg(0x00EF) 00 00 00 00 00 00   ILI9327
reg(0x00F2) 00 00 00 00 00 00 00 00 00 00 00 00             Adjust Control 2
reg(0x00F6) 00 00 00 00               Interface Control

The example that we have used is next:

It doesn't work...

Connections are next:

Yes, you have an ILI9163.
Which Arduino are you using? Zero, Due, STM32-Nucleo, Teensy3.x, ...

I use Chinese Uno clones with switchable 3.3V GPIO. (Or Zero, Due, ...)

David.

I have used UNO, MEGA and PRO-MINI clones.

Disconnect your 3.3V display from the Uno, Mega.
Upload any program to your 5V Uno, Mega.
Disconnect Uno. Connect 3.3V display. Power the Uno with 3.3V not USB.
.
Or run the Pro Mini at 3.3V with an external 3.3V Serial dongle.
.
Or buy thirteen level converter chips.
.
It is much easier and cheaper to buy a 3.3V Zero, Due clone. Or a switchable Uno clone like me.
.
Please say which 3.3V strategy you have chosen. Or post a photo.
The display may already be damaged by 5V.

David.

I have tried it again with other new screen (the same model) with Arduino Pro Mini board (3.3V). I have tested the same but it doesn't works.

mont3.jpg

mont3.jpg

That looks fine. You just have to press Reset button at the right time to upload via the Pro Mini bootloader.

I have created a Branch on GitHub for you called "test_9163"

If you have cloned the library, you just need to change Branch.
If you are just using Arduino, you need to leave IDE. delete existing library. start IDE.
select correct Branch in GitHub and Download as ZIP.
Install from ZIP

The example programs should detect the ID for a ST7735 or an ILI9163
The LCD_ID_readreg program should work too.

Please tell me about colours, mirroring, etc.
Please tell me if you get a White Screen.

David.

You have the GitHub link in #0.
Select a Branch in left hand box. Select Download as ZIP in green box on the right hand side of the screen.

Ask if you have a problem.

David.

Yes I found it. I have used this library (I left the link below) and it doesn't work. The screen is white continuously :confused:

https://github.com/prenticedavid/MCUFRIEND_kbv/tree/test_9163/examples

This is the result in LCD_ID_readreg:

Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 54 80 66 Manufacturer ID
reg(0x0009) 00 00 61 00 00 Status Register
reg(0x000A) 00 08 Get Power Mode
reg(0x000C) 00 06 Get Pixel Format
reg(0x0061) 00 00 RDID1 HX8347-G
reg(0x0062) 00 00 RDID2 HX8347-G
reg(0x0063) 00 00 RDID3 HX8347-G
reg(0x0064) 00 00 RDID1 HX8347-A
reg(0x0065) 00 00 RDID2 HX8347-A
reg(0x0066) 00 00 RDID3 HX8347-A
reg(0x0067) 00 00 RDID Himax HX8347-A
reg(0x0070) 00 00 Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00 RD_DDB SSD1963
reg(0x00B0) 00 00 RGB Interface Signal Control
reg(0x00B4) 00 02 Inversion Control
reg(0x00B6) 00 06 02 02 02 Display Control
reg(0x00B7) 00 00 Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B
reg(0x00C0) 00 0A 00 00 00 00 00 00 00 Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 09 Panel Control
reg(0x00D0) 00 00 00 Power Control
reg(0x00D2) 00 00 00 00 00 NVM Read
reg(0x00D3) 00 91 63 00 ILI9341, ILI9488
reg(0x00D4) 00 00 00 00 Novatek ID
reg(0x00DA) 00 54 RDID1
reg(0x00DB) 00 80 RDID2
reg(0x00DC) 00 66 RDID3
reg(0x00E0) 00 2F 3C 3D 2A 0F 1C 5E 02 7E 07 37 2C 2D 23 21 GAMMA-P
reg(0x00E1) 00 1D 23 1A 2D 36 05 0B DD 05 02 29 0D 17 29 14 GAMMA-N
reg(0x00EF) 00 00 00 00 00 00 ILI9327
reg(0x00F2) 00 00 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control

Run graphictest_kbv. What does it say on SerialTerminal?
Run diagnose_TFT_controller. What does it say?

The good news is that you have learned how to connect a 3.3V display to a 3.3V Pro Mini and upload / run sketches like a regular Arduino.

I hope that you have not got any duplicate libraries. That is why I advised deleting old directories in #7.

David.

With diagnose_TFT_support, this is the result, it is not a compatible model:

Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x0

MCUFRIEND_kbv version: 2.9.9


This ID is not supported
look up ID in extras/mcufriend_how_to.txt
you may need to edit MCUFRIEND_kbv.cpp
to enable support for this ID
e.g. #define SUPPORT_8347D

New controllers appear on Ebay often
If your ID is not supported
run LCD_ID_readreg.ino from examples/
Copy-Paste the output from the Serial Terminal
to a message in Displays topic on Arduino Forum
or to Issues on GitHub

Note that OPEN-SMART boards have diff pinout
Edit the pin defines in LCD_ID_readreg to match
Edit mcufiend_shield.h for USE_SPECIAL
Edit mcufiend_special.h for USE_OPENSMART_SHIELD_PINOUT

It should find the ID.

Please check your build report. I would like to see where library versions are found and used.

These are my libraries:

And the report:

In file included from C:\Users\esola\Documents\Arduino\libraries\MCUFRIEND_kbv-test_9163\MCUFRIEND_kbv.cpp:35:0,

                 from C:\Users\esola\Documents\Arduino\libraries\MCUFRIEND_kbv-test_9163\OPENSMART_kbv.cpp:16:

C:\Users\esola\Documents\Arduino\libraries\MCUFRIEND_kbv-test_9163\utility/mcufriend_shield.h:18:2: warning: #warning WE ARE USING A SPECIAL CUSTOM DRIVER [-Wcpp]

#warning WE ARE USING A SPECIAL CUSTOM DRIVER

  ^

El Sketch usa 17608 bytes (57%) del espacio de almacenamiento de programa. El máximo es 30720 bytes.
Las variables Globales usan 416 bytes (20%) de la memoria dinámica, dejando 1632 bytes para las variables locales. El máximo es 2048 bytes.

My apologies. My ID test was wrong for ILI9163

Controllers like ILI9341 have the ID like this: i.e. xx 00 93 41
reg(0x00D3) 00 00 93 41 RDID4

Your controller has : xx 91 63 00
reg(0x00D3) 00 91 63 00 ILI9341, ILI9488

Please change these lines in MCUFRIEND_kbv.cpp to

    ret32 = readReg32(0xD3);      //[xx 91 63 00]
	ret = ret32 >> 8;
	if (ret == 0x9163) return ret;
    ret = readReg32(0xD3);      //for ILI9488, 9486, 9340, 9341
    msb = ret >> 8;
    if (msb == 0x93 || msb == 0x94 || msb == 0x98 || msb == 0x77 || msb == 0x16)
        return ret;             //0x9488, 9486, 9340, 9341, 7796

I have updated the test_9163 Branch. You can either replace the whole MCUFRIEND_kbv.cpp
or hand-edit those lines.

The example sketches should detect the correct ID now.

David.

I have the same problem... :confused: for a moment it seemed to work but it was not true ... This is the result of the diagnostic_TFT_support example:

Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x0

MCUFRIEND_kbv version: 2.9.9


This ID is not supported
look up ID in extras/mcufriend_how_to.txt
you may need to edit MCUFRIEND_kbv.cpp
to enable support for this ID
e.g. #define SUPPORT_8347D

New controllers appear on Ebay often
If your ID is not supported
run LCD_ID_readreg.ino from examples/
Copy-Paste the output from the Serial Terminal
to a message in Displays topic on Arduino Forum
or to Issues on GitHub

Note that OPEN-SMART boards have diff pinout
Edit the pin defines in LCD_ID_readreg to match
Edit mcufiend_shield.h for USE_SPECIAL
Edit mcufiend_special.h for USE_OPENSMART_SHIELD_PINOUT

Did you edit the CPP file?
Or replace the file from GitHub?
Or delete directory and download ZIP again?

The purpose of GitHub is to show each individual change to a file.
You can select Branch and click on the change.
Or read the new version of CPP file

Alternatively you could just tft.begin(0x9163); in graphictest_kbv sketch.

David.

I deleted the directory and downloaded the ZIP again, with the test_9163 branch.

In graphictest_kbv sketch I have two problems, it is for SPI and reports an error that is too big for Arduino Pro Mini.

How big is it?

Change graphictest to show wifi_full[ ] instead of penguin[ ]

But the diagnose_TFT_controller sketch should work if you have replaced the ZIP.

David.

Did you select "test_9163" Branch when you downloaded the new ZIP ?
The Arduino IDE "Install from ZIP" requires you to leave IDE, delete directory, start IDE, install from ZIP

I got it!! :smiley:

But this is the result in Font_simple and graphictest_kbv examples, Is it possible that dimensions are not well defined?