MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields

I wanted to also ask, does this mean that my display ILI9331 is compatible with the display ILI9320?

Thanks for your report.

The software scroll only works on that small rectangle. At the end, the EADB should still be in Red. The broken letters should still be in Yellow. There should be no flashes of Blue during the scroll.

Please remove the plastic film from your screen. It distorts the colours.
All the colours and printing should look very bright and clear. There is a bit of blurring during the Vertical scroll.

Compare the 9320 screen with your 9331 code.
Which looks better?

David.

Thanks for the reply. I now understand what is the difference in initializing the display 9320. Also wanted to ask why You said that the display on the UNO Board will run faster than on-Board MEGA 2560.
Also, this question is a bit off topic, but associated with the display. To display the images with the SD card uses the SPI library with hardware support. But since my display Pinout charge made under UNO, it is not the same SPI pins. For UNO - 10, 11, 12, 13, and MEGA - 50, 51, 52, 53. a question arises, is it possible to use software SPI, SPI by assigning findings on 10,11,12,13?

These displays are designed for a Uno. They work very well on a Uno.

If you use a Mega, the TFT will be 2.5x slower than a Uno. You must use Software SPI for the microSD. e.g. with the SdFat library.

Personally, I find the SdFat library is not as reliable to use as the regular SD library that comes with your Arduino.

Since Uno clones are so cheap, I suggest that you use your display with a clone instead of a Mega2560.

From my point of view, I look forward to hearing whether 0x9320 or 0x9331 gives a better picture.

David.

I got the 3.95LCD from aliexpres which uses IL9488.

I am using the library given here . I am using MEGA as I need other GPIO to be used for other purposes. I can't use the UNO because of this limitation.I don't need touch screen .

I have other modules like the DS3231 ,and ESP8266 connected to the MEGA and this 3.95 LCD connected as well. ESP8266 is powered separately using a 12-5v converted supply. Mega is powered using another source.The normal grapichs test is working in the LCD. I am able to make it work with the nano,uno and mega. Even for mega I am able to write customized messages.

What I intend to do is to update the time in the LCD which is received from the DS3231. It updates the LCD but I see a flickering issue here.

Every update(LCD display function is from the loop which sets the text when there is a second/time/hour difference in the time.) seems like draining more current as the one of the LED connected to MEGA dims, the rx/tx leds also dims.

I am able to get the LCD refreshed but it shows a flickering.I powered the LCD 3.3 and 5v using another separate source but still the small flickering continues.
Moreover all these time I was connected to the MEGA through the USB from the laptop.Once I unplug the USB, LCD starts and shows some update and again become white. This continues and an not able to see anything on LCD there after.

I am not sure why only when the MEGA is connected to USB this LCD works and that too flickering but once the USB is removed the LCD is not working at all.

Can some one please do help me in this ?

So your shield works 100% on a Uno and Mega running the library examples.

If you have a problem with your own code, please post your sketch and a schematic of your wiring.
A simple pencil drawing of your wiring is fine if you attach a good photo.

A written description of your wiring is fine too. But check it VERY carefully. The description in your message#13 is not accurate enough. Put yourself in our shoes. We do not know whether you have connected GND wires, what kind of power supply, what pins are connected ...

David.

david_prentice:
So your shield works 100% on a Uno and Mega running the library examples.

If you have a problem with your own code, please post your sketch and a schematic of your wiring.
A simple pencil drawing of your wiring is fine if you attach a good photo.

A written description of your wiring is fine too. But check it VERY carefully. The description in your message#13 is not accurate enough. Put yourself in our shoes. We do not know whether you have connected GND wires, what kind of power supply, what pins are connected ...

David.

Thanks David for looking into the issue. Sorry for not being clear on the text as these are my initial set of posts. I meant to mention about grounding but I forgot to.

