STM32F103C8 & TFT (ili9325)

Working libraries, libraries being ported and related hardware
VadimEL
Posts: 66
Joined: Sat Aug 13, 2016 1:28 pm

Re: STM32F103C8 & TFT (ili9325)

Post by VadimEL » Sun Jul 09, 2017 4:24 pm

David.

In slow 48Mhz speed it almost work =)
Image Image

=======================================
ok some how it start work well on 48Mhz, do not know why О_О
In 72Mhz - white screen after tft.begin(0x9325);
In 48Mhz - screen black after tft.begin(0x9325);
==============================================
I think truble in WriteData(dat);
Maybe it's in MapleMini registers 72Mhz truble
Last edited by VadimEL on Mon Jul 10, 2017 4:14 pm, edited 3 times in total.

david.prentice
Posts: 112
Joined: Wed Nov 16, 2016 8:52 am

Re: STM32F103C8 & TFT (ili9325)

Post by david.prentice » Mon Jul 10, 2017 10:13 am

It should work quite happily at 72MHz. Your wiring must be ok. Otherwise you would get nothing at all.

I would always be happier with a Shield mating with proper Arduino header sockets.
It is electrically reliable and mechanically robust.

I solder a BluePill onto a Chinese Protoshield pcb. Solder Arduino headers. Solder wire links from BluePill to Arduino headers.
It takes a bit of time. I would prefer to buy a ready made Shield Adapter.

And hey-ho. I thought that my IteadMaple was one of the last from a discontinued production. (mine was $10 or so)
It looks as if they have found some more stock. ($5.80 is very good value)

David.

golpesar132
Posts: 24
Joined: Mon Jul 10, 2017 1:42 pm

Re: STM32F103C8 & TFT (ili9325)

Post by golpesar132 » Mon Jul 10, 2017 1:49 pm

I have a tft lcd shield. when I run it use arduino uno, it show me that identifier is ili9325 and works well but when I run it use STM32 blue pill, and this library:
https://github.com/stevstrong/Adafruit_ ... 8bit_STM32
It shows the id is ili9341 and it doesn't work. what is the problem??? how can i solve it???

stevestrong
Posts: 1747
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: STM32F103C8 & TFT (ili9325)

Post by stevestrong » Mon Jul 10, 2017 2:16 pm

Please post here the serial monitor output of this example sketch from David.
Make sure that you change the used pins according to your setup using PXY format (PA2, PB14, etc.).

golpesar132
Posts: 24
Joined: Mon Jul 10, 2017 1:42 pm

Re: STM32F103C8 & TFT (ili9325)

Post by golpesar132 » Mon Jul 10, 2017 7:27 pm

stevestrong wrote:
Mon Jul 10, 2017 2:16 pm
Please post here the serial monitor output of this example sketch from David.
Make sure that you change the used pins according to your setup using PXY format (PA2, PB14, etc.).
what do you mean about changing used pins?????

stevestrong
Posts: 1747
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: STM32F103C8 & TFT (ili9325)

Post by stevestrong » Mon Jul 10, 2017 7:36 pm

Sorry for not being clear, I meant the pin definitions in the example sketch.

VadimEL
Posts: 66
Joined: Sat Aug 13, 2016 1:28 pm

Re: STM32F103C8 & TFT (ili9325)

Post by VadimEL » Mon Jul 10, 2017 7:38 pm

golpesar132 install MCUFRIEND_kbv https://github.com/prenticedavid/MCUFRIEND_kbv
use LCD_ID_readreg

Image

example to read ID of your screen. Change name of pins in example, I use in maple mini

Code: Select all

//-- MAPLEMINI Plugged as shield
#define LCD_WR PA1 //10
#define LCD_RD PA0 //11
#define LCD_RST PA8 //27
#define LCD_CS PA3 //8
#define LCD_RS PA2  //9


#define LCD_D0 PB0
#define LCD_D1 PB1
#define LCD_D2 PB2
#define LCD_D3 PB3
#define LCD_D4 PB4
#define LCD_D5 PB5
#define LCD_D6 PB6
#define LCD_D7 PB7

golpesar132
Posts: 24
Joined: Mon Jul 10, 2017 1:42 pm

Re: STM32F103C8 & TFT (ili9325)

Post by golpesar132 » Mon Jul 10, 2017 8:04 pm

stevestrong wrote:
Mon Jul 10, 2017 2:16 pm
Please post here the serial monitor output of this example sketch from David.
Make sure that you change the used pins according to your setup using PXY format (PA2, PB14, etc.).
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) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00 Manufacturer ID
reg(0x0009) 00 00 00 00 00 Status Register
reg(0x000A) 07 70 Get Power Mode
reg(0x000C) 00 00 Get Pixel Format
reg(0x0061) 00 00 RDID1 HX8347-G
reg(0x0062) 00 00 RDID2 HX8347-G
reg(0x0063) 00 00 RDID3 HX8347-G
reg(0x0064) 00 00 RDID1 HX8347-A
reg(0x0065) 00 00 RDID2 HX8347-A
reg(0x0066) 00 00 RDID3 HX8347-A
reg(0x0067) 00 00 RDID Himax HX8347-A
reg(0x0070) 00 00 Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00 RD_DDB SSD1963
reg(0x00B0) 00 00 RGB Interface Signal Control
reg(0x00B4) 00 00 Inversion Control
reg(0x00B6) 00 00 00 00 00 Display Control
reg(0x00B7) 00 00 Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 00 00 Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 00 Panel Control
reg(0x00D0) 00 00 00 Power Control
reg(0x00D2) 00 00 00 00 00 NVM Read
reg(0x00D3) 00 00 00 00 ILI9341, ILI9488
reg(0x00D4) 00 00 00 00 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 00 00 RDID2
reg(0x00DC) 00 00 RDID3
reg(0x00E0) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-P
reg(0x00E1) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-N
reg(0x00EF) 00 00 00 00 00 00 ILI9327
reg(0x00F2) 00 00 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control

is this OK???

VadimEL
Posts: 66
Joined: Sat Aug 13, 2016 1:28 pm

Re: STM32F103C8 & TFT (ili9325)

Post by VadimEL » Mon Jul 10, 2017 8:05 pm

NO, check wire connection and name pins in example.

stevestrong
Posts: 1747
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: STM32F103C8 & TFT (ili9325)

Post by stevestrong » Mon Jul 10, 2017 8:06 pm

golpesar132 wrote:
Mon Jul 10, 2017 8:04 pm
is this OK???
No, it is not OK, it seems that your wiring is not correct.
This is what you should get:

Code: Select all

reg(0x0000) 93 25 ID: ILI9320, ILI9325, ILI9335, ...

Post Reply