Spark Logic

8-bit|16-bit parallell ILI9341

andreas_ferm

Good day everyone, I’m all new to stm32 and have previously only done smaller projects on arduiono boards, mostly using already-finished libraries.

Now I reached a point where my programmings skills lack, so instead of optimizing my code i started to look at maple mini and thought it would be excellent to also add a “nice” GUI to my project.

I ended up ordering a chinese 3.2″ tft+touch+sd card combo, but what i didn’t know or think of beforehand was to check the connectivity needed (i just read here and saw all the included libraries for the aforementioned display controller), but all of them are using SPI. So the display came in the mail and i became aware that it didn’t have any SPI interface, (at least not for the display, only for the touch and sd card)

Are there any working options that is available to use with stm32duino? What would be my best chance of getting this to work? (i was initially thinking about going for a MEGA, but choose the maple mini clone as i was impressed with the various tft demos i’ve seen )

I’ve tried looking through “all” of the internet, but have only found small pointers, and none of the really targeted for stm32duino. (i found one post where someone had posted an utft version with support for stm32, which was based on some teensy port, but it was also done for SPI only, and i couldn’t find any ILI9341 tft ‘drivers’ for parallel communication… well there was one for an ILI9481 but i’m not sure if that can be used in direct replacement.

Anyone has a similar display and has it working with a maple mini?

Thanks!
Andreas

Replies20

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).

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
TFT_DATA->regs->BSRR = ((~c)<<16) | (c); //Set pins to the 8 bit number

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

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 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

RogerClark Wed Aug 30, 2017 7:37 am

You didnt wire up D/C

aster Wed Aug 30, 2017 2:31 pm

