• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A 'packed' 5x7 Font Table (for Nokia 5110)

Mike - K8LH

Well-Known Member
Thread starter #1
Anyone want to take a peek at example code to implement a 'packed' font array (table)? I borrowed the idea from a Gentleman over on the PicBasicPro forum.

My old 96 character 5x7 font table used 5 words of program memory to store 5 (7-bit) bytes of pattern data for each character and the entire table used 480 words of program memory. My new table packs two 7-bit patterns in each 14-bit memory word and uses three words per character for a total of 288 words of program memory.

This is a demo program for a 16F1823 and a Nokia 5110 display written in BoostC. I haven't tested it on hardware yet but it simulates ok. It's reasonably tight code (452 words total) but it's also pretty rude-n'-crude with only the simplest functions to write commands, data, ascii characters, and ascii strings to the display. I haven't even had a chance to add a clear-screen function.

If I have time I'll try to make an XC8 version of the program.

Cheerful regards, Mike

C:
  /********************************************************************
   *                                                                  *
   *  Project: Nokia 5110 16F1823 Demo                                *
   *   Source: Nokia_5110_16F1823_Demo.c                              *
   *   Author: Mike McLaren, K8LH                                     *
   *  (C)2013: Micro Application Consultants                          *
   *     Date: 29-Nov-2013, Revised: 18-May-2018                      *
   *                                                                  *
   *   First experiment driving a Nokia 5110 LCD display.  revised    *
   *   to use a packed 14-bit 'word' size font table/array.           *
   *                                                                  *
   *                                                                  *
   *      IDE: MPLAB 8.84 (tabs = 4)                                  *
   *     Lang: SourceBoost BoostC v7.05, Lite/Free version            *
   *                                                                  *
   ********************************************************************/
 
   #include <system.h>
   #pragma DATA _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _MCLRE_ON
   #pragma DATA _CONFIG2, _PLLEN_OFF & _LVP_OFF
   #pragma CLOCK_FREQ 8000000       // 8 MHz INTOSC

  /********************************************************************
   *  function prototypes                                             *
   ********************************************************************/

  /********************************************************************
   *  typedef and defines                                             *
   ********************************************************************/

   #define rst porta.0          // RA0 = 5110 'reset'
   #define dat porta.1          // RA1 = 5110 'din'
   #define clk porta.2          // RA2 = 5110 'clk'
   #define ce  portc.0          // RC0 = 5110 'ce'
   #define dc  portc.1          // RC1 = 5110 'dc'

  /********************************************************************
   *  variables and the Nokia 5110 packed 5x7 font array              *
   ********************************************************************/

   #pragma DATA 1024,           // packed 96 character 5x7 font array
     0x0000, 0x0000, 0x0000,    // 20 ' '
     0x0000, 0x2F80, 0x0000,    // 21 '!'
     0x0007, 0x0007, 0x0000,    // 22 '"'
     0x0A7F, 0x0A7F, 0x0A00,    // 23 '#'
     0x122A, 0x3FAA, 0x0900,    // 24 '$'
     0x1193, 0x0464, 0x3100,    // 25 '%'
     0x1B49, 0x2AA2, 0x2800,    // 26 '&'
     0x0005, 0x0180, 0x0000,    // 27 '''
     0x001C, 0x1141, 0x0000,    // 28 '(' fixed
     0x0041, 0x111C, 0x0000,    // 29 ')' fixed
     0x0A08, 0x1F08, 0x0A00,    // 2A '*'
     0x0408, 0x1F08, 0x0400,    // 2B '+'
     0x0050, 0x1800, 0x0000,    // 2C ','
     0x0408, 0x0408, 0x0400,    // 2D '-'
     0x0060, 0x3000, 0x0000,    // 2E '.' fixed
     0x1010, 0x0404, 0x0100,    // 2F '/'
     0x1F51, 0x24C5, 0x1F00,    // 30 '0'
     0x0042, 0x3FC0, 0x0000,    // 31 '1'
     0x2161, 0x28C9, 0x2300,    // 32 '2'
     0x10C1, 0x22CB, 0x1880,    // 33 '3'
     0x0C14, 0x097F, 0x0800,    // 34 '4'
     0x13C5, 0x22C5, 0x1C80,    // 35 '5'
     0x1E4A, 0x24C9, 0x1800,    // 36 '6'
     0x00F1, 0x0485, 0x0180,    // 37 '7'
     0x1B49, 0x24C9, 0x1B00,    // 38 '8'
     0x0349, 0x24A9, 0x0F00,    // 39 '9'
     0x0036, 0x1B00, 0x0000,    // 3A ':'
     0x0056, 0x1B00, 0x0000,    // 3B ';'
     0x0414, 0x1141, 0x0000,    // 3C '<'
     0x0A14, 0x0A14, 0x0A00,    // 3D '='
     0x0041, 0x1114, 0x0400,    // 3E '>'
     0x0101, 0x2889, 0x0300,    // 3F '?'
     0x1949, 0x3CC1, 0x1F00,    // 40 '@'
     0x3F11, 0x0891, 0x3F00,    // 41 'A'
     0x3FC9, 0x24C9, 0x1B00,    // 42 'B'
     0x1F41, 0x20C1, 0x1100,    // 43 'C'
     0x3FC1, 0x20A2, 0x0E00,    // 44 'D'
     0x3FC9, 0x24C9, 0x2080,    // 45 'E'
     0x3F89, 0x0489, 0x0080,    // 46 'F'
     0x1F41, 0x24C9, 0x3D00,    // 47 'G'
     0x3F88, 0x0408, 0x3F80,    // 48 'H'
     0x0041, 0x3FC1, 0x0000,    // 49 'I'
     0x1040, 0x20BF, 0x0080,    // 4A 'J'
     0x3F88, 0x0A22, 0x2080,    // 4B 'K'
     0x3FC0, 0x2040, 0x2000,    // 4C 'L'
     0x3F82, 0x0602, 0x3F80,    // 4D 'M'
     0x3F84, 0x0410, 0x3F80,    // 4E 'N'
     0x1F41, 0x20C1, 0x1F00,    // 4F 'O'
     0x3F89, 0x0489, 0x0300,    // 50 'P'
     0x1F41, 0x28A1, 0x2F00,    // 51 'Q'
     0x3F89, 0x0CA9, 0x2300,    // 52 'R'
     0x2349, 0x24C9, 0x1880,    // 53 'S'
     0x0081, 0x3F81, 0x0080,    // 54 'T'
     0x1FC0, 0x2040, 0x1F80,    // 55 'U'
     0x0FA0, 0x2020, 0x0F80,    // 56 'V'
     0x1FC0, 0x1C40, 0x1F80,    // 57 'W'
     0x3194, 0x0414, 0x3180,    // 58 'X'
     0x0388, 0x3808, 0x0380,    // 59 'Y'
     0x30D1, 0x24C5, 0x2180,    // 5A 'Z'
     0x007F, 0x20C1, 0x0000,    // 5B '['
     0x0104, 0x0410, 0x1000,    // 5C '\'
     0x0041, 0x20FF, 0x0000,    // 5D ']'
     0x0202, 0x0082, 0x0200,    // 5E '^'
     0x2040, 0x2040, 0x2000,    // 5F '_'
     0x0001, 0x0104, 0x0000,    // 60 '`'
     0x1054, 0x2A54, 0x3C00,    // 61 'a'
     0x3FC8, 0x2244, 0x1C00,    // 62 'b'
     0x1C44, 0x2244, 0x1000,    // 63 'c'
     0x1C44, 0x2248, 0x3F80,    // 64 'd'
     0x1C54, 0x2A54, 0x0C00,    // 65 'e'
     0x047E, 0x0481, 0x0100,    // 66 'f'
     0x0652, 0x2952, 0x1F00,    // 67 'g'
     0x3F88, 0x0204, 0x3C00,    // 68 'h'
     0x0044, 0x3EC0, 0x0000,    // 69 'i'
     0x1040, 0x223D, 0x0000,    // 6A 'j'
     0x3F90, 0x1444, 0x0000,    // 6B 'k'
     0x0041, 0x3FC0, 0x0000,    // 6C 'l'
     0x3E04, 0x0C04, 0x3E00,    // 6D 'm' ????
     0x3E08, 0x0204, 0x3E00,    // 6E 'n' ????
     0x1C44, 0x2244, 0x1C00,    // 6F 'o'
     0x3E14, 0x0A14, 0x0400,    // 70 'p'
     0x0414, 0x0A18, 0x3E00,    // 71 'q'
     0x3E08, 0x0204, 0x0400,    // 72 'r'
     0x2454, 0x2A54, 0x1000,    // 73 's'
     0x023F, 0x2240, 0x1000,    // 74 't'
     0x1E40, 0x2020, 0x3E00,    // 75 'u'
     0x0E20, 0x2020, 0x0E00,    // 76 'v'
     0x1E40, 0x1840, 0x1E00,    // 77 'w'
     0x2228, 0x0828, 0x2200,    // 78 'x'
     0x0650, 0x2850, 0x1E00,    // 79 'y'
     0x2264, 0x2A4C, 0x2200,    // 7A 'z'
     0x0008, 0x1B41, 0x0000,    // 7B '{'
     0x0000, 0x3F80, 0x0000,    // 7C '|'
     0x0041, 0x1B08, 0x0000,    // 7D '}'
     0x0808, 0x0410, 0x0400,    // 7E '~'
     0x3C46, 0x20C6, 0x3C00     // 7F ' '


  /********************************************************************
   *  functions                                                       *
   ********************************************************************/
   void putlcd(char data)       //
   { unsigned char n = 8;       //
     ce = 0;                    // spi enable
     do                         //
     { clk = 0; dat = 0;        //
       if(data.7) dat = 1;      //
       clk = 1; data <<= 1;     //
     } while(--n);              //
     ce = 1;                    // spi enable off
   }                            //

  /********************************************************************
   *                                                                  *
   ********************************************************************/
   void RdFlash()               // bank 3 (inserted by compiler)
   { asm bcf     _eecon1,CFGS   // not 'config' memory            |03
     asm bsf     _eecon1,EEPGD  // select 'program' memory        |03
     asm bsf     _eecon1,RD     // initiate read operation        |03
     asm nop                    // required nop                   |03
     asm nop                    //  "                             |03
     asm incf    _eeadrl,F      // bump EEADR                     |03
     asm btfsc   _status,Z      //  "                             |03
     asm incf    _eeadrh,F      //  "                             |03
     asm rlf     _eedatl,W      // move b7 into Carry             |03
     asm rlf     _eedath,W      // wreg = the 7 bit hi byte       |03
     asm bcf     _eedatl,7      // eedatl = the 7 bit lo byte     |03
   }                            //

  /********************************************************************
   *                                                                  *
   ********************************************************************/
   void WrChar(char ascii)      // WrChar() for packed 5x7 font
   { asm movf    _ascii,W       // ascii char value, 32..127      |00
     asm addlw   -32            // minus table offset             |00
     asm movwf   _ascii         // font array index, 0..95        |00
 /*                                                                   *
  *  multiply index by 3 (0..95 -> 0..285), add table base address,   *
  *  and stuff the result in the EEADR register pair.                 *
  *                                                                   */
     asm lslf    _wreg,W        // wreg = (ascii-32)*2            |00
     asm addwf   _ascii,W       // wreg = (ascii-32)*3            |00
  // asm movlb   3              // bank 3 (inserted by compiler)  |03
     asm movwf   _eeadrl        // flash address lo               |03
     asm movlw   1024/256       // table address hi               |03
     asm btfsc   _status,C      // overflow? no, skip, else       |03
     asm addlw   1              // bump value                     |03
     asm movwf   _eeadrh        // flash address hi               |03
 /*                                                                   *
  *  read 3 words (6 bytes) of font pattern data from the packed      *
  *  5x7 font array and write them to the Nokia 5110 LCD.             *
  *                                                                   */
     for(char i=0; i<3; i++)    //
     { RdFlash();               // read one word (2 bytes)
       putlcd(wreg);            // send hi byte
       putlcd(eedatl);          // send lo byte
     }                          //
   }                            //

  /********************************************************************
   *                                                                  *
   ********************************************************************/
   void WrChar(rom char *data)  // overload function for strings
   { char ndx = 0;              //
     while(data[ndx++])         // while not end-of-string
       WrChar(wreg);            //
   }                            //

  /********************************************************************
   *  main init                                                       *
   ********************************************************************/
   void main()
   { ansela = 0;                // adc off for digital I/O
     anselc = 0;                //  "
     trisa = 0;                 // porta all outputs except RA3/MCLR
     trisc = 0;                 // portc all outputs
     ce = 1;                    // 5110 'ce' off
     rst = 1;                   // 5110 'rst' off
     osccon = 0b01110000;       // set INTOSC to 8 MHz
 /*                                                                   *
  *  initialize Nokia 5110 LCD display                                *
  *                                                                   */
     delay_ms(30);              //
     rst = 0;                   // 5110 'reset' pulse
     rst = 1;                   //
     dc = 0;                    // command mode
     putlcd(0x20+0x01);         // function set: extended instructions
     putlcd(0x80+0x48);         // set Vop (contrast), 0..127
     putlcd(0x04+0x02);         // set temperature coefficient, 0..3
     putlcd(0x10+0x03);         // Set bias system, 0..7
     putlcd(0x20+0x00);         // function set: standard instructions
     putlcd(0x08+0x04);         // display control: normal mode
     putlcd(0x80+0x20);         // set DDRAM X address, 0..83
     putlcd(0x40+0x02);         // set DDRAM Y address, 0..5
     dc = 1;                    // data mode

     WrChar("Hello");           // test string overload function

  /********************************************************************
   *  main loop                                                       *
   ********************************************************************/
     while(1)                   //
     {
     }
   }
 
