prenticedavid / MCUFRIEND_kbv

MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields
Other
357 stars 177 forks source link

ST7793 DON'T WORKING #193

Closed kefeur closed 2 years ago

kefeur commented 2 years ago

<Serial.println(g_identifier, HEX); //tft.begin(0x9488); //tft.begin(0x5393); tft.begin(0x7793);//to enable ST7793 driver code> Im using ST7793 Driver ic for open-smart uno r3 air and 3.5"tft . This code should control the display, but unfortunately it doesn't work. No reaction, it's all white. What could be the problem ? I've tried a lot of code, but it's not good. // GND -- GND // 3V3 -- 3.3V // CS -- A3 // RS -- A2 // WR -- A1 // RD -- A0 // RST -- RESET // LED -- GND // DB0 -- 8 // DB1 -- 9 // DB2 -- 10 // DB3 -- 11 // DB4 -- 4 // DB5 -- 13 // DB6 -- 6 // DB7 -- 7 Pinout is correct ? Thank's for answer.

prenticedavid commented 2 years ago

Please describe exactly. e.g. graphictest. Blue penguin. vertical garbage strip on right. Green penguin. horizontal garbage strip at top. ...

diagnose_tft. blue. good white rectangles green. good white rectangles red. where are the rectangles? gray. where are the rectangles?

Please do not ask questions about your own code. Just run graphictest_kbv and diagnose_TFT_support. Either describe where the garbage strip is, the rectangles are wrong. Or post a photo.

Please remember that I do not have your controller. Nor do I have your custom sketch.

I will solve your sketch and ShowBMP_kbv_uno AFTER I have fixed graphictest_kbv and diagnose_TFT_support.

David.

kefeur commented 2 years ago

I just described it in detail! This translator is worth nothing!

prenticedavid commented 2 years ago

Why not post your messages in Hungarian? Then I can translate.

kefeur commented 2 years ago

If you have no experience, you will not succeed because our language is very different. Ha nincs tapasztalatod , nem fog sikerülni , mert nagyon különnbözik a nyelvünk.

kefeur commented 2 years ago

Without experience that won't work, our languages are very different.

kefeur commented 2 years ago

English and Hungarian are very different languages, if you are not familiar with Hungarian it is very easy to mistranslate it.

3 diferent versions !

prenticedavid commented 2 years ago

Think about it. You write your message in Hungarian which you are familiar with.

I pass it through Google Translate. And read the English translation.

Believe me. I have read Chinese datasheets via Google Translate. Ok, some words look strange, but I can understand what they mean. "Ha nincs tapasztalatod , nem fog sikerülni , mert nagyon különnbözik a nyelvünk." is "If you have no experience, you will not succeed because our language is very different."

Please just try it. This Issue has run for a long time.

If you do not trust me with translation, just post a photo of bad "penguin" and bad "diagnose"

David.

kefeur commented 2 years ago

Rendben de ez legalább 50 fénykép lessz .

prenticedavid commented 2 years ago

_graphictestkbv is good until the blue grades appear, then there's the vertical garbage stripe. One photo of "Blue penguin"

Diagnose tft support is good up to the red background, then not, then the blue and green are good again. One photo of red background

That is 2 photos not 50.

David.

kefeur commented 2 years ago

Szeretnék segíteni a probléma megoldásában . IMG_20211206_214048 IMG_20211206_214051 IMG_20211206_214056 IMG_20211206_214100 IMG_20211206_214106 IMG_20211206_214236 IMG_20211206_214242 IMG_20211206_214255 IMG_20211206_214258 IMG_20211206_214314 IMG_20211206_214322 IMG_20211206_214325 IMG_20211206_214327 IMG_20211206_214337

kefeur commented 2 years ago

A fő hibákat fotóztam. Azt vettem észre hogy más egyszerű kódokat használva is bele került a hiba a képbe , ahol eddig nem volt.

prenticedavid commented 2 years ago

2 photos would have been ok.

Are you sure that you removed the OFFSET_9327 edits ? Are you sure that you changed the 3 lines that I showed ?

Please copy-paste those sections from your MCUFRIEND_kbv.cpp file. I expect to see about three 10-line sequences. I do not want 3000 lines. i.e. two OFFSET_9327 sequences and one _MC = 0x200, sequence

David.

kefeur commented 2 years ago

if defined(OFFSET_9327)

if  (_lcd_ID == 0x9327 ) {
    if (rotation == 2) y += OFFSET_9327, y1 += OFFSET_9327;
    if (rotation == 3) x += OFFSET_9327, x1 += OFFSET_9327;
}

endif

2;

if defined(OFFSET_9327)

if (_lcd_ID == 0x9327 ) {
    if (rotation == 2 || rotation == 3) top += OFFSET_9327;
}

endif

3; case 0x5420: case 0x7793: case 0x9326: case 0xB509: _MC = 0x200, _MP = 0x201, _MW = 0x202, _SC = 0x210, _EC = 0x211, _SP = 0x212, _EP = 0x213; GS = (val & 0x80) ? (1 << 15)|(4 << 1) : 0; //if GS start at row33 else row1 uint16_t NL; NL = ((400 / 8) - 1) << 9; // 400 rows

kefeur commented 2 years ago

Ezt kérted ? Elegendő ? Ez így nagyon lassú , tudnánk gyorsítani a folyamatot?

kefeur commented 2 years ago

Ez körülbelül 20 percenként 1 üzenet. Megoldhattuk volna 5 perc alatt is online....

prenticedavid commented 2 years ago

You have made all the edits correctly. It is difficult for me to test code without the ST7793 display.

I tested the register changes with an Ilitek controller but not with a Sitronix controller. Your ST7793 is made by Sitronix.

