Custom font additions using Character based OLED, besides CGRAM

matchbox

Senior Member
Is it possible to load a custom 5 x 8 font or graphics to an Character mode OLED display. Parallel connection?
I have not had any luck in Character mode so far. I thought I better ask before wasting any more time at what might not be possible.

Thanks
 
Last edited:

AllyCat

Senior Member
Hi,

You need to find the Data Sheet for the "Display Controller" Integrated Circuit. Many are based on the "Hitachi" HD44780 , for example in the AXE133/4(Y). That allocates ASCII characters 0 - 7 to "User Definable" bitmaps (which are repeated in locations 8 -15). Those characters could be re-written "on the fly", but you probably won't find a much larger definable set capability, because the (main) point of a character generator is that contains a (relatively) large area of ROM, not RAM.

Cheers, Alan.
 

matchbox

Senior Member
Thanks Alan. I thought that might be the case.
I was hoping to do a few sets of custom symbols etc. But I also wasn't limiting it to that, if I could do more.

I thought of doing as you suggested. i.e. re-defining the ASCII characters 0 - 7 , when it changes to the subroutine that needs a different symbol.
 

PhilHornby

Senior Member
I did something like this, to define a Ω sign and a pointer for a HD44780-based display ...

Rich (BB code):
LCD.CreateChar:

      b0 = 0 * 8 | $40                    ; Program User Defined Character 0
      GOSUB LCDSendCommand

      b0 = %01110 : GOSUB LCDSendData    ;  ### 
      b0 = %10001 : GOSUB LCDSendData    ; #   #
      b0 = %10001 : GOSUB LCDSendData    ; #   #
      b0 = %10001 : GOSUB LCDSendData    ; #   #
      b0 = %10001 : GOSUB LCDSendData    ;  # # 
      b0 = %01010 : GOSUB LCDSendData    ;  # #
      b0 = %01010 : GOSUB LCDSendData    ; #   #
      b0 = %11011 : GOSUB LCDSendData    ;   

      b0 = 1* 8 | $40                     ; Program User Defined Character 1
      GOSUB LCDSendCommand

      b0 = %00000 : GOSUB LCDSendData    ; .....    
      b0 = %01000 : GOSUB LCDSendData    ; .x...   
      b0 = %01100 : GOSUB LCDSendData    ; .xx..
      b0 = %01110 : GOSUB LCDSendData    ; .xxx.
      b0 = %01111 : GOSUB LCDSendData    ; .xxxx
      b0 = %01110 : GOSUB LCDSendData    ; .xxx.
      b0 = %01100 : GOSUB LCDSendData    ; .xx..
      b0 = %01000 : GOSUB LCDSendData    ; .x...
 
      b0 = %10000000 : gosub LCDSendCommand ; Re-select DDRAM 

      return
(Where are LCDSendData and LCDSendCommand are customised to your hardware)

I also stole the ideas from here: http://woodsgood.ca/projects/2015/01/16/large-numbers-on-small-displays/

to produce the following output:-

IMG_20210707_125344_edit_318873760677384.jpg

so you can do quite a lot with only 8 custom characters :)
 

matchbox

Senior Member
Thanks Phil for the idea and link. Its alway inspiring to see how other people go about doing things.
 
Top