Last edited:

Mike - K8LH

Well-Known Member
Thread starter #2
I also created a spreadsheet to convert my old 5-byte-per-character font table to the 'packed' 3 word format and added a crude single character viewer/editor, if anyone is interested. The packed output file can be formatted for assembler or C. I also added a 'Font Viewer' sheet to the workbook that renders the character set directly from the 5-byte-per-character input table.

Cheerful regards, Mike

5x7 Font Packer #2.png

Font Viewer 5x7.png
 
Last edited:

Mike - K8LH

Well-Known Member
Thread starter #3
Here's a version written for XC8 (and 16F1823). Much like the BoostC program in post #1, the low level drivers are assembly code. The program uses 370 words of program memory, including the font table. Some differences from the BoostC example in post #1;

() This version uses a smaller 240 word 96 character font table that packs 5 bytes per character of font data into 2.5 words of program memory.
() This version includes a clear screen function.
() This version drives the Nokia 5110 display using hardware SPI.

Cheerful regards, Mike
 

Attachments

Last edited:

gophert

Active Member
#6
Yes, I have a 5110 display and both the BoostC program in post #1 and the XC8 program in post #3 have been tested on the display (Vcc = 3.3v). Here's the XC8 program running;

View attachment 113489
Looks good. I read the first few posts that you simulated it - nice to see you built a working version.
I also read that Nokia re-released the 3310. Maybe 5110 is next (Ha).
 

