Large Text on 16 x 2 OLED display

lauriet

Member
Apologies if this HAS been covered before ...

As part of a larger project, I had a need to display a 'WAIT' message as large as possible on a 16x2 OLED display so spent many hours (days actually) exploring the forum, following up ideas, trying to understand datasheets, learning about CGRAM and graphics displays and any other straw I could clutch at.

When it dawned that one could only have 8 cgram characters and they could not be redefined, I tackled the problem from the other end and redined the message content into elemental strokes which could be used again and again, utilising the gap between charactersfor the message I required this surprisingly only needed 5 graphic shapes.
This is the code snippet I evolved (excuse any lack of sophistication).

Code:
pause 1000 ; wait for display to initialise
serout B.7, N2400, (254, 1);clears screen
pause 30
serout B.7, N2400, (254,64,16,16,16,16,16,16,16,16)     ; cgram 0
serout B.7, N2400, (254,72,1,1,1,1,1,1,1,1)                    ; cgram 1
serout B.7, N2400, (254,80,31,31,16,16,16,16,16,16)      ;cgram 2
serout B.7, N2400, (254,88,31,31,1,1,1,1,1,1)                 ; cgram 3
serout B.7, N2400, (254,96,17,17,17,17,17,17,31,31)      ; cgram 4

serout B.7,N2400,(254,128,1,0,1,0,1,2,3,0,1,0,3,2)
serout B.7,N2400,(254,192,1,4,4,0,1,2,3,0,1,0,1,0)
serout B.7, N2400,(" o o")
Attached (I hope) is a photo of the resulting display. It may be a bit basic, but I put it here in the forum as others may be stimulated to take the idea forward in creating graphic elements for letters required in their own displays, if this is useful.

I have the feeling, though, that this must have been already covered.

_1031768.jpg;
 

techElder

Well-known member
That is an interesting approach, lauriet. Don't stop now. Keep evolving the idea. Perhaps bring in the use of eeprom?
 

lauriet

Member
Thanks for the nice responses.

The code is just part of a larger project that I must crack on with, so I won't develop this any more (but will eventually put in the projects area).

But it is an interesting (school?) challenge to try and make the whole alphabet from 8 shapes, is it not? Brings in other areas of intellectual challenge.
 
Top