OLED Character Generator

For some of our modules we use an OLED graphic display to show status or menu choices. We designed a character generator for this so we can easily write text and symbols to the display.

The OLED display we use is from Raystar in Taiwan, type no. REA012864DWPP3N00003 and it uses a controller from Solomon Systech, SSD1306.

OLED character display

The display has a resolution of 128 x 64 pixels which is arranged as 128 columns and 8 pages, each of 8 pixels.

Each page is written a column at a time, incrementing from left to right. The MSB of the byte is the bottom pixel of the page.

OLED display page mapping

We chose a 12 pixel by 16 line character size. Horizontally this means we can display 10 characters with a 4 pixel margin each side (10 x 12 pixels = 120 pixels). Vertically each character uses two pages. In total we can therefore display 10 x 4 = 40 characters.

Our character ROM is 64 characters in size. This allows us to display the numbers 0-9, characters A-Z and a-z, a fullstop and a space. An additional ROM can be created for any additional symbols and characters that are needed. The Excel sheet below shows the 64 basic characters.

Excel file character generator

To write the characters to the OLED graphic display it is necessary to write them a column at a time for the 12 top columns of the character, and then to repeat the process for the page below. The character 'A' is shown below:

OLED character mapping

Each byte to be written is stored in a MIF file (Altera FPGA memory file) which may be downloaded here:

To find a character in the ROM use the Character Number from the Excel file and multiply it by 32. For example, character 'A' is number 10. 10 x 32 is 320. So the first byte to be written is byte 0 at location 320. The lower 12 columns of the character are put on a word boundary for convenience. So each character in the ROM uses 24 bytes of a 32 byte space.

This Excel file and MIF file provide a further 64 punctuation characters and symbols.

Excel file OLED display symbols

OLED display lower case characters

OLED display symbols

OLED display symbols



https://www.facebook.com/SingMaiSingMai YouTube pagehttps://www.linkedin.com/company/singmai

© SingMai Electronics Ltd. (2023)

All Rights Reserved.
No portion of this site may be copied, retransmitted, reposted, duplicated or otherwise used without the express written permission of SingMai Electronics Ltd.