8-bit|16-bit parallell ILI9341

External hardware connected to the STM32 board
User avatar
ahull
Posts: 1671
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: 8-bit|16-bit parallell ILI9341

Post by ahull » Wed Oct 12, 2016 9:15 am

When using the STM32 boards in battery operated projects, I usually remove the "Power On" LED (or its current limiting resistor, whichever is easiest to get at with the soldering iron), as it typically draws anything from 5mA to 25mA depending on which LEDs were cheap in the marked that day, and which resistors the manufacturer had already racked up in the pick and place machine. :D

This trick, coupled with low power modes on the CPU can extend the battery life from a few hours to weeks or even months.
- Andy Hull -

User avatar
Pito
Posts: 1690
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: 8-bit|16-bit parallell ILI9341

Post by Pito » Wed Oct 12, 2016 3:58 pm

Imagine somebody is designing a small pcb with an mcu consuming 15mA and with two leds 15mA each. That is a standard today - they use 220ohm resistors as they think an LED needs "20mA" as it is written in each LED datasheet :shock: I did replace the resistors on several boards already, I usally pick up something between 2k2 (blue side) - 4k7 (red side).
Pukao Hats Cleaning Services Ltd.

konczakp
Posts: 191
Joined: Thu Jul 14, 2016 4:17 pm

Re: 8-bit|16-bit parallell ILI9341

Post by konczakp » Sat Jan 14, 2017 3:40 pm

I have solved the problem with disconnecting serial while setting text size to 1 as in here: http://www.stm32duino.com/viewtopic.php ... 180#p17541. I discovered that this was not the only problem with this library for this screen. While using this lib with enrf24 lib for nrf24l01+ it was preventing from working properly with nrf24l01 (nrf24l01 was not receiving any signals). To get this working simply comment out line 60 in Adafruit_ILI9341_8bit_STM.cpp

Code: Select all

TFT_DATA->regs->BSRR = ((~c)<<16) | (c); //Set pins to the 8 bit number
and uncomment line 61

Code: Select all

TFT_DATA->regs->ODR = ((TFT_DATA->regs->ODR & 0xFF00) | ((c) & 0x00FF));//FF00 is Binary 1111111100000000
after that change line 131 in Adafruit_ILI9341_8bit_STM.h to

Code: Select all

#define write8special(c) { TFT_DATA->regs->ODR = ((TFT_DATA->regs->ODR & 0xFF00) | ((c) & 0x00FF)); WR_STROBE; }
Now everything should be working fine. In my case situation with disconnecting has stopped. I hope this will help someone having the same problem.

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

Re: 8-bit|16-bit parallell ILI9341

Post by VadimEL » Thu Apr 27, 2017 12:47 pm

I buy SPFD5408, but i found what is S6D0154.
Do not buy fakes :D

S6D0154 -> TFT8K3654
http://uploads.ru/9PXAb.jpg

SPFD5408-> CK241_REV0.1
http://s0.uploads.ru/t/9PXAb.jpg

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) 01 54	ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00	Manufacturer ID
reg(0x0009) 00 1E 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 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

aster
Posts: 116
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: 8-bit|16-bit parallell ILI9341

Post by aster » Wed Aug 30, 2017 7:19 am

sorry but 25 pages are too much to be read, i just received a display with ili9341
Image
(found on google immage)

i tried the library from stevstrong
https://github.com/stevstrong/Adafruit_ ... 8bit_STM32

but i didn't manage to make it working
i used the connection in the Adafruit_TFTLCD_8bit_STM32.h file and for the SPI:
TFT_RS PA2
TFT_CS PA3
TFT_RST PB10
MOSI PA7
SCK PA5
LED +3.3V
MISO PA6

i didn't connect the touch part and DC pin, since i don't know where i should wire them

and what are these?
TFT_WR PA1
TFT_RD PA0

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

Re: 8-bit|16-bit parallell ILI9341

Post by stevestrong » Wed Aug 30, 2017 7:36 am

You are posting in the wrong thread.
Your display has an SPI interface, and not an 8 bit parallel one.
So you should use this lib: https://github.com/rogerclarkmelbourne/ ... LI9341_STM
Maybe also relevant: viewtopic.php?f=9&t=2425

User avatar
RogerClark
Posts: 7537
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: 8-bit|16-bit parallell ILI9341

Post by RogerClark » Wed Aug 30, 2017 7:37 am

You didnt wire up D/C

aster
Posts: 116
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: 8-bit|16-bit parallell ILI9341

Post by aster » Wed Aug 30, 2017 2:31 pm

stevestrong wrote:
Wed Aug 30, 2017 7:36 am
You are posting in the wrong thread.
Your display has an SPI interface, and not an 8 bit parallel one.
So you should use this lib: https://github.com/rogerclarkmelbourne/ ... LI9341_STM
Maybe also relevant: viewtopic.php?f=9&t=2425
not only i posted in the wrong thread but also i have been so stupid to not notice that the library i was looking for was already in the repo :shock:
now i am using your library thanks
it worked and compiled immediately, for some reason i can't use PA4 as CS but i think this is an already know problem

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

Re: 8-bit|16-bit parallell ILI9341

Post by stevestrong » Wed Aug 30, 2017 2:42 pm

aster wrote:
Wed Aug 30, 2017 2:31 pm
for some reason i can't use PA4 as CS but i think this is an already know problem
Problem? Where?
I always use PA4 as CS without any problem...

aster
Posts: 116
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: 8-bit|16-bit parallell ILI9341

Post by aster » Wed Aug 30, 2017 3:50 pm

stevestrong wrote:
Wed Aug 30, 2017 2:42 pm
Problem? Where?
I always use PA4 as CS without any problem...
i think that i read that it had problem with sdfat, i am not sure

I don't know i tried to connect cs to PA4 and it didn't work then using another pin it worker

Code: Select all

#define DC_pin PA1
#define RST_pin PA0
#define CS_pin PA2
/*
  CS PA4
  SCK PA5
  MISO PA6
  MOSI PA7
*/
Adafruit_ILI9341_STM tft(CS_pin, DC_pin, RST_pin); // input chip select, DC and reset pins
using this works, instead using:

Code: Select all

#define CS_pin PA4
not

Post Reply