STM32 Nokia 5110 Large Font Issue - Page 1
Forum section: electronics / general

author: diyaudio
author_rank: Frequent Contributor
timestamp: October 31, 2014, 11:13:55 am
content: Hi AllI'm experimenting with a Nokia 5110 LCD, so far I am able to display the standard font see attachment, however this is the problem..I want to use a bigger, custom numeric font, medium-size and large-size (see attachment) and use it with the library I'm using, however the library I'm using is rather basic and only supports the standard 6X8 font (see attachment)I tried to port and experiment sections of this library Henning Karlsenhttp://www.henningkarlsen.com/electronics/library.php?id=44However the results aren't to great. (see attachment)Here are sections of the code simplified for clarity, the LCD is initialized correctly, so all I need to understand for now is how to render larger fonts, and maybe next draw.Code:#ifndef __DRV_LCD5110_FONT__#define __DRV_LCD5110_FONT__unsigned char font6_8[] ={{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // sp{ 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00 }, // !{ 0x00, 0x00, 0x07, 0x00, 0x07, 0x00 }, // "{ 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // #{ 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // ${ 0x00, 0x62, 0x64, 0x08, 0x13, 0x23 }, // %{ 0x00, 0x36, 0x49, 0x55, 0x22, 0x50 }, // &{ 0x00, 0x00, 0x05, 0x03, 0x00, 0x00 }, // '{ 0x00, 0x00, 0x1c, 0x22, 0x41, 0x00 }, // ({ 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00 }, // ){ 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *{ 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +{ 0x00, 0x00, 0x00, 0xA0, 0x60, 0x00 }, // ,{ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08 }, // -{ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00 }, // .{ 0x00, 0x20, 0x10, 0x08, 0x04, 0x02 }, // /{ 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 0{ 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1{ 0x00, 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2{ 0x00, 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 3{ 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 4{ 0x00, 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5{ 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 6{ 0x00, 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7{ 0x00, 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8{ 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E }, // 9{ 0x00, 0x00, 0x36, 0x36, 0x00, 0x00 }, // :{ 0x00, 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;{ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00 }, // <{ 0x00, 0x14, 0x14, 0x14, 0x14, 0x14 }, // ={ 0x00, 0x00, 0x41, 0x22, 0x14, 0x08 }, // >{ 0x00, 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?{ 0x00, 0x32, 0x49, 0x59, 0x51, 0x3E }, // @{ 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C }, // A{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C{ 0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F{ 0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G{ 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H{ 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I{ 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J{ 0x00, 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K{ 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L{ 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M{ 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P{ 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q{ 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R{ 0x00, 0x46, 0x49, 0x49, 0x49, 0x31 }, // S{ 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T{ 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U{ 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V{ 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W{ 0x00, 0x63, 0x14, 0x08, 0x14, 0x63 }, // X{ 0x00, 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y{ 0x00, 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z{ 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [{ 0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55 }, // 55{ 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]{ 0x00, 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^{ 0x00, 0x40, 0x40, 0x40, 0x40, 0x40 }, // _{ 0x00, 0x00, 0x01, 0x02, 0x04, 0x00 }, // '{ 0x00, 0x20, 0x54, 0x54, 0x54, 0x78 }, // a{ 0x00, 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x20 }, // c{ 0x00, 0x38, 0x44, 0x44, 0x48, 0x7F }, // d{ 0x00, 0x38, 0x54, 0x54, 0x54, 0x18 }, // e{ 0x00, 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f{ 0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C }, // g{ 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h{ 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i{ 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00 }, // j{ 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k{ 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l{ 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x38 }, // o{ 0x00, 0xFC, 0x24, 0x24, 0x24, 0x18 }, // p{ 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC }, // q{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r{ 0x00, 0x48, 0x54, 0x54, 0x54, 0x20 }, // s{ 0x00, 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t{ 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u{ 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v{ 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w{ 0x00, 0x44, 0x28, 0x10, 0x28, 0x44 }, // x{ 0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C }, // y{ 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44 }, // z{ 0x00,0x00, 0x06, 0x09, 0x09, 0x06 } // horiz lines};unsigned char MediumNumbers[] ={0x0c, 0x10, 0x2d, 0x0d, // config bytes 12, 16, 45, 130x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, // -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, // .0x00, 0x00, 0x02, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x02, 0x00, 0x00, 0x00, 0x00, 0x81, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x81, 0x00, 0x00, // /0x00, 0xfc, 0x7a, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x7a, 0xfc, 0x00, 0x00, 0x7e, 0xbc, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xbc, 0x7e, 0x00, // 00x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x7e, 0x00, // 10x00, 0x00, 0x02, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x7a, 0xfc, 0x00, 0x00, 0x7e, 0xbd, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x81, 0x00, 0x00, // 20x00, 0x00, 0x02, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x7a, 0xfc, 0x00, 0x00, 0x00, 0x81, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xbd, 0x7e, 0x00, // 30x00, 0xfc, 0x78, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x78, 0xfc, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x3d, 0x7e, 0x00, // 40x00, 0xfc, 0x7a, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x02, 0x00, 0x00, 0x00, 0x00, 0x81, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xbd, 0x7e, 0x00, // 50x00, 0xfc, 0x7a, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x02, 0x00, 0x00, 0x00, 0x7e, 0xbd, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xbd, 0x7e, 0x00, // 60x00, 0x00, 0x02, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x7a, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x7e, 0x00, // 70x00, 0xfc, 0x7a, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x7a, 0xfc, 0x00, 0x00, 0x7e, 0xbd, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xbd, 0x7e, 0x00, // 80x00, 0xfc, 0x7a, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x7a, 0xfc, 0x00, 0x00, 0x00, 0x81, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xbd, 0x7e, 0x00, // 9};unsigned char BigNumbers[] ={0x0e, 0x18, 0x2d, 0x0d, // config bytes0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xe0, 0xe0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // .0x00, 0x00, 0x02, 0x06, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, // /0x00, 0xfc, 0xfa, 0xf6, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xf6, 0xfa, 0xfc, 0x00, 0x00, 0xef, 0xc7, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0xc7, 0xef, 0x00, 0x00, 0x7f, 0xbf, 0xdf, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdf, 0xbf, 0x7f, 0x00, // 00x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0xc7, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x7f, 0x00, // 10x00, 0x00, 0x02, 0x06, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xf6, 0xfa, 0xfc, 0x00, 0x00, 0xe0, 0xd0, 0xb8, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x3b, 0x17, 0x0f, 0x00, 0x00, 0x7f, 0xbf, 0xdf, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, // 20x00, 0x00, 0x02, 0x06, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xf6, 0xfa, 0xfc, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0xbb, 0xd7, 0xef, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdf, 0xbf, 0x7f, 0x00, // 30x00, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xfc, 0x00, 0x00, 0x0f, 0x17, 0x3b, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0xbb, 0xd7, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x7f, 0x00, // 40x00, 0xfc, 0xfa, 0xf6, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x3b, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0xb8, 0xd0, 0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdf, 0xbf, 0x7f, 0x00, // 50x00, 0xfc, 0xfa, 0xf6, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0xef, 0xd7, 0xbb, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0xb8, 0xd0, 0xe0, 0x00, 0x00, 0x7f, 0xbf, 0xdf, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdf, 0xbf, 0x7f, 0x00, // 60x00, 0x00, 0x02, 0x06, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xf6, 0xfa, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0xc7, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x7f, 0x00, // 70x00, 0xfc, 0xfa, 0xf6, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xf6, 0xfa, 0xfc, 0x00, 0x00, 0xef, 0xd7, 0xbb, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0xbb, 0xd7, 0xef, 0x00, 0x00, 0x7f, 0xbf, 0xdf, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdf, 0xbf, 0x7f, 0x00, // 80x00, 0xfc, 0xfa, 0xf6, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xf6, 0xfa, 0xfc, 0x00, 0x00, 0x0f, 0x17, 0x3b, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0xbb, 0xd7, 0xef, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdf, 0xbf, 0x7f, 0x00, // 9};struct lcd_font{unsigned char* font;char x_size;char y_size;char offset;char numchars;char inverted;};static struct lcd_font font;#define FONT_READ_BYTE(x) font.font;void LCD5110_GPIO_Config() {GPIO_InitTypeDef GPIO_InitStructure;// Declare pins to configureGPIO_InitStructure.GPIO_Pin = LCD_RESET | LCD_DC | LCD_DATA_IN | LCD_CLK;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;// Init PortGPIO_Init(GPIOA, &GPIO_InitStructure);// assign fontfont.font = MediumNumbers;// Setup font.font.x_size = FONT_READ_BYTE(0); // 12;font.y_size = FONT_READ_BYTE(1); // 16;font.offset = FONT_READ_BYTE(2); // 45;font.numchars = FONT_READ_BYTE(3); // 13;font.inverted = 0;}void LCD5110_num_string(unsigned char *s, int x, int row){unsigned char ch;while(*s != '\0') {ch = *s;LCD5110_num_char(ch, x, row);s++;}}void LCD5110_num_char(unsigned char c, int x, int row){// Caclulate the y-size pixel bank height.char max = font.x_size / 8;for (int rowcnt = 0; rowcnt < max ; rowcnt++){LCD5110_LCD_write_byte(LCD_SETYADDR | (row + rowcnt), LCD_COMMAND);LCD5110_LCD_write_byte(LCD_SETXADDR | x, LCD_COMMAND);int font_idx = (( c - font.offset ) * ( font.x_size * ( font.y_size / 8 ))) + 4;for(int cnt = 0; cnt < font.x_size; cnt++){char index = font_idx + cnt + ( rowcnt * font.x_size );char s = FONT_READ_BYTE( index );LCD5110_LCD_write_byte( s , LCD_DATA );}}// resetLCD5110_LCD_write_byte(LCD_SETYADDR, LCD_COMMAND);LCD5110_LCD_write_byte(LCD_SETXADDR, LCD_COMMAND);}// usagevoid main(){if(second_tick == true){LCD5110_clear();LCD5110_num_string("2", 1, 0);sec_counter++;second_tick = false;}}}#endif