Regarding speed and convenience. If you Fork or Clone with GitHub everything becomes easy. I create a special test Branch for you. And you update automatically via GitHub.

However you have to learn how to use GitHub. Which might be difficult for you.

I want to go to bed ! I will post something tomorrow.

David.

kefeur commented 2 years ago

Mit villázzak , mit klónozzak , nem értem.... Másik szavakkal írd le kérlek.

prenticedavid commented 2 years ago

Learning GitHub is difficult. I suggest that you find a Hungarian Tutorial. It would not be easy for me to explain via Google Translate.

Anyway, I have concluded that Sitronix works very differently to other makes. So I have ordered the same package that you bought. It might arrive by 24 December. I should be able to get ST7793 working 100% when I have my own display on my desk.

Meanwhile, I suggest that you only use your Display in Portrait and Landscape. Forget about rotation 2, 3. I have plugged my HX8352B OpenSmart Shield into a Uno clone. I will run showBMP_kbv_uno.ino later this evening. And post a link to working code.

David.

kefeur commented 2 years ago

Nem tudom mejik kódra gondolsz. Amit fotóztam az a te könyvtáradból van. Pontosan írd le mejiket kéred. Nálam itt van a kijelző ,gyorsan mehetne , ha megvan a módja.

prenticedavid commented 2 years ago

I have posted a BMP file on GitHub. https://github.com/prenticedavid/MCUFRIEND_kbv/tree/master/examples/showBMP_OpenSmart_Uno

Please tell me if BMP example works for you.

Vertical Scroll will never work nicely on a 240x400 ST7793. It only works with a 240x432 panel. Rotation works with the OFFSET_9327 method. When I receive my screen I will post a method that uses the controller registers.

David.

kefeur commented 2 years ago

Uhh .... Nem nyitja meg az SD kártyát.Nem űködik. Az elején kimaradt a SPCR = 1. Program közben nem jó részeken van a RESTORE_SPI_GPIO().Javítani kell

kefeur commented 2 years ago

#if defined(OFFSET_9327) if (_lcd_ID == 0x9327) { Ezeknek a soroknak a megváltoztatása működött eddig a legjobban !

prenticedavid commented 2 years ago

My apologies.

I ran showBMP_OpenSmart_Uno on an HX8352B Open-Smart Shield with USE_SPECIAL, USE_OPENSMART_SHIELD_PINOUT_UNO, SUPPORT_8352B

And I also ran it on a regular ILI9327 Mcufriend Shield

Both worked fine yesterday. But today the HX8352B is not working.

Incidentally, the sketch says:

#define RESTORE_SPI_GPIO() SPCR = 0

and not SPCR = 1

kefeur commented 2 years ago

Nincs probléma. Néha az arduino megviccel , sokszor kell újraindítani szerintem. Amit leírtam a SPCR ről , az csak utalás volt, hogy az a rész nem jó.

prenticedavid commented 2 years ago

I received my ST7793 display today. I have created a "test_7793" Branch. The rotation=2 and rotation=3 are working.

The Vertical Scroll will always have a 32 pixel stripe with garbage.

If any readers possess ILI9326, SPFD5420 or R61509V controllers please could they run diagnose_TFT_controller.ino to test the rotations. And grahictest_kbv.ino to test the "Vertical Scroll"

David.

kefeur commented 2 years ago

Ok . Köszönöm a teszteket , és a munkád. Nálam továbbra is fennállnak a problémák , nem kezeli az sd kártyát és akijelzőt egy kódon belül. A többi feladatot trükközve meg tudtam oldani. Részemről lezárult a kérdés.

prenticedavid commented 2 years ago

OK . Thank you for the tests and your work. I still have problems, it doesn't handle the sd card and display within a code. I was able to solve the other tasks trickily. For my part, the question is closed.

I bought exactly the same package as you. The ST7793 seems to work ok with the AIR board. The SD is ok too.

I have updated the "master" Branch with the "test_7793" changes. You will still need to edit USE_SPECIAL and USE_OPENSMART_SHIELD_PINOUT_UNO for your AIR board.

Please tell me what I was able to solve the other tasks trickily. means.

Now that I have the same ST7793, SD and AIR board as you, I can replicate any problems,

kefeur commented 2 years ago

Nagyon köszönöm a munkád 🥇 Hiba :showBMP_OpenSmart_Uno valmiért nem nyitja meg az SD kártyát. (A trükközés egy teljesen más probléma miatt kell.Egy térkép részlet a háttér , és elé kell mozgó grafikát illeszteni , úgy hogy ne kelljen a térképet minden grafika változtatáskor újrarajzolni.) (The trick is due to a completely different problem. A map detail is the background and a moving graphic must be placed in front of it so that you do not have to redraw the map every time you change the graphic.)

prenticedavid commented 2 years ago

Please give an example. e.g. the background .BMP file (or as a .JPG or .PNG file)

Please give an example moving graphic.

It is very important to know the size of the color background e.g. 400x200 And the size of the graphic and whether it is monochrome or full color. e.g. 16x16

The UNO / AIR has limited SRAM.

David.

kefeur commented 2 years ago

https://ns6t.net/azimuth/azimuth.html Készíteni térképet kék háttérrel . Grafika csak egy iránytű mutatója, ami mozog , mert antennaforgatót használok. azmap

prenticedavid commented 2 years ago

Google Translate says: Draw a map on a blue background. Graphics are just a pointer to a compass.

That is very easy. You either save the background in SRAM before drawing the pointer. Or you read the background from the .BMP

Then you can restore the background before drawing a new pointer. This is much easier with rectangular blocks than with a diagonal pointer.