



PA0 = DB8
PA1 = DB9
PA2 = DB10
PA3 = DB11
PA4 = DB12
PA5 = DB13
PA6 = DB14
PA7 = DB15
RS = PB6
WR = PB5
RD = PB4
CS = PB7
RST = PB8
i assume it is 8 bit parallel TFT.
Just search the forum for “ili9341 8bit”.
#define TFT_DATA_PORT GPIOA
// Port data bits D0..D7:
// enable only one from below lines corresponding to your HW setup:
#define TFT_DATA_LOW_NIBBLE 1 // take the lower 8 bits: 0..7
//#define TFT_DATA_HIGH_NIBBLE 1 // take the higher 8 bits: 8..15
//Control pins |RD |WR |RS |CS |RST|
#define TFT_CNTRL_PORT GPIOB
#define TFT_RD PB4
#define TFT_WR PB5
#define TFT_RS PB6
#define TFT_CS PB7
#define TFT_RST PB8 //PB0
#define TFT_RD_MASK BIT0 // digitalPinToBitMask(TFT_RD) //
#define TFT_WR_MASK BIT1 // digitalPinToBitMask(TFT_WR) //
#define TFT_RS_MASK BIT2 // digitalPinToBitMask(TFT_RS) //
#define TFT_CS_MASK BIT3 // digitalPinToBitMask(TFT_CS) //
So my LCD not show anything but It has information to serial port.
So if you define
#define TFT_RD PB4 // port B bit 4http://www.lazada.co.th/32-inch-ssd1289 … .html?ff=1
I change
//Control pins |RD |WR |RS |CS |RST|
#define TFT_CNTRL_PORT GPIOB
#define TFT_RD PB4
#define TFT_WR PB5
#define TFT_RS PB6
#define TFT_CS PB7
#define TFT_RST PB8 //PB0
#define TFT_RD_MASK BIT4 // digitalPinToBitMask(TFT_RD) //
#define TFT_WR_MASK BIT5 // digitalPinToBitMask(TFT_WR) //
#define TFT_RS_MASK BIT6 // digitalPinToBitMask(TFT_RS) //
#define TFT_CS_MASK BIT7 // digitalPinToBitMask(TFT_CS) //
https://github.com/stevstrong/TouchScreen_STM32
My serial port print information.

Pin of the LCD Touch is
T_IRQ
T_DO
T_DIN
T_CS
T_CLK
This controller type is not supported by my library, but can be added.
For initialization sequences please have a look at: https://github.com/prenticedavid/MCUFRIEND_kbv.
The touch controller is an SPI driven one, you have to detect what kind of chip is that.
Because my touch library is handling only 4-wire resistive signals and not specialized chips, please search the internet for an SPI touch library.
Behind of my LCD

Your SD and XPT2046 use SPI i.e. 3 SPI + 2 CS + 1 IRQ = 6 GPIO
In other words, you are using every available GPIO on a BluePill or MapleMini.
My MCUFRIEND_kbv library supports the ILI9341 in both 8-bit and 16-bit mode.
I have privately posted a 16-bit SPECIAL for a BluePill. Of course, having made the effort to write it for them, they do not give you any feedback.
Quite honestly, you could use Mega or Due with commercial 40-pin Adapter Shields.
If your Display has a configurable 8-bit/16-bit solder-bridge, I suggest that you select 8-bit data bus.
It does not look as if there is a solder-bridge on your blue pcb. You would need to access the SMD R1/R2 on the the flexi-ribbon.
The display will work plenty fast enough. And you can choose sensible pins.
David.
You will have to study the manual. Choose enough spare pins for your display. Then configure accordingly.
Not only is there a lot of wires to connect, but you will need to write a suitable write function for the 16-bit data bus. This is very easy if you can find an unused 16-bit PORT. It is a nightmare when you use random pins from different ports.
The only “plug and play” solutions are:
1. Mega + 40-pin Adapter Shield + 3.3V 40-pin Display.
2. Due + 40-pin Adapter Shield + 3.3V 40-pin Display.
3. Mega/Due + Mega Display Shield. i.e. you buy a new Display
4. Uno/Mega/Due/Zero/Nucleo/IteadMaple + Uno Display Shield. i.e. you buy a new Display
David.
There is nothing very complicated with driving an ILI9341. There will be several libraries.
The problem comes with “choosing” the wiring. I suggest that you just use whatever wiring the example has.
If you are determined to do it differently, try to put the data bus on a single PORT.
Control pins are easy to move.
Incidentally, the ST Core has a Nucleo-F303RE but not a Discovery F303VC. The Maple Core seems to have STM32F3 Discovery.
The thread is about using a 40-pin 16-bit 3.3V displays with a BluePill board.
I have just received a BluePill and 40pin header socket. So I soldered the board and header to some Protoboard. Plugged my home-made Adapter into a 16-bit SSD1963 display. MCUFRIEND_kbv works fine. Just like it works on a Due with Adapter Shield.
I have not tested the Touch and SD yet. There will be few GPIO pins left for anything else.
As I have mentioned before. If you test your wiring first, I do not mind writing a SPECIAL for you.
However this does involve you to do some testing and provide feedback.
David.
please just open a new topic in a relevant forum and not post to any threads mentioning something or other about your issue.
have you tried a search, maybe for ‘qvt’ gives this one http://www.stm32duino.com/viewtopic.php … =qvt#p8114 & the first reply to that post points to some potentially useful code snippet(s)
stephen
I should have replied to vincent47 with a F401RE.
Both posters asked about the TFT 320QVT_9341
The same comment applies. Is there a Core for F401RE ?
If there is an “official” Core, I will post a SPECIAL.
If your questions do not apply to “Arduino” style code, say so.
This Forum is supposed to be about Arduino Libraries
David.
Search the forum for FSMC.

