-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solving problems with the ST7783 #143
base: master
Are you sure you want to change the base?
Conversation
I had been having problems with the ST7783. I found a solution that solves my problem and I want to add. Based on https://forum.arduino.cc/index.php?topic=264068.msg2326989#msg2326989 Only tested on Arduino Uno.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My ST7781 display is a Red 2.4 inch Mcufriend Shield bought in about 2014.
The library Gamma setting is crap. The default Gamma is crap.
I do not get flickering.
Look at the graduated colour band in the graphictest_kbv Penguin screens.
Display Photos on the screen.
What is your screen? Please post a link. e.g. Ebay Sale page.
TFT panels vary. Your shield might have a TFT panel from a different TFT manufacturer but still use a ST7781 controller.
David.
Edit. I added this sequence from the Sitronix App Note. It looks much better on my TFT panel. Both for Colour Grades and for displaying JPEG colour photos.
static const uint16_t ST7781_regValues_CPT24[] PROGMEM = {
0x0001, 0x0100, // Driver Output Control Register (R01h)
0x0002, 0x0700, // LCD Driving Waveform Control (R02h)
0x0003, 0x1030, // Entry Mode (R03h)
0x0008, 0x0302, // Porch
0x0009, 0x0000, // Scan
0x000A, 0x0008, // Fmark Off
0x0010, 0x0000, // Power Control 1 (R10h)
0x0011, 0x0005, // Power Control 2 (R11h)
0x0012, 0x0000, // Power Control 3 (R12h)
0x0013, 0x0000, // Power Control 4 (R13h)
TFTLCD_DELAY, 100,
0x0010, 0x12B0, // Power Control 1 SAP=1, BT=2, APE=1, AP=3
TFTLCD_DELAY, 50,
0x0011, 0x0007, // Power Control 2 VC=7
TFTLCD_DELAY, 50,
0x0012, 0x008C, // Power Control 3 VCIRE=1, VRH=12
0x0013, 0x1700, // Power Control 4 VDV=23
0x0029, 0x0020, // NVM read data 2 VCM=32
TFTLCD_DELAY, 50,
0x0030, 0x0000, // Gamma Control 1 App Note CPT 2.4
0x0031, 0x0106, // Gamma Control 2
0x0032, 0x0101, // Gamma Control 3
0x0035, 0x0106, // Gamma Control 4
0x0036, 0x0203, // Gamma Control 5
0x0037, 0x0000, // Gamma Control 6
0x0038, 0x0707, // Gamma Control 7
0x0039, 0x0204, // Gamma Control 8
0x003C, 0x0106, // Gamma Control 9
0x003D, 0x0103, // Gamma Control 10
0x0060, 0xA700, // Driver Output Control (R60h) .kbv was 0xa700
0x0061, 0x0001, // Driver Output Control (R61h)
0x0090, 0X0030, // Panel Interface Control 1 (R90h)
// Display On
0x0007, 0x0133, // Display Control (R07h)
TFTLCD_DELAY, 50,
};
init_table16(ST7781_regValues_CPT24, sizeof(ST7781_regValues_CPT24));
//init_table16(ST7781_regValues, sizeof(ST7781_regValues));
I think you didn't look at the link I reference and remember that I was talking about the ST7783 I quote for you:
Maybe I could have been clearer and explained more but that's it. Look the pics of before and after: About the eBay sale page: I received this TFT screen as a gift a long time ago, I will ask the friend that gave me. And about this:
I'm using PlatformIO and the compiler says that there is no reference for penguin variable. |
You have a regular Mcufriend shield. My one has AMS117 regulator. Modern (crap) pcb has an empty SOIC-8 footprint. There is no Sitronix ST7783 controller. The Sitronix ST7781 reports an ID=0x7783. I can only find the CPT2.4 App Note from Sitronix. If your sequence produces good results, stick with it. My panel has a good picture but very narrow viewing angle. (like most cheap Mcufriend shields) David. |
Sorry if I said something dumb, lol I don't have much knowledge of electronics. It was cool looking for an answer out there. It brought me here, so I grateful. Great work btw p.s.: FYI, here it is the "eBay" page p.p.s.: I found this comment of yours at this thread, and I think that's my real problem. |
As I said. My shield is old. Newer shields might have a different pcb and a different panel. Yes, I have a low opinion of the "new pcb" design. And a fairly low opinion of all Mcufriend designs. However, the 2.4 inch shields do "work". Please try the default ST7781 initialisation from the v2.9..8 Release. I would appreciate feedback. i.e, what pcb you have, which initialisation gives the best picture. David. |
My shield looks a little different from this link. About what you ask:
-The sequence that you posted: NAILED IT! I don't think I have to change anything, anymore. Thank you very much!!! Do you want me to add to my PR this perfect sequence? Regards, Arthur. |
I had been having problems with the ST7783. I found a solution that solves my problem and I want to add.
Based on https://forum.arduino.cc/index.php?topic=264068.msg2326989#msg2326989
Only tested on Arduino Uno.