Fast display ST7789!

Moderator: Benj

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Fast display ST7789!

Post by jgu1 »

Seemed to be a nice fast color display. And cheap. Is it hard/difficult to add FC8?

Look here: https://www.youtube.com/watch?v=-nECx4DOE84

Br Jorgen

chad
Posts: 198
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 27 times
Been thanked: 33 times
Contact:

Re: Fast display ST7789!

Post by chad »

I agree I just ordered one. When I get it I will start bugging Ben to see if he can get a driver going.

Chad

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

I have one in my 'toy box' - got it working from the adafruit code - and it looks very good - so will offer my assistance too.

Martin

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

First contact..

Connected up to a Nano - and Adafruit library didn't work at all. (I'm sure it did previously but on a Mega - so maybe a memory issue?)

So tried the https://github.com/cbm80amiga/Arduino_ST7789_Fast library - and after a little fiddling - an Amiga ball sprung onto the screen (for retro fans)

Using a level shifter - D13 to SCL, D11 to SDA, D8 to RES, D7 to DC, 3.3v to VCC and GND (of course) BLK can be left floating or pulled to ground for off (note if pulled high pull to 3.3V not 5V)

Neat little display!!

As an aside - this would be a cool project to try with Ben's interface board??

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

Hi All!

Sound¨s good Martin. Hopefully MM guy´s will accept your offer and create a component macro for this display. As soon we know, I will order a couble. ( can use it for my Wireless rs232 :wink: )

Br Jorgen

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

I was thinking a community effort would be good here :)

But, made a start. Initialisation set up yesterday evening today hopefully will get something 'displayed' even if it's just changing the screen colour!

Will need some testing too!

Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

Ok Matin, Nice.

Try to look here, rally full speed :D

https://www.youtube.com/watch?v=OOvzmHcou4E

Jorgen

chad
Posts: 198
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 27 times
Been thanked: 33 times
Contact:

Re: Fast display ST7789!

Post by chad »

Mine are still on the slow boat. That full speed test looks great! ALL of the graphics FC drivers are slooow. I am using a 64x128 i2c black and white oled for testing now and it is slow. I tried it on an Arduino and it is many times faster. I am running it on a 64mhz chip and have the i2c cranked to 1mhz.

Ben was working on a new graphics display a while ago. Don't know what happened to that.

Chad

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Fast display ST7789!

Post by Benj »

Hi All,

I've had a quick go at creating a component for this display.

Here you can find the built component, you need to copy this file into your "C:\ProgramData\MatrixTSL\FlowcodeV8\Components" folder.
gLCD_ST7789.fcpx
(10.91 KiB) Downloaded 268 times

The folder is hidden by default so simply paste the address into the address of your file explorer.

Let me know how you get on, if it works ok then I'll post it via the update system.

Here is the library that I based the code on.
https://github.com/ananevilya/Arduino-ST7789-Library

Also here is the component source project which might be useful if there are any problems or if you want to have a crack at supporting other displays.
glcd_ST7789.fcfx
(136.81 KiB) Downloaded 231 times
ALL of the graphics FC drivers are slooow. I am using a 64x128 i2c black and white oled for testing now and it is slow. I tried it on an Arduino and it is many times faster.
Which display are you using Chad, maybe we can have a look and speed it up for you.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

Wow Ben, Thank´s. I will immediately order some at Ebay. Hopefully Martin (Mnf) wil test, he have one. :D

Again thank´s.

jorgen

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

Thanks Ben,

That's sure easier than rolling our own!

Martin

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

Doesn't immediately work on a Nano...

Display clears so looks like initialisation is occurring but Print ("Hello World" of course) did nothing - nor did changing the foreground colour and clearing the display..

Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Fast display ST7789!

Post by Benj »

Ok thanks, What about changing the BG colour and clearing the dispay?

Also have you tried changing the toggle CS Pin property to Yes to see if this makes any difference?

Maybe also try printing at a few different coordinates? I've already done a comp for this display in v9 and it has a big offset to the viewable area. Though you would probably see this with the clear function not clearing all the visible area.

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

Hi Ben,

Yes - tried that - and no joy. CS set to D10 and tried with and without (board has no CS) (but SPI likes it to be D10?)

Changing colours in properties (FG or BG) makes no difference either (though works correctly in the sim)

Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Fast display ST7789!

Post by Benj »

Thanks Martin,

Hopefully the attached will make a difference :) I think this is now more in line with working v9 component code so fingers crossed.

glcd_ST7789.fcfx
(136.06 KiB) Downloaded 203 times
gLCD_ST7789.fcpx
(10.88 KiB) Downloaded 199 times

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

Still no lights... I've got some more time to work with this next week - so I'll see if I can spot anything. Note that the Adafruit library doesn't work with the display I have but the 'fast' library mentioned above does - so it might be a subtle initialisation difference?

Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

Hi Ben and Martin!

Something new concerning the display (kindly). I expect to receive my display soon, look forward to test. :wink:

Thank´s in advance.

Br jorgen

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

Still no joy - my extra time vanished like the mist :(

Still on the list though!

Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

Hi Martin!

I see today that the display is add in the update, so maybe Ben (thank´s) have made some correction.

Unfortunately I have still not received my display. I know you have one, maybe you will test :wink:

I also create a testprogram while I wait I look forward to test.

Br Jorgen.
Attachments
St7789Test.fcfx
(11.3 KiB) Downloaded 173 times
st7789.PNG
st7789.PNG (10.22 KiB) Viewed 52809 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Fast display ST7789!

Post by Benj »

Hello,

I've now added the reset pin, made the CS pin optional and tried to follow the exact sequence from the Fast library.

Fingers crossed.
gLCD_ST7789.fcpx
(11.48 KiB) Downloaded 197 times
glcd_ST7789.fcfx
(142.39 KiB) Downloaded 200 times

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Fast display ST7789!

Post by mnf »

Thanks - will hopefully be able to try this evening...

Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

Hi Ben!

Thank´for update. I just made update from helpmeny and then made a testprogram with an Uno. But sorry not working.

Do I have to use the above FCPX file? Is it the same as in updatE? Edit, Well none of them work...

(Have keep my finger crossed :lol: )

Br Jorgee
Attachments
First test.fcfx
(8.26 KiB) Downloaded 187 times
Last edited by jgu1 on Thu Nov 12, 2020 6:03 pm, edited 1 time in total.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Fast display ST7789!

Post by Benj »

Hi Jorgen,

What about trying to toggle Backlight on and off, could be defaulting to off?

Any reaction on the dispay at all?

Yes the version on the update system is the same as the version here.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

Hi Ben!

Yes toggle backligth working. The only thing I can see is, If I first have programmed with Arduino IDE a testprogram, and then program with FC the screen is getting black, nothing else, well the bagligth toggle work.

I can send you a display if ok, I imagine it is easyer to get it working if you have one to do test. You can keep it jump on it or throw it away, but first when it work :lol: Let me hear.

Jorgen
Attachments
First testLedToggle.fcfx
(8.95 KiB) Downloaded 162 times

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Fast display ST7789!

Post by jgu1 »

:cry: :cry: :wink:

Jorgen :wink:

Post Reply