128x64 GLCD basic questions

Thread Starter

embpic

Joined May 29, 2013
189
i am very new to this type of lcd. till now i have used the 16x2, 16x4 lcd. But after googling i found that there is some
kinda font genrator and lots of stuff regading this. my doubt
Is there necessory font genrator or font need to feed,if i want to display normal text?
as in 16x4 or 16x2 there are segment is of 5x7. so in 128x64 lcd what is segment size.?
 

takao21203

Joined Apr 28, 2012
3,702
you need binary font data.

on a GLCD, bitmaps can be placed freely.

Also you need a string print function.

You can copy all pixels, which is faster if you align it to byte boundaries.

Or you can copy only set pixels (and you have to erase as well).

About smallest possible size is 5 pixels height (only capital letters), width is upto 5 pixels but looks much better if you use proportional fonts.

I could give you the code for that if you want.
 

takao21203

Joined Apr 28, 2012
3,702
i could even drop in C code for printing and accessing the GLCD (I made it more than a year ago and it is not very good + not well commented). When I can find it, dont know if I still have it on my current machine.
 

Thread Starter

embpic

Joined May 29, 2013
189
ok sir provide me code and thank for that.
but i have doubt that if i am send ascii string "ALL ABOUT CIRCUIT" then will it display?
or i will need to provide font to GLCD.
Thanks again sir.
 

takao21203

Joined Apr 28, 2012
3,702
ok sir provide me code and thank for that.
but i have doubt that if i am send ascii string "ALL ABOUT CIRCUIT" then will it display?
or i will need to provide font to GLCD.
Thanks again sir.
Actually...

I don't have a string routine for this GLCD.
I have one for a color TFT but that works different.

I copy the font definition into the thread soon, and I will see what is useful from the GLCD stuff.

By the way it's for LED matrix, the one for the color TFT was taken from the internet somewhere i did not make it myself.

Maybe I put it on a webpage later during the day. Is it urgent, means are you working at this right now?
 

ErnieM

Joined Apr 24, 2011
8,377
if i am send ascii string "ALL ABOUT CIRCUIT" then will it display?
or i will need to provide font to GLCD.
It definitely will NOT display what you want... it may display some gibberish, not text data.

The input to a GLCD is an 8 bit word, and the screen is divided up into tiny 8 pixel areas. When you input a byte you are setting individual pixels on the screen, so 0x00 is all black and 0xFF is a little white line. Actually before you print the line you need some code to direct it where it should go.

So to print "ALL ABOUT CIRCUITS" you pass that string to one routine, that calls another which looks up each letter to find it's "bitmap" (the 1 and 0 data to draw a single letter), sends each line of the letter data to a routine that draws each line of the letter.

It's a lot of routines all working together and you need every level to make it usefully reusable; much of the same code can also draw pictures.

I too have some hacked together poorly commented code from an old project. I was starting to document it all so others could use it when I jumped into the color GLCD world using Microchip's graphic libraries.
 

Thread Starter

embpic

Joined May 29, 2013
189
Thank you takao21203 and ErnieM sir.

Is it urgent, means are you working at this right now?
yes sir i have started to work on this LCD.

and again small doubt is
this GLCD is just dot matrix display like simple LED dot matrix ?
like 16x4 Lcd there is no such alpha numbers?
 

takao21203

Joined Apr 28, 2012
3,702
Thank you takao21203 and ErnieM sir.



yes sir i have started to work on this LCD.

and again small doubt is
this GLCD is just dot matrix display like simple LED dot matrix ?
like 16x4 Lcd there is no such alpha numbers?
Yes it is basically a dot matrix.

I found some code however it is for a color TFT, you have to make some changes. You need to work out the pixel routine, so you can set a pixel to a value at a x/y position.

Then insert that into the string print function, and remove the LCD commands. They won't work on 128x64 GLCD at all.

The variable names are not so good, adapted from 8051 C source and did not change them.

http://aranna.altervista.org/dragon...jects/glcd-128x64-font-string-print-function/
 

ErnieM

Joined Apr 24, 2011
8,377
Back when I was using my GLCD I did not write individual pixels, but groups of 8 which uses up a complete byte nicely.
 

takao21203

Joined Apr 28, 2012
3,702
Back when I was using my GLCD I did not write individual pixels, but groups of 8 which uses up a complete byte nicely.
It's a TFT and you need 16 bits for each pixel.
Also I wanted positioning on pixel borders not on character cells.

So you you OR 8 bits together, or also first read the background for transparent text.
 

takao21203

Joined Apr 28, 2012
3,702
that's one way, buy a development board of course it will contain code to make use of the GLCD or TFT.

It can be difficult to buy more of the specific displays or expensive- there are a few different controllers.

Then in some case if a PCB is produced, let some programmer just port the code as a job (it takes too much time for a designer to deal with these low-level issues).

Also look at the Microchip application library and the new Microchip Harmony.

Getting a display going normally is just a days work, GLCD is easier than Hitachi LCD with the weird initialization.

Just examine the controller datasheet, and construct suitable plotting routines from that.
 

MrChips

Joined Oct 2, 2009
30,809
You are using a graphics LCD which is very different from a character LCD.
You have one of two options:

1) Use a graphics LCD library.

2) Read the manual for the GLCD and create your own library functions.
 

ErnieM

Joined Apr 24, 2011
8,377

Thread Starter

embpic

Joined May 29, 2013
189
yes this will be good option but i saw in some schematic and this one. so i have doubt in connection. and specially about POT. which connect across ground and vout of lcd. and given to contrast adj.

bcoz with this connection lcd doesn't get glow up.
it shows off only.
 

takao21203

Joined Apr 28, 2012
3,702
Will it work? Probably.

Will you like it? Maybe yes, maybe no.

The pic16f887 has a large amount of memory (14K) for a PIC, but you may want more one day. The program memory needs to keep all your image data, unless you have an SD card or such to pull it out of.

If you are just doing soft buttons and the like it should be fine.
14K is small these days...

16K is the minimum useable amount.
32 K is pretty standard.

Oh yes I use 16F5X.

16F54 : 512 words
16F57: 2048 words
16F59: 2048 words + more RAM (16 byte banks)

2

Incorrect. Often a serial EEPROM is used- if you dont have a programmer, you have to FLASH the PIC with slices and transfer...

Or a serial FLASH for larger bitmaps (color TFT).


Entry level 24F PICs are cheaper than most of the older 16F PICs.
 

takao21203

Joined Apr 28, 2012
3,702
yes this will be good option but i saw in some schematic and this one. so i have doubt in connection. and specially about POT. which connect across ground and vout of lcd. and given to contrast adj.

bcoz with this connection lcd doesn't get glow up.
it shows off only.
Some older GLCDs have green LEDs- a few of them in parallel. Energy eater. Others have only one white LED, or a few blue LEDs (much less current).

Tap it with a DMM and if current/brightness are not abnormal, dont use resistor (it is often already present on PCB).
 
Top