ST7735
-
- Valued Contributor
- Posts: 988
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 517 times
-
- Valued Contributor
- Posts: 988
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 517 times
Re: ST7735
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.
-
- Valued Contributor
- Posts: 988
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 517 times
Re: ST7735
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...
Martin
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...
Martin
-
- Valued Contributor
- Posts: 988
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 517 times
Re: ST7735
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
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
-
- Valued Contributor
- Posts: 988
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 517 times
Re: ST7735
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
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
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 88 times