ST7735

Use this section to discuss your embedded Flowcode projects.
mnfisher
Valued Contributor
Posts: 953
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ST7735

Post by mnfisher »

I'll take a look at that too....

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: ST7735

Post by WingNut »

Soldered in an RTC module. Oddly enough the display updated every 2 seconds - change the font scaler to 2 and it updates every 7 seconds

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ST7735

Post by mnfisher »

Connected a logic analyser and took a look at the set up data sent by the Adafruit code - so a few tweaks needed to the init data. A busy day tomorrow at work - but hopefully be up and running on Wednesday 😀. If speed is similar to st7789 (and I expect it to be) then it should work very nicely.

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: ST7735

Post by WingNut »

Great Martin

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ST7735

Post by mnfisher »

Okay - now we are getting somewhere....

So - again running on an Arduino Nano - and with the display reset connected to the Nano's RST pin...

A quick demo - prints some text -waits 10s and then 'splots' random circles to the display..
It's not perfect (the display is 'odd' whilst data is transferring - not sure if this would be described as 'tearing' or just noise)
Text doesn't allow scaling (although Print suggests it does - it did in the st7789 component - but I left it out for the moment - do we want 'posh' fonts?) - and just uses my build in font :-) (Using the 8 bit font has the advantage that the code is kept very small and will run on 'say' an ATTiny85)
It also doesn't handle the 'bottom line' of the display correctly all the time..
It doesn't attempt to use rotations..

It's reasonably fast - there are a few 'optimisations' possible (one problem is that TransactionWrite also does a read and overwrites the data - I'm not sure it's worth having a bool 'read' parameter or a separate 'WriteWithRead' macro in CAl_SPI.. The CAL_SPI in FC v8 had a FOsc/2 prescaler - which has vanished in v9 (because it didn't work or by mistake??)

This targets the AZDelivery display - which is regarded by Adafruit as 'BlackTab' - but it can be extended to red / green / ST7789 fairly easily making the code more general...
st7735.fcfx
(69.65 KiB) Downloaded 78 times
Martin

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ST7735

Post by mnfisher »

Also - doesn't handle printing the background on text (although the code does) - I'm undecided whether Plot(x, y, colour) is better than Plot(x, y) - which plots using the foreground colour. Also Circle(x,y,r, colour) or Circle(x,y,r) - uses foreground etc...
Thoughts on preferred format here?

Circle sometimes draws a 'lozenge'??

I'm tempted to have a play with it's SD card next - copy image (any thoughts on format - for ST7789 I did various ReadBitmap routines that converted bitmap files to 16 bit.. I've also used a PC converter that just converts bitmaps to 16bit colour data files. Again - any preferences?

Martin

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: ST7735

Post by WingNut »

Downloaded but how do i use it in my project?

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ST7735

Post by mnfisher »

Just test as is for now - conversion to a component is a bit away yet...

Can you get it to work with the hardware you have...

The SD Card doesn't want to initialise - so struggling with that here... - now working but only with a separate (software) SPI channel (is there a problem with two devices sharing SPI? (separate CS lines)

What features do you need for your project??

Martin

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: ST7735

Post by WingNut »

I'll have a go tonight when I get home

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: ST7735

Post by WingNut »

No luck Martin. I had to change extended cpu to get it to compile and some minor changes to connections and MISO not used. Backlight appears to come on but nothing on the display
Attachments
st7735 (1).fcfx
(70.09 KiB) Downloaded 82 times

Post Reply