mcufirend and ID=0x6418

I just got new mcufriend touch screen 480x320 (3.5 inch)

when I replace with other screen the graphics is messed up.

I wonder if this is some new chip with no support

I have never supporteed 0x6418

Copy-paste the ID_readreg output

you mean this see picture, it does not allow copy-pase

it worked fine on due,

I tried it on nucleo first, it would display half of the screen and half like frozen and some garbage.

I do not know if those are new mcufriend ?

You have a regular Raydium RM68140 controller. I do not own a readable RM68140.

If you are getting 0x6418 returned by tft.readID() there is a serious problem. Thanks for letting me know.

I have asked several times about which Nucleo board you have. At least I know that you have a regular Due with SAM3X processor.

You should be able to copy-paste from the Serial Terminal spawned by a Linux IDE. You can definitely copy-paste from Windows Terminal. Perhaps you are running a virtual Windows !

Please force ID=0x6814 in the graphictest_kbv example. Please observe all the tests. And note the F_CPU and ID reported on the Adafruit Tests Report screen as well as the MCUFRIEND version number.

The ILI9320 class of controller requires slowing down a Cortex-M3 or M4. The ILI9488_555 "crap" controller is slow to read and write. The regular ILI9341, ILI9488, ILI9486, HX8357-C, ... all write and read fast.

If I do not own a particular controller I have to rely on feedback from users that own a fast Arduino. Bear in mind that Adafruit Tests on a ILI9341 can work 100% in 0.8 seconds on an Xmega. The same Tests take 17.4 seconds on a Mega2560.

David.

I got it tested on UNO, Mega, Due works fine.

something funny is going on on Nucleo, I tried the calibration program for touch and it worked fine

probably I can get something simple to work if I carefully choose the right codes.

but other demo like the glue are kinda messed up

here is the picture of the touch TFT if somebody want to try, it works

IMG_2911.JPG

I have NUCLEO F446RE

I have other display (no touch) 0x9486 it works fine on nucleo.

as soon as I plug the 0x6814 I am getting all the problems, I am guessing it must be older slower

it look like it does not refresh the screen and whatever was the before is mixing with new image.

RM68140  tWC = 50ns  tRCFM = 450ns  tRC = 160ns
ILI9486  tWC = 66ns  tRCFM = 450ns  tRC = 160ns
ILI9488  tWC = 30ns  tRCFM = 450ns  tRC = 160ns
ILI9341  tWC = 66ns  tRCFM = 450ns  tRC = 160ns
ILI9320  tWC =100ns  tRCFM = 300ns  tRC = 300ns
SSD1289  tWC =100ns  tRCFM =1000ns  tRC =1000ns
SPFD5408 tWC =125ns  tRCFM = 450ns  tRC = 450ns
HX8357C  tWC = 50ns  tRCFM = 160ns  tRC = 160ns

If you are getting write errors, just say so. If the write cycle is too short, every command fails.

You can see that the tWC write-cycle time is 50ns. So I would expect the RM68140 to do all the write tests ok. ILI9320 or SSD1289 would clearly fail.

You can also see that the Software Scroll can fail (tRCFM). The confusing thing is that ReadID (tRC) is often more critical than reading Frame Memory.

In practice, the ILI9341 defies all the datasheet timings. It runs extremely fast with SPI far exceeding the spec.

It should be pretty obvious how to extend the write-cycle on your STM32F446

David.

David, see the pictures one is no touch (0x9486), which works fine and the other one is touch (0x6814) it just arrived today from China, attached to nucleo STM32F446

both display the same code, XY axis and red background

Looks like something with refreshing, I tired all tricks like putting delay(100); between codes, nothing works

you see the mess on the touch screen I have no idea where it comes from.

IMG_2914.JPG

I am getting fed up.
It is my bed time.

I asked in #3

Please force ID=0x6814 in the graphictest_kbv example.
Please observe all the tests. And note the F_CPU and ID reported on the Adafruit Tests Report screen as well as the MCUFRIEND version number.

