8-bit|16-bit parallell ILI9341

External hardware connected to the STM32 board
MakcYan
Posts: 15
Joined: Tue Oct 24, 2017 6:27 pm

Re: В 8-бит|16-бит параллельно ILI9341

Post by MakcYan » Fri Oct 27, 2017 4:11 pm

A display began to work!!!
Commuted the mode of display controller on 8bit and used a library Adafruit_ILI9341_8bit_STM (iwalpola)
ImageImage
Connection:
//Port data |D15 |D14 |D13 |D12 |D11 |D10 |D9 |D8 |
//Pin stm32 |PA7|PA6|PA5|PA4|PA3|PA2|PA1|PA0|
//Control pins |RD |WR |RS |CS |RST|
//Pin stm32 |PB4|PB5|PB6|PB7|PB8|

Scheme shield and libraries for STM https://yadi.sk/d/sOkpTV6nmLxeU


stevestrong
Tried to connect on a chart:
PB0...PB15 - DB8...DB15, DB0...DB7 a display did not begin (white screen) to work

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

Re: 8-bit|16-bit parallell ILI9341

Post by stevestrong » Sun Oct 29, 2017 8:05 am

Currently my 16 bit display is connected to the black F4 board.
I have to find some time to connect it to BP and find out what is going wrong there.

WacKEDmaN
Posts: 9
Joined: Mon Dec 18, 2017 1:33 pm

Re: 8-bit|16-bit parallell ILI9341

Post by WacKEDmaN » Mon Dec 18, 2017 2:11 pm

Ive been having some trouble getting my TFT LCD uno shield to work with the blue pill, it works fine on uno using mcufriend_kbv lib
it reports as an ILI9431 on the uno, it uses 8 data pins and 4 control lines + RST, but when connecting to the blue pill the screen remains white and serial outputs as it should
i have tried the standard library pinout connection (removed boot1 jumper and attached D2 to the centre pin)

Code: Select all

Port data |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 |
Pin stm32 |PB7|PB6|PB5|PB4|PB3|PB2|PB1|PB0|
Control pins |RD |WR |RS |CS |RST|
Pin stm32 |PA4|PA5|PA6|PA7|PA8|
and also changed the lib to

Code: Select all

Port data |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 |
Pin stm32 |PB8|PB7|PB6|PB5|PB4|PB3|PB1|PB0|
both with no luck..

i have tried both, https://github.com/iwalpola/Adafruit_ILI9341_8bit_STM and https://github.com/stevstrong/Adafruit_ ... 8bit_STM32

ive read this thread like 3 times over and cant find what im doing wrong
can someone give me some assistance please?!

the LCD..
https://www.jaycar.com.au/240x320-lcd-t ... o/p/XC4630
https://www.jaycar.com.au/medias/sys_ma ... etMain.pdf
Last edited by WacKEDmaN on Mon Dec 18, 2017 2:28 pm, edited 2 times in total.

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

Re: 8-bit|16-bit parallell ILI9341

Post by stevestrong » Mon Dec 18, 2017 2:19 pm

If you use my lib, then you have to have all consecutive data pins in order from 0 to 7 (low nibble) or 8 to 15 (high nibble).
I will double check my setup at home in a couple of hours.

WacKEDmaN
Posts: 9
Joined: Mon Dec 18, 2017 1:33 pm

Re: 8-bit|16-bit parallell ILI9341

Post by WacKEDmaN » Mon Dec 18, 2017 2:42 pm

stevestrong wrote:
Mon Dec 18, 2017 2:19 pm
If you use my lib, then you have to have all consecutive data pins in order from 0 to 7 (low nibble) or 8 to 15 (high nibble).
I will double check my setup at home in a couple of hours.
thanks steve, i thought that might be the case. i guess i didnt change the lib pinout, as i was only changing the #if 0 // slow write case..

should i be using #define USE_ADAFRUIT_SHIELD_PINOUT 1 ? edit: tried commented and uncommented, same results..

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

Re: 8-bit|16-bit parallell ILI9341