granddad

Active Member
#7
So I just got a 5110 display, but not got time to play at the moment. any suggestions for a hookup to a PIC24 circuit wise please.
 

gophert

Active Member
#8
So I just got a 5110 display, but not got time to play at the moment. any suggestions for a hookup to a PIC24 circuit wise please.
I just used a simple bit bang spi so you just need one output pin to each 5110 pin. I used a small npn Transistor to power the LED backlight and controlled the backlight from another output pin on the micro (to npn base pin). My project was only a proof of concept so nothing fancy (yet)
 

Mike - K8LH

Well-Known Member
Thread starter #9
Hi, granddad... I bit-banged an SPI driver in my original BoostC demo and I used the hardware SPI peripheral on the XC8 demo. Both demos were for a 16F1823 running at 8-MHz on 3.3 volts.

Now I'm trying to bring up a 0.91-inch 128x32 OLED display with integrated SSD1306 driver IC and an I2C interface. After studying the datasheet and looking at some examples on the internet, it seems I might be able to use my packed 5x7 font with this display but it's so darned tiny I think I may have to resort to using it as a 2-line display with a larger 10x14 font. Perhaps something similar to the font below...

Cheerful regards, Mike

Font Viewer 10x14 (small).png
 

Mike - K8LH

Well-Known Member
Thread starter #10
I did get the SSD1306 128x32 I2C OLED display up-n'-runnin' on a 16F1823 with a "minimal" XC8 program (very limited features) and a 5x7 font. Nice display... It might be a nice display for a key-chain domino calculator...

