PDA

View Full Version : SSD1306 Inverse screen example?



wjsmarine
- 27th January 2024, 05:21
Hi All,

I see Richard's Include posts thread has been closed, hence my starting a new one on the subject.

Can anyone offer an example of Inverting sections (or the screen) for this handy LCD? The Include also mentions "Flip display vertically" so any insight how to do this would be a bonus.

Thanks and regards,
Bill

richard
- 27th January 2024, 07:17
hi bill
not really sure what a "closed thread" means to us forum users, if it can't be added to then that seems a shame

the short answer is you wont find any examples because is can't be done with a pic16 for a number of reasons;
namely the display has no data read back function with i2c i/f.
a pic 16 cannot support an array large enough for a frame buffer .

you could invert a characters font data but not fit it in a nice neat box, the box would always wind up exactly the vertical size of the chr
and that looks crappy. there is no good way around that that i can think of

this does all that and more but is pic18 only
https://www.picbasic.co.uk/forum/showthread.php/24218-Graphical-Displays-with-PBP3
post#82 has latest ssd1306 code

Ioannis
- 27th January 2024, 19:38
Hi All,

I see Richard's Include posts thread has been closed...

Hi Bill.

Please post the link of the thread you see as closed.

Ioannis

richard
- 27th January 2024, 22:40
Please post the link of the thread you see as closed.

i see it too as closed

https://www.picbasic.co.uk/forum/showthread.php/23758-SSD1306-INCLUDE-for-PBP3

wjsmarine
- 28th January 2024, 03:52
Thanks Richard,

Apart from that shortcoming, it works brilliantly with a PIC16.

My main aim was to maximise capabilities of the screen and secondly to gain attention to the observer as an alarm condition. I achieved the attention part by flashing the whole screen using:

if UVflag = 1 then ' Undervoltage.
gosub glcd_init ' Located in ssd1306_I2C.INC
pause 200
endif

and it works well whenever the flag is set, you've done a good job.

Thanks and regards,
Bill

richard
- 28th January 2024, 04:20
to invert entire display
SSDC $A7
to restore it USE
SSDC $A6


I was thinking

9567