Go Down

Topic: Library for st7793 (Read 132 times) previous topic - next topic


I used David Prentice library and no sucess. Can someone help me?.

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) 77 93   ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00   Manufacturer ID
reg(0x0009) 00 00 00 00 00   Status Register
reg(0x000A) 00 00   Get Powsr Mode
reg(0x000C) 00 00   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 00   Inversion Control
reg(0x00B6) 00 00 00 00 00   Display Control
reg(0x00B7) 00 00   Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00C0) 00 00 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 00   Panel Control
reg(0x00D0) 00 00 00   Power Control
reg(0x00D2) 00 00 00 00 00   NVM Read
reg(0x00D3) 00 00 00 00   ILI9341, ILI9488
reg(0x00DA) 00 00   RDID1
reg(0x00DB) 00 00   RDID2
reg(0x00DC) 00 00   RDID3
reg(0x00E0) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   GAMMA-P
reg(0x00E1) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   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


Aug 15, 2016, 02:44 pm Last Edit: Aug 15, 2016, 02:45 pm by david_prentice
Sitronix have a 240x432 ST7793 controller chip.    I can not locate a datasheet.

If you can find a datasheet,  I will support the controller.

Meanwhile,  you could try tft.begin(0x7783) which is for a 240x320 ST7781 controller.
Or try tft.begin(0xB509) which is for a Renesas 240x432 R61509V controller.

There is an Ilitek 240x432 ILI9326 controller.   I do not support it.  No one has asked.

Note that guesswork that goes wrong could mean inappropriate commands being sent.
So if you get a white screen,   do not leave the display powered.



Sitronix have sent me the ST7793 datasheet.

If you are willing to test code and report the results,   I will add support for this controller. 




This is the display and is 3.97''.

I'm not sure about driver.

Thanks for all


Aug 16, 2016, 10:14 pm Last Edit: Aug 16, 2016, 10:16 pm by david_prentice
I am confused.   You have two different threads.

You appear to have a 2.8" 240x400 shield with an ILI9326 controller
You appear to have a 3.97" 240x400 shield with an ST7793 controller

I have a datasheet for each controller.  But obviously no real-life hardware to test.

I suggest that you just edit graphictest_kbv.ino:

Code: [Select]

    tft.begin(0xB509);   // the Renesas R61509V is very similar

Report back with the results.   For both Shields.

What country are you in?
Do you know how to use GitHub?



David, first thanks for all.

My 3.97'' shield works perfect with B509. You can arrange it for next version of kvb library.

The other tread is about a 2.8" ?x? shield with an ILI9326 controller (see the other thread for report) but marked with (ft1509) in PCB.

The report with graphictest_kbv modified is:

Serial took 0ms to start
ID = 0x9326

I'm from Barcelona, SPAIN.

I don't know how to use GitHub, but i can learn.

Thanks again!!


Your controller is clearly identified as an ILI9326.

Since this is a 240x432 controller,   I am guessing that your panel is 240x400 i.e. narrow and deeper than a regular 2.4" 240x320 screen.

Just run the same modified sketch.   What happens with 0xB509 ?

Regarding the ST7793.   Do you get good vertical scroll?    The R61509 that I own will show a white band i.e. the panel is configured for 240x432 when it should be 240x400.



Just run the same modified sketch.   What happens with 0xB509 ?


Serial took 0ms to start
ID = 0x9326

White screen.

Regarding the ST7793.   Do you get good vertical scroll?    The R61509 that I own will show a white band i.e. the panel is configured for 240x432 when it should be 240x400.

Appears a band with multicolors in vertical scroll.


Aug 17, 2016, 12:01 pm Last Edit: Aug 17, 2016, 01:58 pm by david_prentice
I have added a "test-ili9326" Branch to GitHub.

I will send you a PM with instructions.

I will need to think about the "white band" in vertical scroll with your ST7793.   (it is not white.  it just has random pixels)


Edit.   I have added both ILI9326 and ST7793 to the GitHub test branch.   You do not need to "force" tft.begin(0xB509)

I have concluded that the "white band" is always going to be present in these "old" controllers.
If you want to use the Vertical Scroll feature,  you should call the display 240x432 and accept that not all is visible.   

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131