[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

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 Wed Aug 30, 2017 2:42 pm

[aster – 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 Wed Aug 30, 2017 3:50 pm

[stevestrong – 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

#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

aster Thu Aug 31, 2017 4:37 pm

wow, with more than 30 pins i choose the only one which wouldn’t work :lol:

i am happy my bad luck helped you spotted a small error in the library
by the way the problem with PA4 i was referring was this: viewtopic.php?f=44&p=33802#p33802 but looks like it was solved time ago
Now i thinks it is better to stop spamming this thread and maybe an admin could move these last post in the correct one

MakcYan Thu Oct 26, 2017 5:36 am

stevestrong
Hello.
I can not initialize the display ili9431 16-bit. Only the white screen appears.
Tell me please what I’m doing wrong?

Use the stm32f103c8t6 blue board + Arduino IDE 1.8.4 + Arduino_STM32 + library Adafruit_TFTLCD_16bit_STM32 (//#define USE_FSMC 1 in Adafruit_TFTLCD_16bit_STM32.h) + the sketch
Connection:
D0…D15 – PB0…15 (PB2 – removed the jumper and connected to pin)
WR, RS, CS – PA1,PA2,PA3
RST – PC15
RD – connected to 3.3v and GND

If I use the library Adafruit_ILI9341_8bit_STM (iwalpola) with recommended connection pins, the image appears, but only used the blue color and its shades.

P.S.
Wrote the text using google translate from Russian language

MakcYan Thu Oct 26, 2017 2:40 pm

[stevestrong – Thu Oct 26, 2017 8:38 am] –
2. In line https://github.com/stevstrong/Adafruit_ … M32.h#L149
replace Adafruit_GFX by “Adafruit_GFX_AS“

Do you get any warnings during build?

In file included from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:7:0:

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\src/Adafruit_TFTLCD_16bit_STM32.h:149:60: error: expected class-name before '{' token

class Adafruit_TFTLCD_16bit_STM32 : public Adafruit_GFX_AS {

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'void setup()':

graphicstest:20: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

Serial.print("TFT size is "); Serial.print((uint16_t)tft.width()); Serial.print("x"); Serial.println((uint16_t)tft.height());

^

graphicstest:20: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

Serial.print("TFT size is "); Serial.print((uint16_t)tft.width()); Serial.print("x"); Serial.println((uint16_t)tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testText()':

graphicstest:179: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setCursor'

tft.setCursor(0, 0);

^

graphicstest:180: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextColor'

tft.setTextColor(WHITE); tft.setTextSize(1);

^

graphicstest:180: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextSize'

tft.setTextColor(WHITE); tft.setTextSize(1);

^

graphicstest:181: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("Hello World!");

^

graphicstest:182: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextColor'

tft.setTextColor(YELLOW); tft.setTextSize(2);

^

graphicstest:182: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextSize'

tft.setTextColor(YELLOW); tft.setTextSize(2);

^

graphicstest:183: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println(1234.56);

^

graphicstest:184: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextColor'

tft.setTextColor(RED); tft.setTextSize(3);

^

graphicstest:184: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextSize'

tft.setTextColor(RED); tft.setTextSize(3);

^

graphicstest:185: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println(0xDEADBEEF, HEX);

^

graphicstest:186: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println();

^

graphicstest:187: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextColor'

tft.setTextColor(GREEN);

^

graphicstest:188: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextSize'

tft.setTextSize(5);

^

graphicstest:189: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("Groop");

^

graphicstest:190: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextSize'

tft.setTextSize(2);

^

graphicstest:191: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("I implore thee,");

^

graphicstest:192: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'setTextSize'

tft.setTextSize(1);

^

graphicstest:193: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("my foonting turlingdromes.");

^

graphicstest:194: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("And hooptiously drangle me");

^

graphicstest:195: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("with crinkly bindlewurdles,");

^

graphicstest:196: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("Or I will rend thee");

^

graphicstest:197: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("in the gobberwarts");

^

graphicstest:198: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("with my blurglecruncheon,");

^

graphicstest:199: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'println'

tft.println("see if I don't!");

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testLines(uint16_t)':

graphicstest:206: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

w = tft.width(),

^

graphicstest:212: error: 'h' was not declared in this scope

y2 = h - 1;

^

graphicstest:214: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

graphicstest:216: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

graphicstest:225: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

graphicstest:227: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

graphicstest:236: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

graphicstest:238: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

graphicstest:247: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

graphicstest:249: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawLine'

for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testFastLines(uint16_t, uint16_t)':

graphicstest:256: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

int x, y, w = tft.width(), h = tft.height();

^

graphicstest:260: error: 'h' was not declared in this scope

for(y=0; y<h; y+=5) tft.drawFastHLine(0, y, w, color1);

^

graphicstest:261: error: 'h' was not declared in this scope

for(x=0; x<w; x+=5) tft.drawFastVLine(x, 0, h, color2);

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testRects(uint16_t)':

graphicstest:269: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

cx = tft.width() / 2,

^

In file included from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish.h:60:0,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/Arduino.h:30,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:1:

graphicstest:273: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:35: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:273: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:39: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:273: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:43: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:273: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:47: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:277: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawRect'

tft.drawRect(cx-i2, cy-i2, i, i, color);

^

graphicstest:277: error: 'cy' was not declared in this scope

tft.drawRect(cx-i2, cy-i2, i, i, color);

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testFilledRects(uint16_t, uint16_t)':

graphicstest:286: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

cx = tft.width() / 2 - 1,

^

In file included from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish.h:60:0,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/Arduino.h:30,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:1:

graphicstest:290: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:35: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:290: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:39: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:290: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:43: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:290: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

n = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:47: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:294: error: 'cy' was not declared in this scope

tft.fillRect(cx-i2, cy-i2, i, i, color1);

^

graphicstest:297: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawRect'

tft.drawRect(cx-i2, cy-i2, i, i, color2);

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testFilledCircles(uint8_t, uint16_t)':

graphicstest:305: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2;

^

graphicstest:309: error: 'r2' was not declared in this scope

for(x=radius; x<w; x+=r2) {

^

graphicstest:310: error: 'h' was not declared in this scope

for(y=radius; y<h; y+=r2) {

^

graphicstest:311: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'fillCircle'

tft.fillCircle(x, y, radius, color);

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testCircles(uint8_t, uint16_t)':

graphicstest:321: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

w = tft.width() + radius,

^

graphicstest:328: error: 'h' was not declared in this scope

for(y=0; y<h; y+=r2) {

^

graphicstest:329: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawCircle'

tft.drawCircle(x, y, radius, color);

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testTriangles()':

graphicstest:338: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

int n, i, cx = tft.width() / 2 - 1,

^

In file included from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish.h:60:0,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/Arduino.h:30,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:1:

graphicstest:342: error: 'cy' was not declared in this scope

n = min(cx, cy);

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:39: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:345: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawTriangle'

tft.drawTriangle(

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testFilledTriangles()':

graphicstest:357: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

int i, cx = tft.width() / 2 - 1,

^

In file included from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish.h:60:0,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/Arduino.h:30,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:1:

graphicstest:362: error: 'cy' was not declared in this scope

for(i=min(cx,cy); i>10; i-=5) {

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:39: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:364: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'fillTriangle'

tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,

^

graphicstest:367: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawTriangle'

tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testRoundRects()':

graphicstest:377: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

cx = tft.width() / 2 - 1,

^

In file included from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish.h:60:0,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/Arduino.h:30,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:1:

graphicstest:381: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

w = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:35: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:381: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

w = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:39: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:381: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

w = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:43: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:381: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

w = min(tft.width(), tft.height());

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:47: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:385: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'drawRoundRect'

tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 0, 0));

^

graphicstest:385: error: 'cy' was not declared in this scope

tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 0, 0));

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino: In function 'long unsigned int testFilledRoundRects()':

graphicstest:394: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

cx = tft.width() / 2 - 1,

^

In file included from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish.h:60:0,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/Arduino.h:30,

from C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:1:

graphicstest:399: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

for(i=min(tft.width(), tft.height()); i>20; i-=6) {

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:35: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:399: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

for(i=min(tft.width(), tft.height()); i>20; i-=6) {

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:39: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:399: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

for(i=min(tft.width(), tft.height()); i>20; i-=6) {

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:43: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:399: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'height'

for(i=min(tft.width(), tft.height()); i>20; i-=6) {

^

C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\cores\maple/wirish_math.h:108:47: note: in definition of macro 'min'

#define min(a,b) ((a)<(b)?(a):(b))

^

graphicstest:401: error: 'class Adafruit_TFTLCD_16bit_STM32' has no member named 'fillRoundRect'

tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0));

^

graphicstest:401: error: 'cy' was not declared in this scope

tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0));

^

Используем библиотеку Adafruit_TFTLCD_16bit_STM32-master версии 1.0.0 из папки: C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_TFTLCD_16bit_STM32-master
Используем библиотеку Adafruit_GFX_AS в папке: C:\Users\MAKC-admin\Desktop\arduino-1.8.4\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_GFX_AS (legacy)
exit status 1
'class Adafruit_TFTLCD_16bit_STM32' has no member named 'width'

stevestrong Thu Oct 26, 2017 5:33 pm

OK, so 2. that was a bad idea.
Change it back, please.

Have you tried 1.?

MakcYan Thu Oct 26, 2017 5:59 pm

point 1 I tried, then I 2 a point used.
After a point 1 on a display nothing appeared(

vegfokic Thu Oct 26, 2017 6:58 pm

Hello MakcYan

I also have white screen with 16 bit library from Steve.
Did you checked the serial monitor?
My serial monitor prints out the test result just the lcd white.

stevestrong Thu Oct 26, 2017 7:26 pm

I think there is a simple reason why it is not working: there is bug here: https://github.com/stevstrong/Adafruit_ … M32.h#L138 :mrgreen:
Please replace 0x44444444 by 0x33333333, in both places.
Mode value 4 means input floating, value 3 means output 50MHz.

So the line should look like:
#define setWriteDir() { TFT_DATA_PORT->regs->CRL = 0x33333333; TFT_DATA_PORT->regs->CRH = 0x33333333; } // set the bits as output

MakcYan Fri Oct 27, 2017 2:32 pm

[stevestrong – Thu Oct 26, 2017 7:26 pm] –
I think there is a simple reason why it is not working: there is bug here: https://github.com/stevstrong/Adafruit_ … M32.h#L138 :mrgreen:
Please replace 0x44444444 by 0x33333333, in both places.
Mode value 4 means input floating, value 3 means output 50MHz.

So the line should look like:
#define setWriteDir() { TFT_DATA_PORT->regs->CRL = 0x33333333; TFT_DATA_PORT->regs->CRH = 0x33333333; } // set the bits as output

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

Post a reply