GLCD SH1106 - and a new approach - and ATTiny85

Use this section to discuss your embedded Flowcode projects.
Post Reply
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

Flowcode v10 GLCD SH1106 - and a new approach - and ATTiny85

Post by mnfisher »

Having played with the GLCD_SH1106 component. I had a couple of ideas.

Firstly - writing the display data for the entire display is quicker for i2c and SPI displays.
Using this approach also means that display drivers are easier to write - the 'Copy' or Display macro does most of the work - also need an Initialise which seem to come in two varieties. Displays such as the ST7789 need delays whereas other like the SH1108 all the data can be sent in one transaction.

Then you need Plot - (the SH1106 has a paged layout that isn't the same as some others for example)
+ a couple of support macros (send command / send data)

Then an idea from working with the Sinclair TV81. Most of these displays need a chunk of RAM to work - for example 1040 bytes buffer for the SH1106. This means displays are out of reach of MCUs with smaller amounts of RAM.
However, an alternative approach is to use a character mapped display. This - for the SH1106 and with an 8x8 character set needs just 128 bytes to store the display data.

I had to rotate the character set to use - but here is a 'Tiny' friendly SH1106 setup. Here it displays 'Hello world' then random characters over the whole display.

Obviously this doesn't allow graphics - but for simple data output should be sufficient (and if you are keen you can assign graphics characters to some of the characters - just like the olden days :-) )

Despite the name - tested on Arduino Nano... There's nothing processor specific.
attiny85_glcd.fcfx
(27.51 KiB) Downloaded 220 times
Edit - fixed the Print routine... Clear before turning on display (less jarring) and deleted some unused variables.

Martin

Post Reply