It is pretty obvious how to extend the write-cycle.

mcufriend_shield.h

#elif defined(STM32F446xx)
#define WRITE_DELAY { WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; }
#define READ_DELAY  { RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; }
#define GPIO_INIT()   { RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN; }
#define PIN_OUTPUT(port, pin) PIN_MODE2((port)->MODER, pin, 0x1)

You just add extra macros to WRITE_DELAY and READ_DELAY until satisfied. Stop when you have reliable command, reliable readID() and reliable Software Scroll.

But most importantly. You make notes of every step you have taken. And inform me.

I do not own a readable RM68140. I do own a Nucleo-F446. I have no idea what sketch you are running.

If we can not communicate, there is little point in continuing.

David.

where do I put the code inside my sketch

here is my test sketch I am testing

#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;

void setup()
{

uint16_t ID = tft.readID();
tft.begin(ID);

const char *aspectname = {
“PORTRAIT”, “LANDSCAPE”, “PORTRAIT_REV”, “LANDSCAPE_REV”
};
const char *colorname = { “BLUE”, “GREEN”, “RED”, “GRAY” };
uint16_t colormask = { BLUE, GREEN, RED, GRAY, YELLOW };

int width = 480;
int height = 320;

tft.fillScreen(0xF800);
tft.setRotation(1);
tft.drawLine(40, 280, 40, 40, WHITE);
tft.drawLine(40, 280, 440, 280, WHITE);
tft.drawRect(0, 0, 480, 320, WHITE);
tft.drawLine(40,40,30,50,WHITE);
tft.drawLine(40,40,50,50,WHITE);
tft.drawLine(440,280,430,270,WHITE);
tft.drawLine(440,280,430,290,WHITE);
tft.setTextSize(2);
tft.setTextColor(WHITE);
tft.setCursor(35, 20);
tft.print(“Y”);
tft.setCursor(450, 275);
tft.print(“X”);
tft.setCursor(40, 100);
tft.setTextColor(WHITE);
tft.setCursor(40, 130);

}

void loop()
{

}

when I put the code inside the sketch I am getting this error

elif without #if

I wouldn't mind to get another display but it seems to be the only touch tft this size on ebay and aliexpress,

I see a few smaller but it takes 2 months to arrive.

I tried to modify my sketch, no change.

#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;

#define WRITE_DELAY { WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; WR_ACTIVE; }
#define READ_DELAY { RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; RD_ACTIVE; }
#define GPIO_INIT() { RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN; }
#define PIN_OUTPUT(port, pin) PIN_MODE2((port)->MODER, pin, 0x1)

void setup()
{

uint16_t ID = tft.readID();
tft.begin(ID);

const char *aspectname = {
“PORTRAIT”, “LANDSCAPE”, “PORTRAIT_REV”, “LANDSCAPE_REV”
};
const char *colorname = { “BLUE”, “GREEN”, “RED”, “GRAY” };
uint16_t colormask = { BLUE, GREEN, RED, GRAY, YELLOW };

int width = 480;
int height = 320;

tft.fillScreen(0xF800);
tft.setRotation(1);
tft.drawLine(40, 280, 40, 40, WHITE);
tft.drawLine(40, 280, 440, 280, WHITE);
tft.drawRect(0, 0, 480, 320, WHITE);
tft.drawLine(40,40,30,50,WHITE);
tft.drawLine(40,40,50,50,WHITE);
tft.drawLine(440,280,430,270,WHITE);
tft.drawLine(440,280,430,290,WHITE);
tft.setTextSize(2);
tft.setTextColor(WHITE);
tft.setCursor(35, 20);
tft.print(“Y”);
tft.setCursor(450, 275);
tft.print(“X”);
tft.setCursor(40, 100);
tft.setTextColor(WHITE);
tft.setCursor(40, 130);

}

void loop()
{

}