Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] Issues with SSD1306 128x32 Oled Code.

Status
Not open for further replies.

RuneHansen

Junior Member level 1
Joined
Mar 3, 2012
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,293
Location
Denmark, Sjælland, Kalundborg
Activity points
1,398
Hey guys.

i have tried for some time now to get my project up and running, and its working fine, but the display font is the problem.
the one written in the program is 16x8 and it workes fine, but its too small for a display like the one im using.
im using the i2C 128x32 display with the SSD1306 driver.
the software im using is MikroC pro for Avr and the MCU is a Atmega328P

Here is the font that was created in "GLCD Font creater" Mikroe:

Code:
const code char Verdana11x11[][23] = {

        0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char
        0x03, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char !
        0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char "
        0x08, 0x00, 0x00, 0x40, 0x00, 0xC8, 0x01, 0x78, 0x00, 0xCE, 0x01, 0x78, 0x00, 0x4E, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char #
        0x06, 0x00, 0x00, 0x18, 0x01, 0x24, 0x01, 0xFF, 0x07, 0x24, 0x01, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char $
        0x0B, 0x00, 0x00, 0x0C, 0x00, 0x12, 0x00, 0x12, 0x00, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x00, 0xC6, 0x00, 0x20, 0x01, 0x20, 0x01, 0xC0, 0x00,  // Code for char %
        0x08, 0x00, 0x00, 0xEC, 0x00, 0x12, 0x01, 0x12, 0x01, 0x2C, 0x01, 0xC0, 0x00, 0xB0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char &
        0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char '
        0x04, 0x00, 0x00, 0xF8, 0x00, 0x06, 0x03, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char (
        0x04, 0x00, 0x00, 0x01, 0x04, 0x06, 0x03, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char )
        0x06, 0x00, 0x00, 0x0A, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char *
        0x08, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFC, 0x01, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char +
        0x03, 0x00, 0x00, 0x00, 0x04, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ,
        0x04, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char -
        0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char .
        0x05, 0x00, 0x03, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char /
        0x06, 0x00, 0x00, 0xFC, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 0
        0x06, 0x00, 0x00, 0x04, 0x01, 0x04, 0x01, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 1
        0x06, 0x00, 0x00, 0x84, 0x01, 0x42, 0x01, 0x22, 0x01, 0x12, 0x01, 0x0C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 2
        0x06, 0x00, 0x00, 0x84, 0x00, 0x02, 0x01, 0x12, 0x01, 0x12, 0x01, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 3
        0x06, 0x60, 0x00, 0x50, 0x00, 0x48, 0x00, 0x44, 0x00, 0xFE, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 4
        0x06, 0x00, 0x00, 0x9E, 0x00, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 5
        0x06, 0x00, 0x00, 0xF8, 0x00, 0x14, 0x01, 0x12, 0x01, 0x12, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 6
        0x06, 0x00, 0x00, 0x02, 0x00, 0x82, 0x01, 0x62, 0x00, 0x1A, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 7
        0x06, 0x00, 0x00, 0xEC, 0x00, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 8
        0x06, 0x00, 0x00, 0x1C, 0x00, 0x22, 0x01, 0x22, 0x01, 0xA2, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 9
        0x03, 0x00, 0x00, 0x00, 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char :
        0x03, 0x00, 0x00, 0x00, 0x04, 0x98, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ;
        0x07, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x50, 0x00, 0x50, 0x00, 0x88, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char <
        0x08, 0x00, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char =
        0x08, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x88, 0x00, 0x50, 0x00, 0x50, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char >
        0x05, 0x00, 0x00, 0x02, 0x00, 0x62, 0x01, 0x12, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ?
        0x09, 0x00, 0x00, 0xF8, 0x00, 0x04, 0x01, 0x72, 0x02, 0x8A, 0x02, 0x8A, 0x02, 0x7A, 0x02, 0x82, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char @
        0x07, 0x00, 0x00, 0xC0, 0x01, 0x78, 0x00, 0x46, 0x00, 0x46, 0x00, 0x78, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char A
        0x07, 0x00, 0x00, 0xFE, 0x01, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0x1C, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char B
        0x08, 0x00, 0x00, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char C
        0x08, 0x00, 0x00, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char D
        0x06, 0x00, 0x00, 0xFE, 0x01, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char E
        0x06, 0x00, 0x00, 0xFE, 0x01, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char F
        0x08, 0x00, 0x00, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x22, 0x01, 0x22, 0x01, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char G
        0x07, 0x00, 0x00, 0xFE, 0x01, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char H
        0x04, 0x00, 0x00, 0x02, 0x01, 0xFE, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char I
        0x04, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char J
        0x07, 0x00, 0x00, 0xFE, 0x01, 0x20, 0x00, 0x30, 0x00, 0x48, 0x00, 0x84, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char K
        0x06, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char L
        0x08, 0x00, 0x00, 0xFE, 0x01, 0x06, 0x00, 0x18, 0x00, 0x60, 0x00, 0x18, 0x00, 0x06, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char M
        0x07, 0x00, 0x00, 0xFE, 0x01, 0x06, 0x00, 0x18, 0x00, 0x60, 0x00, 0x80, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char N
        0x08, 0x00, 0x00, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char O
        0x06, 0x00, 0x00, 0xFE, 0x01, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char P
        0x08, 0x00, 0x00, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x84, 0x04, 0x78, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char Q
        0x07, 0x00, 0x00, 0xFE, 0x01, 0x22, 0x00, 0x22, 0x00, 0x62, 0x00, 0x9C, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char R
        0x07, 0x00, 0x00, 0x8C, 0x00, 0x12, 0x01, 0x12, 0x01, 0x22, 0x01, 0x22, 0x01, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char S
        0x07, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0xFE, 0x01, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char T
        0x07, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char U
        0x07, 0x00, 0x00, 0x0E, 0x00, 0x70, 0x00, 0x80, 0x01, 0x80, 0x01, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char V
        0x0A, 0x00, 0x00, 0x06, 0x00, 0x78, 0x00, 0x80, 0x01, 0x78, 0x00, 0x06, 0x00, 0x78, 0x00, 0x80, 0x01, 0x78, 0x00, 0x06, 0x00, 0x00, 0x00,  // Code for char W
        0x07, 0x00, 0x00, 0x86, 0x01, 0x48, 0x00, 0x30, 0x00, 0x30, 0x00, 0x48, 0x00, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char X
        0x07, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x08, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char Y
        0x07, 0x00, 0x00, 0x82, 0x01, 0x42, 0x01, 0x22, 0x01, 0x12, 0x01, 0x0A, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char Z
        0x04, 0x00, 0x00, 0xFF, 0x07, 0x01, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char [
        0x05, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char BackSlash
        0x04, 0x00, 0x00, 0x01, 0x04, 0x01, 0x04, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ]
        0x08, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ^
        0x07, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char _
        0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char `
        0x06, 0x00, 0x00, 0xC0, 0x00, 0x28, 0x01, 0x28, 0x01, 0x28, 0x01, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char a
        0x06, 0x00, 0x00, 0xFF, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char b
        0x06, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char c
        0x06, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char d
        0x06, 0x00, 0x00, 0xF0, 0x00, 0x28, 0x01, 0x28, 0x01, 0x28, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char e
        0x04, 0x08, 0x00, 0xFE, 0x01, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char f
        0x06, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x05, 0x08, 0x05, 0x08, 0x05, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char g
        0x06, 0x00, 0x00, 0xFF, 0x01, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char h
        0x02, 0x00, 0x00, 0xF9, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char i
        0x03, 0x00, 0x04, 0x08, 0x04, 0xF9, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char j
        0x06, 0x00, 0x00, 0xFF, 0x01, 0x40, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char k
        0x02, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char l
        0x0A, 0x00, 0x00, 0xF8, 0x01, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x00,  // Code for char m
        0x06, 0x00, 0x00, 0xF8, 0x01, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char n
        0x06, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char o
        0x06, 0x00, 0x00, 0xF8, 0x07, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char p
        0x06, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char q
        0x05, 0x00, 0x00, 0xF8, 0x01, 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char r
        0x05, 0x00, 0x00, 0x30, 0x01, 0x28, 0x01, 0x48, 0x01, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char s
        0x04, 0x08, 0x00, 0xFE, 0x00, 0x08, 0x01, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char t
        0x06, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xF8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char u
        0x06, 0x00, 0x00, 0x18, 0x00, 0x60, 0x00, 0x80, 0x01, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char v
        0x08, 0x00, 0x00, 0x78, 0x00, 0x80, 0x01, 0x60, 0x00, 0x18, 0x00, 0x60, 0x00, 0x80, 0x01, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char w
        0x06, 0x00, 0x00, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char x
        0x06, 0x00, 0x00, 0x08, 0x00, 0x70, 0x04, 0x80, 0x03, 0x70, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char y
        0x05, 0x00, 0x00, 0x88, 0x01, 0x48, 0x01, 0x28, 0x01, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char z
        0x06, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0xDE, 0x03, 0x01, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char {
        0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char |
        0x06, 0x00, 0x00, 0x01, 0x04, 0x01, 0x04, 0xDE, 0x03, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char }
        0x08, 0x00, 0x00, 0x60, 0x00, 0x10, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x40, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ~
        0x03, 0xFE, 0x01, 0x02, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   // Code for char 
        };


and here is the 8x16 font that works fine.

Code:
const code char SSD1306_Font8x16[][16] = {

  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0
  ......
  ...... 

   on and on. THIS FONT WORKS, but is too small :)

};

and here is the rest of the program :)

Code:
void SSD1306_Cmd( unsigned char temp ) {

  TWI_Start();
  TWI_Write( 0x78 );
  TWI_Write( 0x00 );
  TWI_Write( temp );
  TWI_Stop();

}

void SSD1306_Data( unsigned char temp ) {

  TWI_Start();
  TWI_Write( 0x78 );
  TWI_Write( 0x40 );
  TWI_Write( temp );
  TWI_Stop();

}

void SSD1306_Init() {

       OLED_RST = 0;
       OLED_RST1 = 0;
       Delay_ms(10);
       OLED_RST = 1;
       OLED_RST1 = 1;
       Delay_ms(10);
       
 SSD1306_Cmd(0xAE); // display off
 SSD1306_Cmd(0x00);
 SSD1306_Cmd(0x00);
 SSD1306_Cmd(0x40);
 SSD1306_Cmd(0x81);
 SSD1306_Cmd(0xCF);
 SSD1306_Cmd(0xA1);
 SSD1306_Cmd(0xC8);
 SSD1306_Cmd(0xA6);
 SSD1306_Cmd(0xA8);
 SSD1306_Cmd(0x3F);
 SSD1306_Cmd(0xD3);
 SSD1306_Cmd(0x00);
 SSD1306_Cmd(0xD5);
 SSD1306_Cmd(0x80);
 SSD1306_Cmd(0xD9);
 SSD1306_Cmd(0xF1);
 SSD1306_Cmd(0xDA);
 SSD1306_Cmd(0x12);
 SSD1306_Cmd(0xDB);
 SSD1306_Cmd(0x40);
 SSD1306_Cmd(0x20);
 SSD1306_Cmd(0x02);
 SSD1306_Cmd(0x8D);
 SSD1306_Cmd(0x14);
 SSD1306_Cmd(0xA4);
 SSD1306_Cmd(0xA6);
 SSD1306_Cmd(0xAF);
/*
SSD1306_Cmd( SSD1306_DISPLAYOFF ); //Display Off
SSD1306_Cmd( SSD1306_SETMULTIPLEXRATIO ); //Multiplex Ratio
SSD1306_Cmd( 0x3F );
SSD1306_Cmd( SSD1306_SETDISPLAYOFFSET ); //Display Offset
SSD1306_Cmd( 0x00 );
SSD1306_Cmd( SSD1306_SETSTARTLINE ); //Display Start Line
SSD1306_Cmd( SSD1306_SEGREMAP | 0x01 );
SSD1306_Cmd( SSD1306_COMSCANDEC ); //COM Output Scan Direction
SSD1306_Cmd( SSD1306_SETCOMPINS ); //COM Pins Hardware Configuration
SSD1306_Cmd( 0x12 );
SSD1306_Cmd( SSD1306_SETCONTRAST ); //Contrast Control
SSD1306_Cmd( 255 );
SSD1306_Cmd( SSD1306_ENTIREDISPLAYON_RESUME ); //Entire Display On/Off
SSD1306_Cmd( SSD1306_NORMALDISPLAY ); //Normal/Inverse Display
SSD1306_Cmd( SSD1306_SETDISPLAYCLOCKDIV ); //Display Clock Divide Ratio/Oscillator Frequency
SSD1306_Cmd( 0x80 );
SSD1306_Cmd( SSD1306_SETPRECHARGE ); //Pre-Charge Period
SSD1306_Cmd( 0x25 );
SSD1306_Cmd( SSD1306_SETVCOMDETECT ); //VCOMH Deselect Level
SSD1306_Cmd( 0x20 );

SSD1306_Cmd( SSD1306_PAGEADDR );
SSD1306_Cmd( 0 );
SSD1306_Cmd( 7 );

SSD1306_Cmd( 0xB0 );
SSD1306_Cmd( 0x10 );
SSD1306_Cmd( 0x00 );
SSD1306_Cmd( SSD1306_MEMORYMODE );
SSD1306_Cmd( 0x00 );
SSD1306_Cmd( SSD1306_CHARGEPUMP ); //Charge Pump
SSD1306_Cmd( 0x14 ); //Enable Charge Pump
SSD1306_Cmd( SSD1306_DISPLAYON ); //Display On
 */
}

void SSD1306_Set_Cursor( char row, char col ) {

    SSD1306_Cmd( SSD1306_PAGESTARTADDR | row );
    SSD1306_Cmd( ( SSD1306_SETHIGHCOLUMN | ( col >> 4 )) );
    SSD1306_Cmd( ( 0x0f & col ));

}

void SSD1306_Set_Contrast( char value ) {

    SSD1306_Cmd( SSD1306_SETCONTRAST );
    SSD1306_Cmd( value );

}

void SSD1306_Chr( char wChar, char color ) {

    char i;

    wChar = wChar - 0x20;
    color = color ? 0x00 : 0xFF;
    for( i = 0; i < 8; i++ )
        SSD1306_Data( SSD1306_Font8x8[wChar][i] ^ color );

}

void SSD1306_Chr8( char row, char col, char wChar, char color ) {

     SSD1306_Set_Cursor( row, col << 3 );
     SSD1306_Chr( wChar, color );
}

void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i;

   col <<= 3;
   SSD1306_Set_Cursor( row++, col );
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   
   for( i = 0; i < 11; i++ )
   
   SSD1306_Data( Verdana11x11[wChar][i] ^ color );
   SSD1306_Set_Cursor( row, col );
   
   for( i = 11; i < 11; i++ ){

     SSD1306_Data( Verdana11x11[wChar][i] ^ color );

   }

}

void SSD1306_Out8( char row, char col, char *text, char color ) {

   SSD1306_Set_Cursor( row, col << 3 );
   while( *text )
      SSD1306_Chr( *text++, color );

}

void SSD1306_Out16( char row, char col, char *text, char color ) {

   while( *text )
     SSD1306_Chr16( row, col++, *text++, color );

}

void SSD1306_Image( const char *bmp, char color ) {

   char x, y;

   color = color ? 0x00 : 0xFF;

   for( y = 0; y < 8; y++ ) {

      SSD1306_Set_Cursor( y, 0 );
      TWI_Start();
      TWI_Write( 0x78 );
      TWI_Write( 0b1100000 );

     for( x = 0; x < 128; x++ )

        TWI_Write( *bmp++ ^ color );
        TWI_Stop();
   }
}

void SSD1306_Fill( char color ) {

   char x, y;

 for( y = 0; y < 8; y++ ) {

      SSD1306_Set_Cursor( y, 0 );
      TWI_Start();
      TWI_Write( 0x78 );
      TWI_Write( 0b1100000 );

   for( x = 0; x < 128; x++ )

        TWI_Write( color );
        TWI_Stop();
 }
}

the problem is that the Verdana11x11 font dont work, its just displays random pixels :C. i have tryed everything! i think mayby it has something to do with the SSD1306_Chr16 part of the code???
can some of you guys help to make it work :)
it would mean alot to me :)!

Thanks :)
Rune Hansen
Denmark.
 

Code:
void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i;

   col <<= 3;
   SSD1306_Set_Cursor( row++, col );
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   
   for( i = 0; i < 11; i++ )
   
   SSD1306_Data( Verdana11x11[wChar][i] ^ color );
   SSD1306_Set_Cursor( row, col );
   
   for( i = 11; i < 11; i++ ){

     SSD1306_Data( Verdana11x11[wChar][i] ^ color );

   }

}

this is your offending code... it expects a fixed-size of 11 bytes font and it seems to try to duplicate in the next row, with drawing a huge mess (is that right?)...
which i think isn't what you need huh?

The font creator for the Verdana one has a different format...

each character has 23 bytes, the first byte is the size of the character in columns, the next 22 bytes are the column data in a high byte,low byte sequence...

my suggestion should be something like this:

Code:
void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i,size;

   col <<= 3;
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   size= Verdana11x11[wChar][0];
   SSD1306_Set_Cursor( row++, col );   
   for( i = 0; i < size; i++ )
     SSD1306_Data( Verdana11x11[wChar][i*2+1] ^ color );
   SSD1306_Data( color ); //space
   SSD1306_Set_Cursor( row, col );
   for( i = 0; i < size; i++ )
     SSD1306_Data( Verdana11x11[wChar][i*2+2] ^ color );
   SSD1306_Data( color ); //space

}

please review your code on the second 'for' and if you don't want dynamic size, erase the 'size' variable and replace with '11' on both fors..

please note that this new code will not work with SSD1306_Font8x16[][16] as it lacks the size byte at the beginning of the character frame...
 

Hej man :)

thanks for the reply!, but its still not working as it should.
your code made it write the letters, but the buttom half is missing.

i think it has something to do with this part of the code:

Code:
for( i = 0; i < size; i++ )
   
     SSD1306_Data( Verdana11x11[wChar][i*2+2] ^ color );
     SSD1306_Data( color ); //space

it does not display the buttom half of the character :C

have tryed to play around with this section, but i cant get it to display the buttom half of the character :C
do you know why?

thanks again :)
 

Mmm, that's odd...

first, let's test:

try only half of the code:
Code:
void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i,size;

   col <<= 3;
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   size= Verdana11x11[wChar][0];
   SSD1306_Set_Cursor( row++, col );   
   for( i = 0; i < size; i++ ){
     SSD1306_Data( Verdana11x11[wChar][i*2+1] ^ color );
   }
   SSD1306_Data( color ); //space

}

is that the same behaviour you had with my code? then, test:
Code:
void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i,size;

   col <<= 3;
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   size= Verdana11x11[wChar][0];
   SSD1306_Set_Cursor( row++, col );   
   for( i = 0; i < size; i++ ){
     SSD1306_Data( Verdana11x11[wChar][i*2+2] ^ color );
   }
   SSD1306_Data( color ); //space

}
does it show the lower half that you are missing? (instead of the upper half)

if no, then there's something wrong with the Table definition of Verdana, have I messed a shift some where?

if yes, then it's a problem with the Actual row you are printing...

I noticed you didn't post the main program you are using, and I think you are messing with the wrong "row" value... remember, this lcd handles Rows of 8 bits (pixels) in a small font it suffices a Row for each line of characters, but in this big font, you need to print every two rows so the next line of text doesn't overlap with half of the previous line of text...

so, please test only a basic message like:
Code:
int main(void){
   SSD1306_Init();
   SSD1306_Out16(2,1,"HELLo.",0); //why 2? maybe the row is flipped and we'll see it on row 1 (or even on row 0)
   while(1) {
    //insert a delay or something to keep the program looping here
   }
   return 0; //sorry, can't remember if mikroC uses a void main, or int main...
}
 

Hi.

Here are the results of the test.

for this part of the code:

Code:
void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i,size;

   col <<= 3;
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   size = Microsoft_Sans_Serif12x12[wChar][0];
   SSD1306_Set_Cursor( row++, col );
   
   for( i = 0; i < size; i++ ){
   
     SSD1306_Data( Microsoft_Sans_Serif12x12[wChar][i*2+1] ^ color );
    // SSD1306_Data( color ); //space
    // SSD1306_Set_Cursor( row, col );
   }
   SSD1306_Data( color );
  /* for( i = 0; i < size; i++ )
   
     SSD1306_Data( Microsoft_Sans_Serif12x12[wChar][i*2+2] ^ color );
     SSD1306_Data( color ); //space
     //SSD1306_Set_Cursor( row, col );
    */
}

the display displayed this:
1.jpg

And for the last test, with:

Code:
void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i,size;

   col <<= 3;
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   size = Microsoft_Sans_Serif12x12[wChar][0];
   SSD1306_Set_Cursor( row++, col );
   
   for( i = 0; i < size; i++ ){
   
     SSD1306_Data( Microsoft_Sans_Serif12x12[wChar][i*2+2] ^ color );
    // SSD1306_Data( color ); //space
    // SSD1306_Set_Cursor( row, col );
   }
   SSD1306_Data( color );
  /* for( i = 0; i < size; i++ )
   
     SSD1306_Data( Microsoft_Sans_Serif12x12[wChar][i*2+2] ^ color );
     SSD1306_Data( color ); //space
     //SSD1306_Set_Cursor( row, col );
    */
}

this was displayed:
2.jpg

i have changed the font, to a font that worked... somewhat.
but its like the charaters are compressed and missing pixels.

do you know why?

- - - Updated - - -

This is the new font:

Code:
const code char Microsoft_Sans_Serif12x12[][25] = {
        0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char
        0x03, 0x00, 0x00, 0xFE, 0x02, 0xFE, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char !
        0x06, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char "
        0x08, 0x00, 0x00, 0x88, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x88, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char #
        0x07, 0x00, 0x00, 0x18, 0x01, 0x3C, 0x03, 0xFE, 0x07, 0xFE, 0x07, 0xCC, 0x03, 0x88, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char $
        0x09, 0x00, 0x00, 0x04, 0x01, 0x8E, 0x01, 0xCA, 0x00, 0x6E, 0x01, 0xB4, 0x03, 0x98, 0x02, 0x8C, 0x03, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char %
        0x07, 0x00, 0x00, 0xCC, 0x01, 0xFE, 0x03, 0x7E, 0x02, 0xCC, 0x03, 0xC0, 0x03, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char &
        0x03, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char '
        0x04, 0x00, 0x00, 0xFC, 0x07, 0xFE, 0x0F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char (
        0x04, 0x00, 0x00, 0x02, 0x08, 0xFE, 0x0F, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char )
        0x05, 0x00, 0x00, 0x0A, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char *
        0x07, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0xF0, 0x01, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char +
        0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ,
        0x04, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char -
        0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char .
        0x06, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x03, 0xF0, 0x00, 0x3E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char /
        0x07, 0x00, 0x00, 0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x03, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 0
        0x05, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 1
        0x07, 0x00, 0x00, 0x04, 0x03, 0x86, 0x03, 0xC2, 0x02, 0x62, 0x02, 0x3E, 0x02, 0x1C, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 2
        0x07, 0x00, 0x00, 0x04, 0x01, 0x06, 0x03, 0x22, 0x02, 0x22, 0x02, 0xFE, 0x03, 0xDC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 3
        0x07, 0x00, 0x00, 0xC0, 0x00, 0xF0, 0x00, 0xBC, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 4
        0x07, 0x00, 0x00, 0x3E, 0x01, 0x3E, 0x03, 0x12, 0x02, 0x12, 0x02, 0xF2, 0x03, 0xE2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 5
        0x07, 0x00, 0x00, 0xFC, 0x01, 0xFE, 0x03, 0x22, 0x02, 0x22, 0x02, 0xE6, 0x03, 0xC4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 6
        0x07, 0x00, 0x00, 0x02, 0x00, 0x82, 0x03, 0xE2, 0x03, 0x7A, 0x00, 0x1E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 7
        0x07, 0x00, 0x00, 0xDC, 0x01, 0xFE, 0x03, 0x22, 0x02, 0x22, 0x02, 0xFE, 0x03, 0xDC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 8
        0x07, 0x00, 0x00, 0x1C, 0x01, 0x3E, 0x03, 0x22, 0x02, 0x22, 0x02, 0xFE, 0x03, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 9
        0x03, 0x00, 0x00, 0x10, 0x02, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char :
        0x04, 0x00, 0x00, 0x00, 0x04, 0x10, 0x06, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ;
        0x06, 0x00, 0x00, 0x40, 0x00, 0xE0, 0x00, 0xB0, 0x01, 0x18, 0x03, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char <
        0x07, 0x00, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char =
        0x06, 0x00, 0x00, 0x08, 0x02, 0x18, 0x03, 0xB0, 0x01, 0xE0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char >
        0x07, 0x00, 0x00, 0x04, 0x00, 0x06, 0x00, 0xC2, 0x02, 0xE2, 0x02, 0x3E, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ?
        0x0C, 0x00, 0x00, 0xF0, 0x00, 0xFC, 0x03, 0x0C, 0x03, 0x66, 0x06, 0xF2, 0x04, 0x92, 0x04, 0xF2, 0x04, 0xF6, 0x04, 0x8C, 0x04, 0xFC, 0x00, 0xF0, 0x00,  // Code for char @
        0x08, 0x00, 0x03, 0xE0, 0x03, 0xF8, 0x00, 0x9E, 0x00, 0x9E, 0x00, 0xF8, 0x00, 0xE0, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char A
        0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x02, 0x22, 0x02, 0xFE, 0x03, 0xDC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char B
        0x08, 0x00, 0x00, 0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x06, 0x03, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char C
        0x08, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02, 0x06, 0x03, 0xFC, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char D
        0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x02, 0x22, 0x02, 0x22, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char E
        0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char F
        0x08, 0x00, 0x00, 0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x22, 0x02, 0x22, 0x03, 0xE6, 0x03, 0xE4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char G
        0x08, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char H
        0x03, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char I
        0x05, 0x80, 0x01, 0x80, 0x03, 0x00, 0x02, 0xFE, 0x03, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char J
        0x08, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x78, 0x00, 0xCC, 0x00, 0x86, 0x01, 0x02, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char K
        0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char L
        0x09, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x78, 0x00, 0xE0, 0x01, 0xE0, 0x01, 0x78, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char M
        0x08, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x3C, 0x00, 0x70, 0x00, 0xC0, 0x01, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char N
        0x08, 0x00, 0x00, 0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x03, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char O
        0x08, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x3E, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char P
        0x08, 0x00, 0x00, 0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x82, 0x02, 0x82, 0x03, 0xFE, 0x07, 0xFC, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char Q
        0x08, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0xFE, 0x03, 0xDC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char R
        0x07, 0x00, 0x00, 0x1C, 0x01, 0x3E, 0x03, 0x22, 0x02, 0x22, 0x02, 0xE6, 0x03, 0xC4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char S
        0x07, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char T
        0x08, 0x00, 0x00, 0xFE, 0x01, 0xFE, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xFE, 0x03, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char U
        0x08, 0x06, 0x00, 0x3E, 0x00, 0xF8, 0x00, 0xC0, 0x03, 0xC0, 0x03, 0xF8, 0x00, 0x3E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char V
        0x0C, 0x06, 0x00, 0x3E, 0x00, 0xF8, 0x00, 0xC0, 0x03, 0xC0, 0x03, 0xF8, 0x00, 0xF8, 0x00, 0xC0, 0x03, 0xC0, 0x03, 0xF8, 0x00, 0x3E, 0x00, 0x06, 0x00,  // Code for char W
        0x08, 0x06, 0x03, 0x8E, 0x03, 0xD8, 0x00, 0x70, 0x00, 0x70, 0x00, 0xD8, 0x00, 0x8E, 0x03, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char X
        0x08, 0x06, 0x00, 0x0E, 0x00, 0x18, 0x00, 0xF0, 0x03, 0xF0, 0x03, 0x18, 0x00, 0x0E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char Y
        0x08, 0x02, 0x03, 0x82, 0x03, 0xC2, 0x02, 0x62, 0x02, 0x32, 0x02, 0x1A, 0x02, 0x0E, 0x02, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char Z
        0x04, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char [
        0x06, 0x00, 0x00, 0x0E, 0x00, 0x3E, 0x00, 0xF0, 0x00, 0xC0, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char BackSlash
        0x04, 0x00, 0x00, 0x02, 0x08, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ]
        0x07, 0x00, 0x00, 0x04, 0x00, 0x06, 0x00, 0x03, 0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ^
        0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char _
        0x04, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char `
        0x07, 0x00, 0x00, 0x80, 0x01, 0xD0, 0x03, 0x50, 0x02, 0x50, 0x02, 0xF0, 0x03, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char a
        0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x03, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char b
        0x07, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x10, 0x02, 0x10, 0x02, 0x30, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char c
        0x07, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x10, 0x02, 0x10, 0x02, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char d
        0x07, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x50, 0x02, 0x50, 0x02, 0x70, 0x03, 0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char e
        0x04, 0x00, 0x00, 0xFC, 0x03, 0xFE, 0x03, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char f
        0x07, 0x00, 0x00, 0xE0, 0x09, 0xF0, 0x0B, 0x10, 0x0A, 0x10, 0x0A, 0xF0, 0x0F, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char g
        0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x30, 0x00, 0x10, 0x00, 0xF0, 0x03, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char h
        0x03, 0x00, 0x00, 0xF2, 0x03, 0xF2, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char i
        0x03, 0x00, 0x00, 0xF2, 0x0F, 0xF2, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char j
        0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0xE0, 0x00, 0xB0, 0x01, 0x10, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char k
        0x03, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char l
        0x09, 0x00, 0x00, 0xF0, 0x03, 0xF0, 0x03, 0x10, 0x00, 0xF0, 0x03, 0xF0, 0x03, 0x10, 0x00, 0xF0, 0x03, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char m
        0x07, 0x00, 0x00, 0xF0, 0x03, 0xF0, 0x03, 0x30, 0x00, 0x10, 0x00, 0xF0, 0x03, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char n
        0x07, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x03, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char o
        0x07, 0x00, 0x00, 0xF0, 0x0F, 0xF0, 0x0F, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x03, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char p
        0x07, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x0F, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char q
        0x04, 0x00, 0x00, 0xF0, 0x03, 0xF0, 0x03, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char r
        0x06, 0x00, 0x00, 0x20, 0x01, 0x70, 0x03, 0xD0, 0x02, 0xB0, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char s
        0x04, 0x00, 0x00, 0xFC, 0x01, 0xFC, 0x03, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char t
        0x07, 0x00, 0x00, 0xF0, 0x01, 0xF0, 0x03, 0x00, 0x02, 0x00, 0x03, 0xF0, 0x03, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char u
        0x07, 0x00, 0x00, 0x30, 0x00, 0xF0, 0x00, 0xC0, 0x03, 0xC0, 0x03, 0xF0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char v
        0x09, 0x00, 0x00, 0xF0, 0x00, 0xF0, 0x03, 0xC0, 0x03, 0xF0, 0x00, 0xF0, 0x00, 0xC0, 0x03, 0xF0, 0x03, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char w
        0x06, 0x00, 0x00, 0x30, 0x03, 0xF0, 0x03, 0xC0, 0x00, 0xF0, 0x03, 0x30, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char x
        0x06, 0x00, 0x08, 0xF0, 0x08, 0xF0, 0x0F, 0x00, 0x07, 0xF0, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char y
        0x06, 0x00, 0x00, 0x10, 0x03, 0x90, 0x03, 0xD0, 0x02, 0x70, 0x02, 0x30, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char z
        0x05, 0x00, 0x00, 0x20, 0x00, 0xFE, 0x03, 0xDF, 0x07, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char {
        0x03, 0x00, 0x00, 0xFE, 0x07, 0xFE, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char |
        0x05, 0x00, 0x00, 0x01, 0x04, 0xDF, 0x07, 0xFE, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char }
        0x08, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char ~
        0x04, 0xFC, 0x03, 0xFC, 0x03, 0xFC, 0x03, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   // Code for char 
        };