author: dannyf
author_rank: Super Contributor
timestamp: October 31, 2014, 01:14:15 pm
content: Think of the fonts as an image and write a function that output an image to the screen. When you need to output a string (alphanumeric), just use the chars in the string to look up the image data and output the image.

author: andyturk
author_rank: Frequent Contributor
timestamp: November 01, 2014, 05:52:06 am
content: https://code.google.com/p/u8glib/

author: diyaudio
author_rank: Frequent Contributor
timestamp: November 03, 2014, 09:53:39 pm
content: Bugs are fixed here are the results. Everything works and looks right

author: diyaudio
author_rank: Frequent Contributor
timestamp: November 03, 2014, 09:57:00 pm
content: Quote from: andyturk on November 01, 2014, 05:52:06 amThanks for the link its a bit of heavy library for my needs i will keep it as a reference for future designs.

author: shebu18
author_rank: Frequent Contributor
timestamp: July 24, 2015, 10:03:16 am
content: Hello, i did not want to start a new topic for a simple question. I am in almost the same situation as you are, i want to display some numbers but in bigger format as 6x8, someting like 12x16 or bigger.Could you explain what you did to make it work, how do you set the font.Thanks.

author: diyaudio
author_rank: Frequent Contributor
timestamp: July 24, 2015, 11:48:04 am
content: Quote from: shebu18 on July 24, 2015, 10:03:16 amhi.The custom fonts can be made using a font generator of your choice OR downloaded from an existing open source project, I used the larger font (in my case its a Terminal11x16)Here is the font memory map I usedCode:static const unsigned char Terminal11x16 = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFF,0x33,0xFF,0x33,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char !0x00,0x00,0x00,0x00,0x3C,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char "0x00,0x02,0x10,0x1E,0x90,0x1F,0xF0,0x03,0x7E,0x02,0x1E,0x1E,0x90,0x1F,0xF0,0x03,0x7E,0x02,0x1E,0x00,0x10,0x00, // Code for char #0x00,0x00,0x78,0x04,0xFC,0x0C,0xCC,0x0C,0xFF,0x3F,0xFF,0x3F,0xCC,0x0C,0xCC,0x0F,0x88,0x07,0x00,0x00,0x00,0x00, // Code for char $0x00,0x30,0x38,0x38,0x38,0x1C,0x38,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x38,0x70,0x38,0x38,0x38,0x1C,0x00, // Code for char %0x00,0x00,0x00,0x1F,0xB8,0x3F,0xFC,0x31,0xC6,0x21,0xE2,0x37,0x3E,0x1E,0x1C,0x1C,0x00,0x36,0x00,0x22,0x00,0x00, // Code for char &0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x00,0x3F,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char '0x00,0x00,0x00,0x00,0xF0,0x03,0xFC,0x0F,0xFE,0x1F,0x07,0x38,0x01,0x20,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char (0x00,0x00,0x00,0x00,0x01,0x20,0x01,0x20,0x07,0x38,0xFE,0x1F,0xFC,0x0F,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char )0x00,0x00,0x98,0x0C,0xB8,0x0E,0xE0,0x03,0xF8,0x0F,0xF8,0x0F,0xE0,0x03,0xB8,0x0E,0x98,0x0C,0x00,0x00,0x00,0x00, // Code for char *0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0xF0,0x0F,0xF0,0x0F,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00, // Code for char +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB8,0x00,0xF8,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00, // Code for char -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char .0x00,0x18,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00, // Code for char /0xF8,0x07,0xFE,0x1F,0x06,0x1E,0x03,0x33,0x83,0x31,0xC3,0x30,0x63,0x30,0x33,0x30,0x1E,0x18,0xFE,0x1F,0xF8,0x07, // Code for char 00x00,0x00,0x00,0x00,0x0C,0x30,0x0C,0x30,0x0E,0x30,0xFF,0x3F,0xFF,0x3F,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00, // Code for char 10x1C,0x30,0x1E,0x38,0x07,0x3C,0x03,0x3E,0x03,0x37,0x83,0x33,0xC3,0x31,0xE3,0x30,0x77,0x30,0x3E,0x30,0x1C,0x30, // Code for char 20x0C,0x0C,0x0E,0x1C,0x07,0x38,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xE7,0x39,0x7E,0x1F,0x3C,0x0E, // Code for char 30xC0,0x03,0xE0,0x03,0x70,0x03,0x38,0x03,0x1C,0x03,0x0E,0x03,0x07,0x03,0xFF,0x3F,0xFF,0x3F,0x00,0x03,0x00,0x03, // Code for char 40x3F,0x0C,0x7F,0x1C,0x63,0x38,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0xE3,0x38,0xC3,0x1F,0x83,0x0F, // Code for char 50xC0,0x0F,0xF0,0x1F,0xF8,0x39,0xDC,0x30,0xCE,0x30,0xC7,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x39,0x80,0x1F,0x00,0x0F, // Code for char 60x03,0x00,0x03,0x00,0x03,0x00,0x03,0x30,0x03,0x3C,0x03,0x0F,0xC3,0x03,0xF3,0x00,0x3F,0x00,0x0F,0x00,0x03,0x00, // Code for char 70x00,0x0F,0xBC,0x1F,0xFE,0x39,0xE7,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xE7,0x30,0xFE,0x39,0xBC,0x1F,0x00,0x0F, // Code for char 80x3C,0x00,0x7E,0x00,0xE7,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x38,0xC3,0x1C,0xC3,0x0E,0xE7,0x07,0xFE,0x03,0xFC,0x00, // Code for char 90x00,0x00,0x00,0x00,0x00,0x00,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char :0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x9C,0x70,0xFC,0x70,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ;0x00,0x00,0xC0,0x00,0xE0,0x01,0xF0,0x03,0x38,0x07,0x1C,0x0E,0x0E,0x1C,0x07,0x38,0x03,0x30,0x00,0x00,0x00,0x00, // Code for char <0x00,0x00,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x00,0x00, // Code for char =0x00,0x00,0x03,0x30,0x07,0x38,0x0E,0x1C,0x1C,0x0E,0x38,0x07,0xF0,0x03,0xE0,0x01,0xC0,0x00,0x00,0x00,0x00,0x00, // Code for char >0x1C,0x00,0x1E,0x00,0x07,0x00,0x03,0x00,0x83,0x37,0xC3,0x37,0xE3,0x00,0x77,0x00,0x3E,0x00,0x1C,0x00,0x00,0x00, // Code for char ?0xF8,0x0F,0xFE,0x1F,0x07,0x18,0xF3,0x33,0xFB,0x37,0x1B,0x36,0xFB,0x37,0xFB,0x37,0x07,0x36,0xFE,0x03,0xF8,0x01, // Code for char @0x00,0x38,0x00,0x3F,0xE0,0x07,0xFC,0x06,0x1F,0x06,0x1F,0x06,0xFC,0x06,0xE0,0x07,0x00,0x3F,0x00,0x38,0x00,0x00, // Code for char A0xFF,0x3F,0xFF,0x3F,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xE7,0x30,0xFE,0x39,0xBC,0x1F,0x00,0x0F,0x00,0x00, // Code for char B0xF0,0x03,0xFC,0x0F,0x0E,0x1C,0x07,0x38,0x03,0x30,0x03,0x30,0x03,0x30,0x07,0x38,0x0E,0x1C,0x0C,0x0C,0x00,0x00, // Code for char C0xFF,0x3F,0xFF,0x3F,0x03,0x30,0x03,0x30,0x03,0x30,0x03,0x30,0x07,0x38,0x0E,0x1C,0xFC,0x0F,0xF0,0x03,0x00,0x00, // Code for char D0xFF,0x3F,0xFF,0x3F,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0x03,0x30,0x03,0x30,0x00,0x00, // Code for char E0xFF,0x3F,0xFF,0x3F,0xC3,0x00,0xC3,0x00,0xC3,0x00,0xC3,0x00,0xC3,0x00,0xC3,0x00,0x03,0x00,0x03,0x00,0x00,0x00, // Code for char F0xF0,0x03,0xFC,0x0F,0x0E,0x1C,0x07,0x38,0x03,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC7,0x3F,0xC6,0x3F,0x00,0x00, // Code for char G0xFF,0x3F,0xFF,0x3F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xFF,0x3F,0xFF,0x3F,0x00,0x00, // Code for char H0x00,0x00,0x00,0x00,0x03,0x30,0x03,0x30,0xFF,0x3F,0xFF,0x3F,0x03,0x30,0x03,0x30,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char I0x00,0x0E,0x00,0x1E,0x00,0x38,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x38,0xFF,0x1F,0xFF,0x07,0x00,0x00, // Code for char J0xFF,0x3F,0xFF,0x3F,0xC0,0x00,0xE0,0x01,0xF0,0x03,0x38,0x07,0x1C,0x0E,0x0E,0x1C,0x07,0x38,0x03,0x30,0x00,0x00, // Code for char K0xFF,0x3F,0xFF,0x3F,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00, // Code for char L0xFF,0x3F,0xFF,0x3F,0x1E,0x00,0x78,0x00,0xE0,0x01,0xE0,0x01,0x78,0x00,0x1E,0x00,0xFF,0x3F,0xFF,0x3F,0x00,0x00, // Code for char M0xFF,0x3F,0xFF,0x3F,0x0E,0x00,0x38,0x00,0xF0,0x00,0xC0,0x03,0x00,0x07,0x00,0x1C,0xFF,0x3F,0xFF,0x3F,0x00,0x00, // Code for char N0xF0,0x03,0xFC,0x0F,0x0E,0x1C,0x07,0x38,0x03,0x30,0x03,0x30,0x07,0x38,0x0E,0x1C,0xFC,0x0F,0xF0,0x03,0x00,0x00, // Code for char O0xFF,0x3F,0xFF,0x3F,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0xC7,0x01,0xFE,0x00,0x7C,0x00,0x00,0x00, // Code for char P0xF0,0x03,0xFC,0x0F,0x0E,0x1C,0x07,0x38,0x03,0x30,0x03,0x36,0x07,0x3E,0x0E,0x1C,0xFC,0x3F,0xF0,0x33,0x00,0x00, // Code for char Q0xFF,0x3F,0xFF,0x3F,0x83,0x01,0x83,0x01,0x83,0x03,0x83,0x07,0x83,0x0F,0xC7,0x1D,0xFE,0x38,0x7C,0x30,0x00,0x00, // Code for char R0x3C,0x0C,0x7E,0x1C,0xE7,0x38,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC3,0x30,0xC7,0x39,0x8E,0x1F,0x0C,0x0F,0x00,0x00, // Code for char S0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0xFF,0x3F,0xFF,0x3F,0x03,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00, // Code for char T0xFF,0x07,0xFF,0x1F,0x00,0x38,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x38,0xFF,0x1F,0xFF,0x07,0x00,0x00, // Code for char U0x07,0x00,0x3F,0x00,0xF8,0x01,0xC0,0x0F,0x00,0x3E,0x00,0x3E,0xC0,0x0F,0xF8,0x01,0x3F,0x00,0x07,0x00,0x00,0x00, // Code for char V0xFF,0x3F,0xFF,0x3F,0x00,0x1C,0x00,0x06,0x80,0x03,0x80,0x03,0x00,0x06,0x00,0x1C,0xFF,0x3F,0xFF,0x3F,0x00,0x00, // Code for char W0x03,0x30,0x0F,0x3C,0x1C,0x0E,0x30,0x03,0xE0,0x01,0xE0,0x01,0x30,0x03,0x1C,0x0E,0x0F,0x3C,0x03,0x30,0x00,0x00, // Code for char X0x03,0x00,0x0F,0x00,0x3C,0x00,0xF0,0x00,0xC0,0x3F,0xC0,0x3F,0xF0,0x00,0x3C,0x00,0x0F,0x00,0x03,0x00,0x00,0x00, // Code for char Y0x03,0x30,0x03,0x3C,0x03,0x3E,0x03,0x33,0xC3,0x31,0xE3,0x30,0x33,0x30,0x1F,0x30,0x0F,0x30,0x03,0x30,0x00,0x00, // Code for char Z0x00,0x00,0x00,0x00,0xFF,0x3F,0xFF,0x3F,0x03,0x30,0x03,0x30,0x03,0x30,0x03,0x30,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char [0x0E,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x07,0x00,0x0E,0x00,0x1C,0x00,0x18, // Code for <Backslash>0x00,0x00,0x00,0x00,0x03,0x30,0x03,0x30,0x03,0x30,0x03,0x30,0xFF,0x3F,0xFF,0x3F,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ]0x60,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x00,0x0E,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0x60,0x00, // Code for char ^0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0, // Code for char _0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x7E,0x00,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char `0x00,0x1C,0x40,0x3E,0x60,0x33,0x60,0x33,0x60,0x33,0x60,0x33,0x60,0x33,0x60,0x33,0xE0,0x3F,0xC0,0x3F,0x00,0x00, // Code for char a0xFF,0x3F,0xFF,0x3F,0xC0,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x1F,0x80,0x0F,0x00,0x00, // Code for char b0x80,0x0F,0xC0,0x1F,0xE0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xC0,0x18,0x80,0x08,0x00,0x00, // Code for char c0x80,0x0F,0xC0,0x1F,0xE0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x30,0xC0,0x30,0xFF,0x3F,0xFF,0x3F,0x00,0x00, // Code for char d0x80,0x0F,0xC0,0x1F,0xE0,0x3B,0x60,0x33,0x60,0x33,0x60,0x33,0x60,0x33,0x60,0x33,0xC0,0x13,0x80,0x01,0x00,0x00, // Code for char e0xC0,0x00,0xC0,0x00,0xFC,0x3F,0xFE,0x3F,0xC7,0x00,0xC3,0x00,0xC3,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char f0x80,0x03,0xC0,0xC7,0xE0,0xCE,0x60,0xCC,0x60,0xCC,0x60,0xCC,0x60,0xCC,0x60,0xE6,0xE0,0x7F,0xE0,0x3F,0x00,0x00, // Code for char g0xFF,0x3F,0xFF,0x3F,0xC0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x00,0xC0,0x3F,0x80,0x3F,0x00,0x00,0x00,0x00, // Code for char h0x00,0x00,0x00,0x00,0x00,0x30,0x60,0x30,0xEC,0x3F,0xEC,0x3F,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char i0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xE0,0x00,0xC0,0x60,0xC0,0xEC,0xFF,0xEC,0x7F,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char j0x00,0x00,0xFF,0x3F,0xFF,0x3F,0x00,0x03,0x80,0x07,0xC0,0x0F,0xE0,0x1C,0x60,0x38,0x00,0x30,0x00,0x00,0x00,0x00, // Code for char k0x00,0x00,0x00,0x00,0x00,0x30,0x03,0x30,0xFF,0x3F,0xFF,0x3F,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char l0xE0,0x3F,0xC0,0x3F,0xE0,0x00,0xE0,0x00,0xC0,0x3F,0xC0,0x3F,0xE0,0x00,0xE0,0x00,0xC0,0x3F,0x80,0x3F,0x00,0x00, // Code for char m0x00,0x00,0xE0,0x3F,0xE0,0x3F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x00,0xC0,0x3F,0x80,0x3F,0x00,0x00, // Code for char n0x80,0x0F,0xC0,0x1F,0xE0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x1F,0x80,0x0F,0x00,0x00, // Code for char o0xE0,0xFF,0xE0,0xFF,0x60,0x0C,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0x18,0xE0,0x1C,0xC0,0x0F,0x80,0x07,0x00,0x00, // Code for char p0x80,0x07,0xC0,0x0F,0xE0,0x1C,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0x0C,0xE0,0xFF,0xE0,0xFF,0x00,0x00, // Code for char q0x00,0x00,0xE0,0x3F,0xE0,0x3F,0xC0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x00,0xC0,0x00,0x00,0x00, // Code for char r0xC0,0x11,0xE0,0x33,0x60,0x33,0x60,0x33,0x60,0x33,0x60,0x33,0x60,0x3F,0x40,0x1E,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char s0x60,0x00,0x60,0x00,0xFE,0x1F,0xFE,0x3F,0x60,0x30,0x60,0x30,0x60,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char t0xE0,0x0F,0xE0,0x1F,0x00,0x38,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x18,0xE0,0x3F,0xE0,0x3F,0x00,0x00, // Code for char u0x60,0x00,0xE0,0x01,0x80,0x07,0x00,0x1E,0x00,0x38,0x00,0x38,0x00,0x1E,0x80,0x07,0xE0,0x01,0x60,0x00,0x00,0x00, // Code for char v0xE0,0x07,0xE0,0x1F,0x00,0x38,0x00,0x1C,0xE0,0x0F,0xE0,0x0F,0x00,0x1C,0x00,0x38,0xE0,0x1F,0xE0,0x07,0x00,0x00, // Code for char w0x60,0x30,0xE0,0x38,0xC0,0x1D,0x80,0x0F,0x00,0x07,0x80,0x0F,0xC0,0x1D,0xE0,0x38,0x60,0x30,0x00,0x00,0x00,0x00, // Code for char x0x00,0x00,0x60,0x00,0xE0,0x81,0x80,0xE7,0x00,0x7E,0x00,0x1E,0x80,0x07,0xE0,0x01,0x60,0x00,0x00,0x00,0x00,0x00, // Code for char y0x60,0x30,0x60,0x38,0x60,0x3C,0x60,0x36,0x60,0x33,0xE0,0x31,0xE0,0x30,0x60,0x30,0x20,0x30,0x00,0x00,0x00,0x00, // Code for char z0x00,0x00,0x80,0x00,0xC0,0x01,0xFC,0x1F,0x7E,0x3F,0x07,0x70,0x03,0x60,0x03,0x60,0x03,0x60,0x00,0x00,0x00,0x00, // Code for char {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0x3F,0xBF,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char |0x00,0x00,0x03,0x60,0x03,0x60,0x03,0x60,0x07,0x70,0x7E,0x3F,0xFC,0x1F,0xC0,0x01,0x80,0x00,0x00,0x00,0x00,0x00, // Code for char }0x10,0x00,0x18,0x00,0x0C,0x00,0x04,0x00,0x0C,0x00,0x18,0x00,0x10,0x00,0x18,0x00,0x0C,0x00,0x04,0x00,0x00,0x00, // Code for char ~0x00,0x00,0x18,0x00,0x3C,0x00,0x66,0x00,0x66,0x00,0x3C,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // Code for <Degrees>};What platform are you using ? there are tons of libraries that can help you with this sort of stuff.. If I can find the dam project I will send you all the code.

