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.

128X64 Graphical LCD foant size

Status
Not open for further replies.

samic45mit1

Member level 3
Joined
Dec 11, 2009
Messages
62
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
indore
Activity points
1,815
I am using 128X64 GLCD (KS0108) with ATMEGA32 Micro controller and I using lib given on link https://en.radzio.dxp.pl/ks0108/ for same. I successfully interface it with atmega32 but when I try to change font size 5X8 to 12X16 (TABLE FOR 12x16 IS ALREADY GIVEN IN HEADER) in below function by changing value of i loop to 12 and (12*charToWrite) but I not gatting any result.


Code C - [expand]
1
2
3
4
5
6
7
8
9
void GLCD_WriteChar(char charToWrite)
{
   int i 
   
    charToWrite -= 32; 
    for(i = 0; i < 5; i++) 
         GLCD_WriteData(GLCD_ReadByteFromROMMemory((char *)((int)font5x8+(5 * charToWrite) + i))); 
         GLCD_WriteData(0x00);
}



So please tell what is wrong.
 
Last edited by a moderator:

Can you show us what did you write exactly to use the bigger fonts.

I think something more than this needs to be done, as the fonts you are trying to use bigger than the page size and that will affect this.
 

This is the change I made in above function
void GLCD_WriteChar(char charToWrite)
{
int i

charToWrite -= 32;
for(i = 0; i < 12; i++)
GLCD_WriteData(GLCD_ReadByteFromROMMemory((char *)((int)font12x16+(12 * charToWrite) + i)));
GLCD_WriteData(0x00);
}
 

Each 16 pixel column will occupy two bytes, so the code can hardly work.
 

Hello!
You will need to rearrange your data in 2 rows. On most of the small graphic LCDs, 1 byte writes a column
of 8 pixels. So you need to write the upper part of your character on one 8-pixel band, and the lower part
on the next 8-pixel band.
Nothing complicated, just some index manipulation.
Pascal
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top