- - - Updated - - -

And a test with:
Code:
void SSD1306_Chr16( char row, char col, char wChar, char color ) {

 char i,size;

   col <<= 3;
   wChar = wChar - 0x20;
   color = color ? 0x00 : 0xFF;
   size = Microsoft_Sans_Serif12x12[wChar][0];
   SSD1306_Set_Cursor( row++, col );
   
   for( i = 0; i < size; i++ )
   
     SSD1306_Data( Microsoft_Sans_Serif12x12[wChar][i*2+1] ^ color );
     SSD1306_Data( color ); //space
     SSD1306_Set_Cursor( row, col );

   for( i = 0; i < size; i++ )
   
     SSD1306_Data( Microsoft_Sans_Serif12x12[wChar][i*2+2] ^ color );
     SSD1306_Data( color ); //space
     SSD1306_Set_Cursor( row, col );

}

with the loop:

Code:
void main() {

   ADC_Init();

//----------------------------------------------------------------//

     SREG_I_bit = 1;
     
     PCICR |= (1 << PCIE2);
     PCINT21_bit = 1;
     PCINT22_bit = 1;
     
     encoder = 500;
     Procent = 0;
     
//----------------------------------------------------------------//
  
   PWM16bit_Init(_PWM16_FAST_MODE_10BIT, _PWM16_PRESCALER_16bit_64, _PWM16_INVERTED, 255, _TIMER1);
   PWM16bit_Change_Duty(0, _TIMER1_CH_A);
   Fire_Fet_direction = 1;
   Fire_Fet = 1;
   
   DDD7_bit = 0;

   TWI_Init(300000);         // initialize TWI communication
   OLED_RST_direction = 1;
   OLED_RST1_direction = 1;

   SSD1306_Init();
   SSD1306_Fill(0);

   OLEDSKM = 0;
   
 do {

     SSD1306_out16(4, 1,"HALLo.", 0 );
     //OLED_skerme();

 }while(1);
}