author: shebu18
author_rank: Frequent Contributor
timestamp: July 24, 2015, 12:07:01 pm
content: Thanks for the reply, I use STM32L152RB chip and CooCox as IDE. Right now i managed to display standard font on the lcd but i wanted to display bigger numbers.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: July 24, 2015, 12:26:17 pm
content: Quote from: shebu18 on July 24, 2015, 12:07:01 pmthe font data posted above (in this thread) is a bigger size font.best way to understand how to write these is to look at the extracted data - eg, for the number '5'0x3F,0x0C,0x7F,0x1C,0x63,0x38,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0xE3,0x38,0xC3,0x1F,0x83,0x0F, // 5is (ignore the border I added):Code:+----------------+| 111111 11 || 1111111 111 || 11 11 111 || 11 11 11 || 11 11 11 || 11 11 11 || 11 11 11 || 11 11 11 ||111 11 111 ||11 11 11111||1 11 1111|+----------------+so, to display this correctly, you must write odd bytes out, then re-position to write position and and write the even bytesthe same technique can be used for even bigger fonts

author: amyk
author_rank: Super Contributor
timestamp: July 24, 2015, 02:12:39 pm
content: Wouldn't it be better to just reformat the font data so you can write it to the display in a simpler order?

author: diyaudio
author_rank: Frequent Contributor
timestamp: July 25, 2015, 06:10:21 pm
content: Right, as promised find an attachment with the font memory maps for small, medium and large size fonts as well as the Nokia 5110 driver (I used in my STM32F103 project).I even through in the ability to read images as well (attached is a memory map of the open source logo see font.h)Usage will look like this.Code:// Draw open source logoLCD5110_clear();LCD5110_drawBitmap(14, 0, oshw_logo, 56, 48);Delay_ms(500);Delay_ms(500);// Now draw some text, LCD5110_SetFont will internally select large font, of course its not the best way so change the driver as you wish.char buffer_int ;char buffer_float ;sprintf(buffer_int, "%d", 50);sprintf(buffer_float, "%.4f", 0.5);LCD5110_SetFont(true);LCD5110_num_string(buffer_int, 0, 0);LCD5110_SetFont(true);LCD5110_num_string(buffer_float, 0, 2);

