tft lcd 2.4 mcufriend stm32f103 brands

I am trying to interface a touch scren lcd with stm32 board. I have an mcufriend 2.4" touch screen lcd and i intend to interface it with nucleo-f303re board. I ,unfortunately, am not able to find a datasheet for the lcd. I know that the lcd can be interfaced with spi. but as i mentioned i do not have any datasheet for the lcd. Does anyone has any information on where to find the datasheet or a library for the lcd?

tft lcd 2.4 mcufriend stm32f103 brands

This note introduces a low-cost Thin Film Transistor (TFT) display to enhance the operation and usefulness of Liquid Crystal Display(LCD) devices. TFT technology controls the pixel element on the glass surface thereby greatly reducing image blurring and improving viewing angles.

The test board chosen for this exercise is the Elegoo Arduino UNO board from the corresponding Super Starter Kit. The kit already has several simple numeric and text displays. The TFT display may perhaps provide better ways to interact in applications.

The controller for the illustrated model of the TFT display is SSD1297.This information is important because the display (owing to its low cost and high popularity) has many different manufacturers who may not leverage the same controller instruction set. The specification of the controller in the coding exercises is examined in the Appendix section of this note.

The output from the diagnostic program, LCD_ID_reading.ino, is shown below:Read Registers on MCUFRIEND UNO shieldcontrollers either read as single 16-bite.g. the ID is at readReg(0)or as a sequence of 8-bit valuesin special locations (first is dummy)reg(0x0000) 97 97ID: ILI9320, ILI9325, ILI9335, ...reg(0x0004) 97 97 97 97Manufacturer IDreg(0x0009) 97 97 97 97 97Status Registerreg(0x000A) 97 97Get Power Modereg(0x000C) 97 97Get Pixel Formatreg(0x0061) 97 97RDID1 HX8347-Greg(0x0062) 97 97RDID2 HX8347-Greg(0x0063) 97 97RDID3 HX8347-Greg(0x0064) 97 97RDID1 HX8347-Areg(0x0065) 97 97RDID2 HX8347-Areg(0x0066) 97 97RDID3 HX8347-Areg(0x0067) 97 97RDID Himax HX8347-Areg(0x0070) 97 97Panel Himax HX8347-Areg(0x00A1) 97 97 97 97 97RD_DDB SSD1963reg(0x00B0) 97 97RGB Interface Signal Controlreg(0x00B4) 97 97Inversion Controlreg(0x00B6) 97 97 97 97 97Display Controlreg(0x00B7) 97 97Entry Mode Setreg(0x00BF) 97 97 97 97 97 97ILI9481, HX8357-Breg(0x00C0) 97 97 97 97 97 97 97 97 97Panel Controlreg(0x00C8) 97 97 97 97 97 97 97 97 97 97 97 97 97GAMMAreg(0x00CC) 97 97Panel Controlreg(0x00D0) 97 97 97Power Controlreg(0x00D2) 97 97 97 97 97NVM Readreg(0x00D3) 97 97 97 97ILI9341, ILI9488reg(0x00D4) 97 97 97 97Novatek IDreg(0x00DA) 97 97RDID1reg(0x00DB) 97 97RDID2reg(0x00DC) 97 97RDID3reg(0x00E0) 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97GAMMA-Preg(0x00E1) 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97GAMMA-Nreg(0x00EF) 97 97 97 97 97 97ILI9327reg(0x00F2) 97 97 97 97 97 97 97 97 97 97 97 97Adjust Control 2reg(0x00F6) 97 97 97 97Interface Control

tft lcd 2.4 mcufriend stm32f103 brands

From what I have seen so far, I suspect that this might not be an issue specific to GUIslice -- instead I think it may be bringing to light a known incompatibility between Adafruit_TouchScreen library and the pin-sharing parallel 4-wire touch displays (common for mcufriend). This is the combination selected by the config: stm32-adagfx-mcufriend-simple. On the other hand, you have observed mcufriend + TouchScreen operates successfully, so there could be other differences at play.

Your particular setup is utilizing an mcufriend parallel display with 4-wire touch handling provided by Adafruit_TouchScreen. It is important to note that Adafruit"s 4-wire resistive touchscreen library (Adafruit_TouchScreen) is not generally compatible with many of the 4-wire touch mcufriend displays as it fails to restore pin state after reading the touch interface. Since these mcufriend displays often share the touch pins with the TFT pins, corruption is common. The mcufriend displays with integrated XPT2046 touch drivers won"t have this issue.

