Page 2 of 5

Re: ST7735

Posted: Mon Feb 21, 2022 7:31 pm
by mnfisher
I'll take a look at that too....

Re: ST7735

Posted: Mon Feb 21, 2022 10:12 pm
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

Re: ST7735

Posted: Mon Feb 21, 2022 10:57 pm
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.

Re: ST7735

Posted: Tue Feb 22, 2022 6:10 am
by WingNut
Great Martin

Re: ST7735

Posted: Wed Feb 23, 2022 11:11 am
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 87 times
Martin

Re: ST7735

Posted: Wed Feb 23, 2022 11:27 am
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

Re: ST7735

Posted: Wed Feb 23, 2022 11:45 am
by WingNut
Downloaded but how do i use it in my project?

Re: ST7735

Posted: Wed Feb 23, 2022 12:21 pm
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

Re: ST7735

Posted: Wed Feb 23, 2022 3:00 pm
by WingNut
I'll have a go tonight when I get home

Re: ST7735

Posted: Wed Feb 23, 2022 6:06 pm
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