author: shebu18
author_rank: Frequent Contributor
timestamp: July 26, 2015, 06:08:10 am
content: Thank you for the example and font files. Do you make float or int to string conversions on your stm32? I can not find a valid example and library for this.

author: briselec
author_rank: Regular Contributor
timestamp: July 28, 2015, 10:25:32 am
content: This is what I use for itoa. Found it somewhere on the net.Code:char *itoa(int value, char *result, int base) {// check that the base if validif(base < 2 || base > 36){*result = '\0';return result;}int tmp_value;char *ptr = result, *ptr1 = result, tmp_char;do {tmp_value = value;value /= base;*ptr++ = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz" [35 + (tmp_value - value * base)];} while(value);// Apply negative signif (tmp_value < 0)*ptr++ = '-';*ptr-- = '\0';while(ptr1 < ptr) {tmp_char = *ptr;*ptr--= *ptr1;*ptr1++ = tmp_char;}return result;}

author: shebu18
author_rank: Frequent Contributor
timestamp: October 10, 2015, 02:22:42 pm
content: Something got me thinking.Would it be better to use a array in memory and modify that or write directly to the display. If i use the array than i would need to use a timer to update the display. Would i harm the display if i write to it that often?(24/sec) Would i harm a display if i do that to it?Thanks

author: amyk
author_rank: Super Contributor
timestamp: October 10, 2015, 03:19:10 pm
content: Not for a small embedded system with a display like this. It has its own memory, don't waste time copying and keeping duplicate data around.(In fact you can - and I've actually seen this before - use a small amount of the memory in the display if the main controller doesn't have enough RAM.)