View previous topic :: View next topic |
Author |
Message |
prisim
Joined: 07 Nov 2013 Posts: 6
|
GLCD Fonts Problem |
Posted: Tue Apr 21, 2015 10:08 pm |
|
|
Hello,
I have problem here with fonts on GLCD, i am using built in graphics.h and HDM64GS12.c for my KS0108 base GLCD.
Everything is in perfect order but the font! I convert the ARIAL font with mikroe font converter, but the font is shown vertically on GLCD. I also used many other font generators (the dot factor, MCU font generator etc..). But every time when i want to add new font array my font is shown vertically on GLCD.
Please say something regarding this matter.
My main program code.
Code: | #include <16F877A.h>
#device *=16
#include <stdlib.h>
#include <string.h>
#USE DELAY (CLOCK=4000000)
//#include <24512.c> //for the atmel eeprom
#include <math.h>
#include <C:\Users\mPc\Desktop\New folder (2)\HDM64GS12.c>
#include <C:\Users\mPc\Desktop\New folder (2)\GRAPHICS.c>
#fuses HS,NOWDT,NOLVP
char text[]="A";
void main()
{
glcd_init(ON);
delay_ms(200);
glcd_text57(15,5,text,2,ON);
}
|
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Apr 22, 2015 6:44 am |
|
|
you could rearrange the X and Y of the array..
array(X,Y) to array(Y,X)
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Wed Apr 22, 2015 7:26 am |
|
|
Start with the question does it do this on the real display?.
On Isis, you can specify where the 0,0 point of the graphic display is, and the direction of X & Y, when you set it up. What you are showing is what you would see if this was set to be at the bottom left corner, with X running vertically, instead of at the top left, with X running to the right.
You may well just have Isis setup wrong.
The font creator program does allow you to output the fonts in any orientation. Again this could be set wrong. |
|
|
prisim
Joined: 07 Nov 2013 Posts: 6
|
|
Posted: Wed Apr 22, 2015 10:07 pm |
|
|
Thanks both of you for replies,
I am confused in this , that if there is a problem with X or Y orientation in ISIS or in ARRAY, then why the same font working well with MIKROE glcd routine ? it shows good on ISIS too.
And could you please tell me how to change the X and Y in mikroe font creator. or any other. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Thu Apr 23, 2015 12:48 am |
|
|
Start at the beginning. You left out the critical bit of data that the sample font worked.... Aaargh!.
Now you need to understand that displays will exist that are laid out side on, or even inverted (this is why Isis allows these to be changed). So if your display was displaying the fonts all sideways, I'd immediately say 'Isis setting'.
However if the sample font works, then it becomes (of course) a Microe setting.
You are using the wrong format for the output. You need to be selecting 'Export for TFT and new GLCD', as the output format. The different format options control the size of the data output, and the orientation. |
|
|
|