Closed Dinnstach closed 7 months ago
I found the following solution: In MCUFRIEND_kbv.cpp
void MCUFRIEND_kbv::setRotation(uint8_t r)
{
uint16_t GS, SS_v, ORG, REV = _lcd_rev;
uint8_t val, d[3];
rotation = r & 3; // just perform the operation ourselves on the protected variables
_width = (rotation & 1) ? HEIGHT : WIDTH;
_height = (rotation & 1) ? WIDTH : HEIGHT;
switch (rotation) {
case 0: //PORTRAIT:
val = 0x08; //MY=0, MX=1, MV=0, ML=0, BGR=1 (previously 48)
break;
case 1: //LANDSCAPE: 90 degrees
val = 0x88; //MY=0, MX=0, MV=1, ML=0, BGR=1 (previously 28)
break;
case 2: //PORTRAIT_REV: 180 degrees
val = 0xD8; //MY=1, MX=0, MV=0, ML=1, BGR=1 (previously 98)
break;
case 3: //LANDSCAPE_REV: 270 degrees
val = 0x78; //MY=1, MX=1, MV=1, ML=1, BGR=1 (previously F8)
break;
}
...
I connected a 7 inch display with SSD1963 controller to an ArduinoMega 2560. The examples graphictest_kbv.ino and Fontsimple.ino work but the text output is mirrored in every orientation. I used
_tft.begin(0x1963);_
_. All examples with UTFT Library don't work for me. What can I do?