Post by stevestrong » Mon Dec 18, 2017 8:42 pm

I just built and uploaded my lib again on my ILI9328 tft and it works.
So now I suggest to test this LCD_ID test example from David to prove that the connections are ok.
And post here the serial monitor output.

WacKEDmaN
Posts: 9
Joined: Mon Dec 18, 2017 1:33 pm

Re: 8-bit|16-bit parallell ILI9341

Post by WacKEDmaN » Mon Dec 18, 2017 9:58 pm

lcd_id changes

Code: Select all

#define LCD_RST PA4
#define LCD_CS PA3
#define LCD_RS PA2
#define LCD_WR PA1
#define LCD_RD PA0

#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
serial output

Code: Select all

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) 01 01 01 01 01	Status Register
reg(0x000A) 02 02	Get Power Mode
reg(0x000C) 00 00	Get Pixel Format
reg(0x0061) 01 01	RDID1 HX8347-G
reg(0x0062) 02 02	RDID2 HX8347-G
reg(0x0063) 03 03	RDID3 HX8347-G
reg(0x0064) 00 00	RDID1 HX8347-A
reg(0x0065) 01 01	RDID2 HX8347-A
reg(0x0066) 02 02	RDID3 HX8347-A
reg(0x0067) 03 03	RDID Himax HX8347-A
reg(0x0070) 00 00	Panel Himax HX8347-A
reg(0x00A1) 01 01 01 01 01	RD_DDB SSD1963
reg(0x00B0) 00 00	RGB Interface Signal Control
reg(0x00B4) 00 00	Inversion Control
reg(0x00B6) 02 02 02 02 02	Display Control
reg(0x00B7) 03 03	Entry Mode Set
reg(0x00BF) 03 03 03 03 03 03	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) 02 02 02 02 02	NVM Read
reg(0x00D3) 03 03 03 03	ILI9341, ILI9488
reg(0x00D4) 00 00 00 00	Novatek ID
reg(0x00DA) 02 02	RDID1
reg(0x00DB) 03 03	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) 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01	GAMMA-N
reg(0x00EF) 03 03 03 03 03 03	ILI9327
reg(0x00F2) 02 02 02 02 02 02 02 02 02 02 02 02	Adjust Control 2
reg(0x00F6) 02 02 02 02	Interface Control
serial looks wrong..so the wiring is wrong?.. but ive triple checked it..

edit: serial output from uno here if its of any help.. https://pastebin.com/wdC2JSw2
Last edited by WacKEDmaN on Mon Dec 18, 2017 10:05 pm, edited 1 time in total.

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

Re: 8-bit|16-bit parallell ILI9341

Post by stevestrong » Mon Dec 18, 2017 10:03 pm

Serial is fine, your wiring is wrong.

Or your board has a failure.

Or PB2 does not work, you have to shorten the R4 resistor.

WacKEDmaN
Posts: 9
Joined: Mon Dec 18, 2017 1:33 pm

Re: 8-bit|16-bit parallell ILI9341

Post by WacKEDmaN » Mon Dec 18, 2017 10:18 pm

just redid the wiring and now im getting this response..

Code: Select all

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) 00 00	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 13 13 13	RD_DDB SSD1963
reg(0x00B0) 00 00	RGB Interface Signal Control
reg(0x00B4) 00 44	Inversion Control
reg(0x00B6) 00 02 82 27 04	Display Control
reg(0x00B7) 00 06	Entry Mode Set
reg(0x00BF) 00 06 06 06 06 06	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 03 03	NVM Read
reg(0x00D3) 00 00 93 41	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 10 10 10 10 10	ILI9327
reg(0x00F2) 00 02 02 02 02 02 02 02 02 02 02 02	Adjust Control 2
reg(0x00F6) 00 01 00 00	Interface Control
much closer to the uno output..but still looks off

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

Re: 8-bit|16-bit parallell ILI9341

Post by stevestrong » Mon Dec 18, 2017 10:38 pm

It looks ok for me now, it is 9341.

Post Reply