I used 3 12V 2 amp adapters and powered 3 MB102 (http://www.amazon.com/gp/product/B010UJFVTU).One is used to power the ESp8266, One for Mega and one for the TFT LCD. All the grounds are connected together. From the Mega I have connected the DS3231. This is powered from the Mega.

Only when the USB connected to another USB power source(2AH phone charger) or to laptop(mac) the LCD starts working but not without flickering.

I doubt about the current consumed as there is on LED connected to GPIO in Mega and it dims along with TFT LCD.

I will shortly post the code and the sketch. If someone can help in between I would be thankful to them.

Why so complicated?
You could supply the ESP8266 from the 3.3V output on the Mega. Of course the 3.95" shield obscures the 3.3V pin.

Likewise, you could power the Mega from the 5V output of the MB102 and the ESP8266 from the 3.3V output.
I am very worried about a 12V wall-wart. The MB102 regulator will get warm. A 6V or 7.5V wall-wart would be safer.

The 3.95" shield takes about 200mA. Most current goes to the backlight.

I have not heard anything about level-shifters for the ESP8266. If you drive it from the 5V Mega pins, you will back-feed voltage. You must have a level-shifter chip or resistors.

We really do need to see a schematic as well as your code.

David.

david_prentice:
Why so complicated?
You could supply the ESP8266 from the 3.3V output on the Mega. Of course the 3.95" shield obscures the 3.3V pin.

Likewise, you could power the Mega from the 5V output of the MB102 and the ESP8266 from the 3.3V output.
I am very worried about a 12V wall-wart. The MB102 regulator will get warm. A 6V or 7.5V wall-wart would be safer.

The 3.95" shield takes about 200mA. Most current goes to the backlight.

I have not heard anything about level-shifters for the ESP8266. If you drive it from the 5V Mega pins, you will back-feed voltage. You must have a level-shifter chip or resistors.

We really do need to see a schematic as well as your code.

David.

Thanks for the inputs . For the ESP8266 I have level shifter using the resistors. I powered the ESp8266 separately because I read in many blogs that the arduino boards wont be able to provide the sufficient current to the ESP8266 and better to have separate power supply. I have used level shifter for the ESp8266 as well .

I want to know a few more details of the TFT LCD. Is it really required to power up the 3.3v and 5v pins in LCD if I just want to use module excluding the SD card and the touch. I just want that to be a screen to display the data.

Now that I have connected the D0-D8 to the Mega PINS 2-9 . Connected the 5 and 3.3v and GND.
And the A0-A4 in Arduino MEGA for the LCD_RD - LCD_RST in LCD.

You really need to explain yourself. Or post a schematic, photo, ...

I would assume that there is only one way that you can plug a shield into an Arduino.
Then there is no confusion about which pin is connected where.

Multiple different power supplies are very worrying.
Surely a single Mega would provide the 5V and 3.3V supplies.

If you are cavalier with voltages, you will destroy chips.

David.

Arduino UNO can provide only 50mA on 3.3V, don't know Mega, absolutely insufficient to power an ESP8266 expecially during transmission.

"Arduino UNO can provide only 50mA on 3.3V"
150mA, Mega also. May not be enough for ESP8266 tho.

I know nothing about the ESP8266. Looking at the data sheet, it certainly can draw a lot of current during TX.

We still have not received a schematic or accurate explanation of rahulmr's wiring. Life can get complicated with different logic levels and power supplies.

It looks as if you need the external power supply for the ESP8266. It seems an awful waste to drop 12V to 3.3V.

David.

CrossRoads:
"Arduino UNO can provide only 50mA on 3.3V"
150mA, Mega also. May not be enough for ESP8266 tho.

From https://www.arduino.cc/en/Main/ArduinoBoardUno

DC Current for 3.3V Pin

50 mA

Mega is the same.

Odd..

I ran the graphicstest_kbv sketch on an uno with a 2.4" mcufriend (marked st7789v)

The graphics appear, and scrolls and rotates and all that.. however, looking in the serial monitor just prints out
ID = 0x0

Not sure what's going on, or how to fix this. I've attempted to contact MCUFriend through their website, but have not heard back from them, since i ordered this on schmeeeebay, i contacted the seller, and haven't heard from them either.

I've tried several libraries, some get the graphics working, but the touch doesn't, other can't get anything to work.

I'm seriously at a loss with this thing.

Attached is a picture of the device

Any advice on how to proceed would be phenomenal, as I'm really at a loss on this.

I have never seen "st7789v". Please run the LCD_ID_readreg.ino sketch and copy-paste the result from the Serial terminal.

If you get a response from either Mcufriend or your Ebay vendor, you deserve a medal.

David.

As stated, i have already tried that, and it shows me 0x0, or C0C0 depending on which "identifyer" sketch is used.

The really odd thing is, i can run the device with the 9341 drivers, but there are "some" issues.

the touch pins aren't the same as on other boards / examples i've seen.. on this board it appears they are:
Touch Pins
#define YP A1
#define YM 6
#define XM A2
#define XP 7

Also, according to ramtex.dk, the st7789 has similar internal configuration and graphic rendering features as the following driver IC's

HX8325, HX8347, HX8352, HX8353, HX8367, HX8369, ILI9340, ILI9341, ILI9163, NT39122, SPFD54126, SSD1355, ST7715, ST7628, ST7735, ST7773.

The driver IC appears to be made by Sitronix Technology, i've put in a request for datasheets etc from them, so hopefully that will give us some better idea of the IC, how it works etc, and we maybe able to go from there.. i wasn't able to find the device on their site, but there is listed another version (st7789S) http://www.sitronix.com.tw/en/index.html

I just find it odd, that there are so many variations of these mcufriend devices showing up everywhere, and no real rhyme or reason as to why each is almost unique in how it functions..

So currently i'm tinkering around with getting it to actually function.. i can get display, and touch to function, as i said, using the ILI9341 driver, but i've had to change the pin assignments within sketeches for the touch to work.

Truth be told.. i'm kind of stabbing at this thing in the dark, as i know very little about tft / display drivers etc..

If you need any specific information, i'll try to get it for you.

Also, when i recieved the device, the double-sided tape that holds down the screen to the shield was lifting up, i gently lifted the screen, and replaced the tape, while doing so i did manage to write down all the numbers etc i could see...

On the ribbon:
H24TH97A-V0
2014-7-26

On the Screen Itself:
BL24532C1
MY187E
14/08/26

Here are some serial monitor outputs from various sketches.. I've seen that some people see C0C0 is something to do with broken solder, or trace on a pin, but i've not been able to locate any such issue on the board, so i'm not sure what's going on there..

TFT Test Sketch info:
TFT LCD test
TFT size is 240x320
Unknown LCD driver chip: C0C0
I try use ILI9341 LCD driver If using the Adafruit 2.8" TFT Arduino shield, the line:
#define USE_ADAFRUIT_SHIELD_PINOUT
should appear in the library header (Adafruit_TFT.h).
If using the breakout board, it should NOT be #defined!
Also if using the breakout, double-check that all wiring
matches the tutorial.
Benchmark Time (microseconds)
Screen fill 1787080
Text 746528
Lines 7784232
Horiz/Vert Lines 220308
Rectangles (outline) 168556
Rectangles (filled) 4680132
Circles (filled) 2412900
Circles (outline) 3400776
Triangles (outline) 2469012
Triangles (filled) 2712324
Rounded rects (outline) 1113784
Rounded rects (filled) 5641876
Done!

TFT Sketch 2 Info (graphixtest_kbv)
ID = 0x0

Also.. the device was cheap as all...
I got it here: www.ebay.com/itm/-/261688643631

Seller however, has automated message saying he's away from computer whenever you try to contact them.

Still waiting on reply from MCUFriend.com i've sent them an email with all the information i could find on the board / lcd / ribbon, as well as image of the board.. so here's to hoping they have a clue.

After reading your earlier post, I downloaded the ST7789 data sheet and "added support" to (my private copy of) the library.

If you are not prepared to copy-paste the result from LCD_ID_readreg.ino, I will wait until there is a cooperative reader.

David.

thought I did paste the result of LCD_ID_readreg.ino

Here's the complete result that shows up in serial monitor:

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) C0 C0 ILI9320, ILI9325, ILI9335, ...
reg(0x0004) C4 85 85 52 Manufacturer ID
reg(0x0009) C9 00 61 00 00 Status Register
reg(0x00BF) FF 00 00 00 06 0C ILI9481
reg(0x00D0) D0 A4 HX8357
reg(0x00D2) D2 00 00 NVM Read
reg(0x00D3) D3 00 00 00 ILI9341, ILI9488
reg(0x00DA) DA 85 00 RDID1
reg(0x00DB) DB 85 00 RDID2
reg(0x00DC) DC 52 00 RDID3
reg(0x00EF) EF 00 00 00 00 00 ILI9327
reg(0x00B0) F0 RGB Interface Signal Control
reg(0x00B4) F4 Inversion Control
reg(0x00B6) F6 00 00 00 Display Control
reg(0x00B7) F7 Entry Mode Set
reg(0x00F6) F6 FF FF Interface Control

Nothing else gets printed to serial monitor

Yes, you have a ST7789V controller.

I am a little surprised by the "dummy" byte in your output. e.g. C0 85 85 52
Since the sketch resets the controller in hardware, I would expect to see 0x00 with a correctly inserted shield.

Are you sure that you have not edited the sketch?

If you PM me with your email, I could email you an updated ZIP.
l would hope that you could report back with the results.

David.