this is displayed:
3.jpg

i dont know what to do :C
 

so the same main() program displays those three pictures with the different SSD1306_Chr16 instances??? (the first pic with only the first row, the second pic with only the second row, and the last pic with the code for both rows???)

truth is, for me, pic#1 and pic#2 are ok (as expected for this kind of font),

and unless pic#3 is from a slight different program, or it has a flickering behavior (thus the inverted color???), it shows me that the problem is in another place... please tell us which one is the case...

but, let's test a few things,

first, your TWI seems a little to high... please test with a TWI frequency of 100kHz (probably TWI_Init(100000); or less) (for test only, once we found the error, you can try higher freqs)

after that test, I'm not sure how mikroC handles the TWI Stop as it usually needs a small delay after it (no other TWI task needs a delay, as any other task activates a internal TWI flag and a TWI state.. any except that damn TWi Stop).
so please modify the basic cmd and data to add a smal delay

Code:
void SSD1306_Cmd( unsigned char temp ) {

  TWI_Start();
  TWI_Write( 0x78 );
  TWI_Write( 0x00 );
  TWI_Write( temp );
  TWI_Stop();
  Delay_us(10);
}

void SSD1306_Data( unsigned char temp ) {

  TWI_Start();
  TWI_Write( 0x78 );
  TWI_Write( 0x40 );
  TWI_Write( temp );
  TWI_Stop();
  Delay_us(10);
}

