samic45mit1
Member level 3
[moved] probleum in using st7565 glcd
I am using st7565 lib posted on link https://www.edaboard.com/threads/210640/ . I am trying to use function given below, and it is working fine. But when I try to use with font of diffrent size then lcd show garbage data. i USE FONT_WIDTH=24 and FONT_OFFSET=32. I think some think is wrong with FONT_OFFSET. So can you tell how to find FONT_OFFSET ?? how to select this, and relation or algo??
Thankyou
I am using st7565 lib posted on link https://www.edaboard.com/threads/210640/ . I am trying to use function given below, and it is working fine. But when I try to use with font of diffrent size then lcd show garbage data. i USE FONT_WIDTH=24 and FONT_OFFSET=32. I think some think is wrong with FONT_OFFSET. So can you tell how to find FONT_OFFSET ?? how to select this, and relation or algo??
Thankyou
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 void GLCD_WriteChar(char charCode) //function display font { unsigned char fontCollumn; LCD_PAGE_COL_CHECK_FONT1(); for(fontCollumn = 0; fontCollumn < FONT_WIDTH; fontCollumn++) LCD_WRITE_DATA(font5x7[((charCode- FONT_OFFSET) * FONT_WIDTH) + fontCollumn]); LCD_WRITE_DATA(0); } #define FONT12X16_WIDTH 12 #define FONT12X16_HEIGHT 16 //font table, I give table of 3 but actual size is 96 static uint8_t __attribute__ ((progmem)) Font12x16[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "(space)" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0xFF, 0x33, 0xFF, 0x33, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "!" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // """ }
Last edited by a moderator: