ST7789 display

For general Flowcode discussion that does not belong in the other sections.
Post Reply
BenR
Matrix Staff
Posts: 1763
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 449 times
Been thanked: 609 times

Re: ST7789 display

Post by BenR »

Hello,

Looks like your display pixel width and height properties might be mixed up. This might help with getting access to the rest of the display.

As for the striping that's interesting. I wonder if it's down to brightness or contrast settings etc.

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ST7789 display

Post by jandidden »

This post deleted
Last edited by jandidden on Sat Feb 25, 2023 12:10 pm, edited 3 times in total.

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ST7789 display

Post by jandidden »

The plot thickens. I can get the attached, which looks as advertised, with the following changes:

- swap the X and Y pixel defs in the display properties, AND make the x - number slightly larger than the display datasheet values. Display x = 320, y = 170, set properties to x = 205 and y = 320;

- set display orientation to 90deg CW (parameter = 1).

I tried all the other orientation and X-Y permutations, they all give wrapped line displays, with or without the hash area.

Jan Didden
Attachments
CW rot & x y swapped.jpg
CW rot & x y swapped.jpg (134.57 KiB) Viewed 1166 times

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ST7789 display

Post by jandidden »

Next up: color setting.
If I set all three forground colors to 0, I get a black image; with all colors set to 250, I get a white image.

But. Setting all background colors to 0 gives me a white background, and setting them all to 255 also gives me a white background.
Is this normal? If so, how do I get a black background?
FC9, ST7789 display.

Jan
Last edited by jandidden on Tue Feb 28, 2023 4:44 pm, edited 1 time in total.

medelec35
Matrix Staff
Posts: 1475
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 522 times
Been thanked: 477 times

Re: ST7789 display

Post by medelec35 »

After setting the new background colour, did you use ClearDisplay command straight after?
Martin

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ST7789 display

Post by jandidden »

Martin, I did it as separate compiles.
Once with the 0,0,0 and once with the 250,250,250. Each time started with an initialise, rotate display, clear display.

Jan

medelec35
Matrix Staff
Posts: 1475
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 522 times
Been thanked: 477 times

Re: ST7789 display

Post by medelec35 »

Can you post your fcfx project file please?
Martin

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ST7789 display

Post by jandidden »

Yes, here it is Martin.

Another question: the ESP controller has configureable pin pull up/pull downs:

Code: Select all

pinMode(PIN, INPUT_PULLUP); 
Do I use that in a C-block or is there some support for this in an FC9 macro?

Jan
Attachments
ESP32 wroom test.fcfx
(22.01 KiB) Downloaded 32 times

medelec35
Matrix Staff
Posts: 1475
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 522 times
Been thanked: 477 times

Re: ST7789 display

Post by medelec35 »

Hi.
I have just had a look and a ClearDisplay command has not been placed after Background colours.
Please see the attached modified project.

As for the ESP32 pin pull-ups, this post should help
Attachments
ESP32 wroom test medelec35.fcfx
(22.21 KiB) Downloaded 34 times
Martin

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ST7789 display

Post by jandidden »

Thanks Martin, that works.
What you probably got is that I want to display a soft keyboard, and then select characters with a couple of navigation buttons.
The character that is selected at any moment should reverse color to provide visual feedback to the user.
I'll work on that next.
Thanks for getting me going.

Jan

Post Reply