after that, let's check if the row effectively changes from place...

pick the code that shows only one row (the code for Pic#1)
and modify it to something like this:

Code:
void main() {
   int i=0; //let's add a variable
//----------------------------------------------------------------//
//test without extra code, maybe it mess with this???
//----------------------------------------------------------------//
   TWI_Init(100000);         // initialize TWI communication
   OLED_RST_direction = 1;
   OLED_RST1_direction = 1;

   SSD1306_Init();
   SSD1306_Fill(0);

   OLEDSKM = 0;
   
 do {

     SSD1306_out16(i, 1,"HALLo.", 0 ); // now row is i
     Delay_ms(1000);
     i++;
     if(i>=8) i=0;
     //OLED_skerme();

 }while(1);
}
does it writes it and all the rows? in ascending or descending order?
if you change it to:
Code:
 do {

     SSD1306_out16(i, 1,"HALLo.", 0 );
     Delay_ms(1000);
     i+=2;
     if(i>=8) i=0;
     //OLED_skerme();

 }while(1);
does it writes every 2 rows?

if you change the init from int i=0; to int i=1; does it shows on the even rows????

if all of this works but the code #3 finally didn't work I would make two functions called SSD1306_Chr16_v1() for the first code that prints the first row, and then another code SSD1306_Chr16_v2() that prints the second row, and cheaply I would print twice on different rows (from you original example):
Code:
 do {

     SSD1306_out16_v1(4, 1,"HALLo.", 0 );
     SSD1306_out16_v2(5, 1,"HALLo.", 0 ); //same message but different row
     //OLED_skerme();

 }while(1);

so, I suspect the function SSD1306_Set_Cursor( row, col ) isn't working well, and you need to see why.... (twi failure?, incorrect command? does it need an extra delay before changing rows???)
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top