I have now uploaded an STM32 config (stm32-adagfx-mcufriend-notouch) that provides a no-touch option. I believe it may work better on your setup and would be interested in hearing if it paints the controls properly for you.

Enabling the touch handler (stm32-adagfx-mcufriend-simple) may result in the issues you observed due to the potential conflict between the Adafruit_TouchScreen library & the pin-sharing TFT (as the "-simple" config leverages the default Adafruit_TouchScreen library).

You had mentioned that mcufriend_kbv + TouchScreen worked in your testing. This is a good sign as it indicates that we should be able to enable the same combo for GUIslice too.

Were you running mcufriend_kbv/TouchScreen_Calibr_native or Touch_shield_new? (Did you modify the example other than to update the XP/YP/etc. pinout?)

I am able to get the mcufriend_kbv + TouchScreen to work correctly if I modify Touch_shield_new to use David"s hacked version of the Adafruit_TouchScreen library (TouchScreen_kbv) included in the examples/Touch_Calibr_native directory.

That said, it is possible that there is an altogether different issue you"re observing within the GUI, but given my prior experience with Adafruit_TouchScreen on these mcufriend displays, I"d like to rule out the above potential compatibility issue first.

tft lcd 2.4 mcufriend stm32f103 brands

Im new to Arduino myself but i do have the same screen which works perfect,your problem is probably that the TFT shield is shorting off the top off the arduino usb put something non conductive there and reset. if your still having trouble, try removing the shield and watch each pin as you insert it to make sure they are all inserted in the correct pins, LCD_02 should be in Dig pin 2.

tft lcd 2.4 mcufriend stm32f103 brands

Before I start, I want to mention that I did not write this code. This is a PORT from the mcufriend’s arduino code, which can be found HERE. I merely made some changes, so that it can be used with the CubeMx with a little modifications.

According to the Setup, the LCD_D2 is connected to the PA15. So if I want to write the DATA to the LCD_D2 pin, first I will select the 2nd bit of the data (d & (1<<2)), and than shift this by 13 using <<13. This will be like adding 2 with 13 to make a total of 15, and that’s where the LCD_D2 is connected to.

Similarly, LCD_D7 is connected to PA5. So to write the data, first we will select the 7th bit of the data (d & (1<<7)), and this time shift it RIGHT by 2 (>>2). This is like subtracting 7-2=5. And that’s where, the D7 is connected to.

The process here remains the same. Except, we have to first select the GPIO Pin, and than shift it according to the position of the LCD Pin, that it is connected to. In the function above, we are first selecting the PB0 pin, and as it is connected to LCD_D0, we don’t need to shift it anywhere. Same for the PB1 also.

Next, we are selecting PA15, and as this one is connected to the LCD_D2, we need to shift it by 13 to the right ( >>13). This process continues for all other pins too.

After all the Pins work is done, we still need to select the delays according to our clock frequency. As I am using STM32F103C8 at72 MHz, I am going to uncomment the respective code as shown below.

tft lcd 2.4 mcufriend stm32f103 brands

MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields - GitHub - prenticedavid/MCUFRIEND_kbv: MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields

It did not respond to tft.begin(0x9329). It might respond to another MIPI controller ID but is probably not worth the effort. I would just ask for a refund and buy a replacement.

It shows an ID 0X9341. All I"ve done with it so far is run the examples in the MCUfriend library. So I can"t tell you too much more without coaching.....much to learn. Cheers.

After some fun with this display, some thoughts occured to me. One being the often mentioned issue of using the majority of pins on the UNO. I evolved to this display after using 16x2"s ,20x4"s , then OLED"s to the Mcufriend shield. One of my projects is to create a display for a tractor to provide a quick reference to

I have the same lcd of the guy from the first post (tunstsk), which is HX8367-A controller (0x6767). Ive already fixed the white screen problem by removing the "//" from the following line :

Those are the pins I"ve used with the Uno using the 2.4" MCUfriend shield. The touch calibration sketch adapted by David Prentice worked for me with that configuration. Once I ran the calibration I was able to use it. I"d check the connections and make sure they agree. I"m by no means an expert, actually just getting started with tft"s David"s post"s above helped me.

If you own a DMM, unplug the shield. You can measure the resistance yourself. Typical pins used are LCD_WR, LCD_RS, LCD_CS and LCD_D0, LCD_D1, LCD_D6, LCD_D7

If you own a DMM, unplug the shield. You can measure the resistance yourself. Typical pins used are LCD_WR, LCD_RS, LCD_CS and LCD_D0, LCD_D1, LCD_D6, LCD_D7