SSD1306 #1.jpg
 
Last edited:

Pommie

Well-Known Member
Most Helpful Member
#11
I needed a nice font for a 32x8 LED display I'm playing with so I just unpacked your font and it works very well. I may use four of these to make a 64x16 display which would work very well with a 14x10 font. Where did you find that font as it's perfect.

Mike.
 

Mike - K8LH

Well-Known Member
Thread starter #12
Hi Mike. That 10x14 font is one of many found on this page from Noritake-Itron; http://www.noritake-itron.com/Softview/fontspic.htm

The font came as 1920 'retlw' statements (ouch) and the characters were defined with bit 0 at the bottom and bit 15 at the top of each character so I used the following JustBASIC program to convert it into something I could import into Excel;

Code:
'
'  Noritake Font Table Converter    30-May-2018, Mike McLaren
'
'  Reads the 1920 line one-hex-byte-at-a-time Noritake Font file and
'  reformats it as 96 lines (one line per character), 10-words-per-line,
'  reversed bit order (row 0 = bit 0), and as CSV text for Excel import.
'  Does not alter the source file.
'
'  Instructions
'
'  1 - select the Noritake 10x14 text file from the File Dialog
'  2 - output text displayed in console window
'  3 - select text and copy to clipboard using <ctrl-C> or <edit> <copy>
'  4 - paste into your spreadsheet (use text import tool)
'
'  JustBASIC v1.01
'
   filedialog "Source File?", "*.txt", fileName$            '
   output$ = "hex"                                          ' select "dec" or "hex"
   if fileName$ <> "" then                                  '
     open fileName$ for input as #f                         '
     while eof(#f) > -1                                     '
       for asciichar = 32 to 127                            ' 96 characters (32..127)
         for n = 1 to 10                                    ' 10 words per line
         '
         ' read in an MSB and an LSB line ('       retlw   0x00') and turn them into
         ' a single decimal or hexidecimal word ('0x0000' or '00000') with a comma
         ' delimiter for CSV (comma separated value) import into Excel.
         '
           line input #f, aLine$: line input #f, bLine$     '
         '
         ' reverse bit order...  Noritake uses row 0 = b15 but we want row 0 = b0
         '
           dec = hexdec(aLine$+right$(bLine$,2))            ' convert hex to decimal
           dec = xcgbits(dec)                               ' exchange bit order
         '
           if (output$ = "dec") then                        ' if "dec" output
         '   dec = hexdec(aLine$+right$(bLine$,2))          ' convert hex to dec
             if (dec < 10000) then print " ";               ' print "dec" value
             if (dec < 1000) then print " ";                '  "
             if (dec < 100) then print " ";                 '  "
             if (dec < 10) then print " ";                  '  "
             print dec;                                     '  "
           else                                             ' else
             print "0x";                                    '
             print dechex$(dec);                            ' print "hex" value
         '   print right$(aLine$,4);                        ' print "hex" value
         '   print right$(bLine$,2);                        '  "
           end if                                           '
           print ", ";                                      ' print separator
           if (n = 10) then                                 ' if last word in line
             if (asciichar < 100) then print " ";           ' print ascii, 32..127
             print asciichar;: print " ";                   '  "
             print "'";:print chr$(asciichar);: print "'"   ' print ascii character
           end if                                           '
         next n                                             ' next word
       next asciichar                                       ' next character line
       print                                                '
     wend                                                   '
     close #f                                               '
   end if                                                   '
   end
'
' Converts hexadecimal number (string) to decimal number.
' Processes the hex number from right to left, so any hex notation is allowed.
' Examples: &hFF = 0xFF = FF
'
function hexdec(HexString$)
  Hex$ = "0123456789ABCDEF"
  power = 0
  hexdec = 0
  for i = len(HexString$) to 1 step -1
    HexDigit$ = upper$(mid$(HexString$, i, 1))
  '
  ' exit at first non-hexadecimal digit
  '
    if instr(Hex$, HexDigit$) = 0 then exit for
    hexdec = hexdec + ((instr(Hex$, HexDigit$) - 1) * (16^power))
    power = power + 1
  next
end function
'
' convert decimal number to 4-digit hexidecimal string
'
function dechex$(DecValue)
  Hex$ = "0123456789ABCDEF"
  dechex$ = ""
  for power = 3 to 0 step -1
    digitndx = int(DecValue/16^power)
    DecValue = DecValue - digitndx*16^power
    dechex$ = dechex$ + mid$(Hex$,digitndx+1,1)
  next power
end function
'
' reverse bit order b15<>b0, b14<>b1, b13<>b2, ...
'
function xcgbits(decval)
  xcgbits = 0
  newpwr = 0
  for power = 15 to 0 step -1
    if (decval >= 2^power) then
      decval = decval - 2^power
      xcgbits = xcgbits + 2^newpwr
    end if
    newpwr = newpwr + 1
  next power
end function
Now that I have it in Excel I can edit and view it and copy an ASM or C formatted version of it to the clip-board.
Code:
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,  //  32 ' '
    0x0000, 0x0000, 0x0000, 0x0000, 0x33FF, 0x33FF, 0x0000, 0x0000, 0x0000, 0x0000,  //  33 '!'
    0x0000, 0x0000, 0x000F, 0x000F, 0x0000, 0x0000, 0x000F, 0x000F, 0x0000, 0x0000,  //  34 '"'
    0x0330, 0x0330, 0x3FFF, 0x3FFF, 0x0330, 0x0330, 0x3FFF, 0x3FFF, 0x0330, 0x0330,  //  35 '#'
    0x0630, 0x0E78, 0x0CFC, 0x0CCC, 0x3FFF, 0x3FFF, 0x0CCC, 0x0FCC, 0x079C, 0x0318,  //  36 '$'
    0x0006, 0x300F, 0x3C0F, 0x0F06, 0x03C0, 0x00F0, 0x183C, 0x3C0F, 0x3C03, 0x1800,  //  37 '%'
    0x0F3C, 0x1FFE, 0x38C3, 0x31E3, 0x33F3, 0x373B, 0x1E1E, 0x0C0C, 0x3F00, 0x3300,  //  38 '&'
    0x0000, 0x0000, 0x0000, 0x0022, 0x0037, 0x001F, 0x000E, 0x0000, 0x0000, 0x0000,  //  39 '''
    0x0000, 0x0000, 0x03F0, 0x0FFC, 0x1E1E, 0x1806, 0x3003, 0x3003, 0x0000, 0x0000,  //  40 '('
    0x0000, 0x0000, 0x3003, 0x3003, 0x1806, 0x1E1E, 0x0FFC, 0x03F0, 0x0000, 0x0000,  //  41 ')'
    0x0630, 0x0770, 0x03E0, 0x01C0, 0x1FFC, 0x1FFC, 0x01C0, 0x03E0, 0x0770, 0x0630,  //  42 '*'
    0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x0FFC, 0x0FFC, 0x00C0, 0x00C0, 0x00C0, 0x00C0,  //  43 '+'
    0x2200, 0x3700, 0x1F00, 0x0E00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,  //  44 ','
    0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,  //  45 '-'
    0x1800, 0x3C00, 0x3C00, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,  //  46 '.'
    0x0000, 0x3000, 0x3C00, 0x0F00, 0x03C0, 0x00F0, 0x003C, 0x000F, 0x0003, 0x0000,  //  47 '/'
    0x0FFC, 0x1FFE, 0x3F07, 0x3383, 0x31C3, 0x30E3, 0x3073, 0x383F, 0x1FFE, 0x0FFC,  //  48 '0'
    0x0000, 0x0000, 0x300C, 0x300E, 0x3FFF, 0x3FFF, 0x3000, 0x3000, 0x0000, 0x0000,  //  49 '1'
    0x300C, 0x380E, 0x3C07, 0x3E03, 0x3703, 0x3383, 0x31C3, 0x30E7, 0x307E, 0x303C,  //  50 '2'
    0x0C0C, 0x1C0E, 0x3807, 0x3003, 0x3003, 0x30C3, 0x30C3, 0x38C7, 0x1FFE, 0x0F3C,  //  51 '3'
    0x03C0, 0x03E0, 0x0370, 0x0338, 0x031C, 0x030E, 0x3FFF, 0x3FFF, 0x0300, 0x0300,  //  52 '4'
    0x0C3F, 0x1C3F, 0x3833, 0x3033, 0x3033, 0x3033, 0x3033, 0x3873, 0x1FE3, 0x0FC3,  //  53 '5'
    0x0FFC, 0x1FFE, 0x38C7, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x39C7, 0x1F8E, 0x0F0C,  //  54 '6'
    0x0003, 0x0003, 0x0003, 0x0003, 0x3FC3, 0x3FE3, 0x0073, 0x003B, 0x001F, 0x000F,  //  55 '7'
    0x0F3C, 0x1FFE, 0x39E7, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x39E7, 0x1FFE, 0x0F3C,  //  56 '8'
    0x003C, 0x007E, 0x30E7, 0x30C3, 0x38C3, 0x1CC3, 0x0EC3, 0x07E7, 0x03FE, 0x01FC,  //  57 '9'
    0x0000, 0x0000, 0x0000, 0x0618, 0x0F3C, 0x0F3C, 0x0618, 0x0000, 0x0000, 0x0000,  //  58 ':'
    0x0000, 0x0000, 0x0000, 0x2218, 0x373C, 0x1F3C, 0x0E18, 0x0000, 0x0000, 0x0000,  //  59 ';'
    0x0000, 0x00C0, 0x01E0, 0x03F0, 0x0738, 0x0E1C, 0x1C0E, 0x3807, 0x3003, 0x0000,  //  60 '<'
    0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330,  //  61 '='
    0x0000, 0x3003, 0x3807, 0x1C0E, 0x0E1C, 0x0738, 0x03F0, 0x01E0, 0x00C0, 0x0000,  //  62 '>'
    0x000C, 0x000E, 0x0007, 0x0003, 0x3783, 0x37C3, 0x00C3, 0x0067, 0x007E, 0x003C,  //  63 '?'
    0x0F0C, 0x1F8E, 0x39C7, 0x30C3, 0x3FC3, 0x3FC3, 0x3003, 0x3807, 0x1FFE, 0x0FFC,  //  64 '@'
    0x3FFC, 0x3FFE, 0x0307, 0x0303, 0x0303, 0x0303, 0x0303, 0x0307, 0x3FFE, 0x3FFC,  //  65 'A'
    0x3FFF, 0x3FFF, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x39E7, 0x1FFE, 0x0F3C,  //  66 'B'
    0x0FFC, 0x1FFE, 0x3807, 0x3003, 0x3003, 0x3003, 0x3003, 0x3807, 0x1C0E, 0x0C0C,  //  67 'C'
    0x3FFF, 0x3FFF, 0x3003, 0x3003, 0x3003, 0x3003, 0x3003, 0x3807, 0x1FFE, 0x0FFC,  //  68 'D'
    0x3FFF, 0x3FFF, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x3003, 0x3003,  //  69 'E'
    0x3FFF, 0x3FFF, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x0003, 0x0003,  //  70 'F'
    0x0FFC, 0x1FFE, 0x3807, 0x3003, 0x3003, 0x30C3, 0x30C3, 0x38C7, 0x1FCE, 0x0FCC,  //  71 'G'
    0x3FFF, 0x3FFF, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x3FFF, 0x3FFF,  //  72 'H'
    0x0000, 0x0000, 0x3003, 0x3003, 0x3FFF, 0x3FFF, 0x3003, 0x3003, 0x0000, 0x0000,  //  73 'I'
    0x0C00, 0x1C00, 0x3803, 0x3003, 0x3003, 0x3803, 0x1FFF, 0x0FFF, 0x0003, 0x0003,  //  74 'J'
    0x3FFF, 0x3FFF, 0x01E0, 0x01E0, 0x03F0, 0x0738, 0x0E1C, 0x1C0E, 0x3807, 0x3003,  //  75 'K'
    0x3FFF, 0x3FFF, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000,  //  76 'L'
    0x3FFF, 0x3FFF, 0x000E, 0x001C, 0x00F8, 0x00F8, 0x001C, 0x000E, 0x3FFF, 0x3FFF,  //  77 'M'
    0x3FFF, 0x3FFF, 0x0038, 0x0070, 0x00E0, 0x01C0, 0x0380, 0x0700, 0x3FFF, 0x3FFF,  //  78 'N'
    0x0FFC, 0x1FFE, 0x3807, 0x3003, 0x3003, 0x3003, 0x3003, 0x3807, 0x1FFE, 0x0FFC,  //  79 'O'
    0x3FFF, 0x3FFF, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00E7, 0x007E, 0x003C,  //  80 'P'
    0x0FFC, 0x1FFE, 0x3807, 0x3003, 0x3303, 0x3703, 0x3E03, 0x1C07, 0x3FFE, 0x37FC,  //  81 'Q'
    0x3FFF, 0x3FFF, 0x00C3, 0x01C3, 0x01C3, 0x03C3, 0x03C3, 0x0EE7, 0x3C7E, 0x383C,  //  82 'R'
    0x183C, 0x387E, 0x30E7, 0x30C3, 0x30C3, 0x30C3, 0x30C3, 0x39C3, 0x1F87, 0x0F06,  //  83 'S'
    0x0003, 0x0003, 0x0003, 0x0003, 0x3FFF, 0x3FFF, 0x0003, 0x0003, 0x0003, 0x0003,  //  84 'T'
    0x0FFF, 0x1FFF, 0x3800, 0x3000, 0x3000, 0x3000, 0x3000, 0x3800, 0x1FFF, 0x0FFF,  //  85 'U'
    0x03FF, 0x07FF, 0x0E00, 0x1C00, 0x3800, 0x3800, 0x1C00, 0x0E00, 0x07FF, 0x03FF,  //  86 'V'
    0x0FFF, 0x1FFF, 0x3800, 0x3C00, 0x1F00, 0x1F00, 0x3C00, 0x3800, 0x1FFF, 0x0FFF,  //  87 'W'
    0x3C0F, 0x3E1F, 0x0738, 0x03F0, 0x01E0, 0x01E0, 0x03F0, 0x0738, 0x3E1F, 0x3C0F,  //  88 'X'
    0x003F, 0x007F, 0x00E0, 0x01C0, 0x3F80, 0x3F80, 0x01C0, 0x00E0, 0x007F, 0x003F,  //  89 'Y'
    0x3C03, 0x3E03, 0x3703, 0x3383, 0x31C3, 0x30E3, 0x3073, 0x303B, 0x301F, 0x300F,  //  90 'Z'
    0x0000, 0x0000, 0x3FFF, 0x3FFF, 0x3003, 0x3003, 0x3003, 0x0000, 0x0000, 0x0000,  //  91 '['
    0x000C, 0x000C, 0x0030, 0x0030, 0x00C0, 0x00C0, 0x0300, 0x0300, 0x0C00, 0x0C00,  //  92 '\'
    0x0000, 0x0000, 0x3003, 0x3003, 0x3003, 0x3FFF, 0x3FFF, 0x0000, 0x0000, 0x0000,  //  93 ']'
    0x0030, 0x0038, 0x001C, 0x000E, 0x0007, 0x0007, 0x000E, 0x001C, 0x0038, 0x0030,  //  94 '^'
    0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000,  //  95 '_'
    0x0000, 0x0000, 0x0003, 0x0007, 0x000E, 0x001C, 0x0018, 0x0000, 0x0000, 0x0000,  //  96 '`'
    0x0C00, 0x1E60, 0x3F70, 0x3330, 0x3330, 0x3330, 0x3330, 0x3370, 0x3FE0, 0x1FC0,  //  97 'a'
    0x3FFF, 0x3FFF, 0x30C0, 0x30C0, 0x30C0, 0x30C0, 0x30C0, 0x39C0, 0x1F80, 0x0F00,  //  98 'b'
    0x0FC0, 0x1FE0, 0x3870, 0x3030, 0x3030, 0x3030, 0x3030, 0x3870, 0x1CE0, 0x0CC0,  //  99 'c'
    0x0F00, 0x1F80, 0x39C0, 0x30C0, 0x30C0, 0x30C0, 0x30C0, 0x30C0, 0x3FFF, 0x3FFF,  // 100 'd'
    0x0FC0, 0x1FE0, 0x3B70, 0x3330, 0x3330, 0x3330, 0x3330, 0x3B70, 0x1BE0, 0x09C0,  // 101 'e'
    0x0000, 0x00C0, 0x3FFC, 0x3FFE, 0x00C7, 0x00C7, 0x000E, 0x000C, 0x0000, 0x0000,  // 102 'f'
    0x18C0, 0x39E0, 0x33F0, 0x3330, 0x3330, 0x3330, 0x3330, 0x3B30, 0x1FF0, 0x0FE0,  // 103 'g'
    0x3FFF, 0x3FFF, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x01C0, 0x3F80, 0x3F00, 0x0000,  // 104 'h'
    0x0000, 0x0000, 0x0000, 0x0000, 0x3FD8, 0x3FD8, 0x0000, 0x0000, 0x0000, 0x0000,  // 105 'i'
    0x0000, 0x0C00, 0x1C00, 0x3800, 0x3000, 0x3000, 0x3800, 0x1FF3, 0x0FF3, 0x0000,  // 106 'j'
    0x0000, 0x3FFF, 0x3FFF, 0x0700, 0x0780, 0x0FC0, 0x1CE0, 0x3870, 0x3030, 0x0000,  // 107 'k'
    0x0000, 0x0000, 0x3003, 0x3003, 0x3FFF, 0x3FFF, 0x3000, 0x3000, 0x0000, 0x0000,  // 108 'l'
    0x3FF0, 0x3FF0, 0x0070, 0x00E0, 0x03C0, 0x03C0, 0x00E0, 0x0070, 0x3FF0, 0x3FF0,  // 109 'm'
    0x3FF0, 0x3FF0, 0x00C0, 0x00E0, 0x0070, 0x0030, 0x0030, 0x0070, 0x3FE0, 0x3FC0,  // 110 'n'
    0x0FC0, 0x1FE0, 0x3870, 0x3030, 0x3030, 0x3030, 0x3030, 0x3870, 0x1FE0, 0x0FC0,  // 111 'o'
    0x3FF0, 0x3FF0, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x03F0, 0x01E0, 0x00C0,  // 112 'p'
    0x00C0, 0x01E0, 0x03F0, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x3FF0, 0x3FF0,  // 113 'q'
    0x3FF0, 0x3FF0, 0x01C0, 0x00E0, 0x0070, 0x0030, 0x0030, 0x0070, 0x00E0, 0x00C0,  // 114 'r'
    0x18C0, 0x39E0, 0x33F0, 0x3330, 0x3330, 0x3330, 0x3330, 0x3F30, 0x1E70, 0x0C60,  // 115 's'
    0x0000, 0x0030, 0x0030, 0x0FFF, 0x1FFF, 0x3830, 0x3830, 0x1C30, 0x0C30, 0x0000,  // 116 't'
    0x0FF0, 0x1FF0, 0x3800, 0x3000, 0x3000, 0x3000, 0x3000, 0x3800, 0x1FF0, 0x0FF0,  // 117 'u'
    0x03F0, 0x07F0, 0x0E00, 0x1C00, 0x3800, 0x3800, 0x1C00, 0x0E00, 0x07F0, 0x03F0,  // 118 'v'
    0x0FF0, 0x1FF0, 0x3800, 0x3800, 0x1F00, 0x1F00, 0x3800, 0x3800, 0x1FF0, 0x0FF0,  // 119 'w'
    0x3030, 0x3870, 0x1CE0, 0x0FC0, 0x0780, 0x0780, 0x0FC0, 0x1CE0, 0x3870, 0x3030,  // 120 'x'
    0x0030, 0x0070, 0x30E0, 0x39C0, 0x1F80, 0x0F80, 0x01C0, 0x00E0, 0x0070, 0x0030,  // 121 'y'
    0x3030, 0x3830, 0x3C30, 0x3E30, 0x3730, 0x33B0, 0x31F0, 0x30F0, 0x3070, 0x3030,  // 122 'z'
    0x0000, 0x00C0, 0x01E0, 0x0FFC, 0x1F3E, 0x3807, 0x3003, 0x3003, 0x3003, 0x0000,  // 123 '{'
    0x30C0, 0x30C0, 0x3FFC, 0x3FFE, 0x30C7, 0x30C3, 0x3003, 0x3007, 0x300E, 0x300C,  // 124 '|'
    0x0000, 0x3003, 0x3003, 0x3003, 0x3807, 0x1F3E, 0x0FFC, 0x01E0, 0x00C0, 0x0000,  // 125 '}'
    0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,  // 126 '~'
    0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF,  // 127 ''
Have fun. Cheerful regards, Mike

SSD1306 #2.jpg
 

Attachments

Last edited:

Latest threads

EE World Online Articles

Loading

 
Top