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).
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.
;
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")
I have the feeling, though, that this must have been already covered.
;