Glcd Fonts

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Glcd Fonts

Postby cobra1 » Tue Aug 23, 2011 9:14 pm

Hi, Im looking into playing with the Nokia LCD again, I was looking at the PDF from the older eblock with this LCD onboard, the EB043 i think.

It touches on creating fonts and texts, using a lookup table. At the end of this PDF is a lookup table.

When you open up the Glcd in flowcode and goto ext properties, there is a box with numbers in, and the option to use a custom font, does this lookup table get put in here?

I looked at the C file hoping to find this lookup table in there as with the 128x64 LCD, bit its not there.

How would i put this lookup table into the Glcd file??

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Glcd Fonts

Postby cobra1 » Tue Aug 23, 2011 11:49 pm

I think i may have found something,

Code: Select all

//ASCII Pixel data
#ifdef _BOOSTC
   rom char* ASCII1 =
   %j
   rom char* ASCII2 =
   %k
   rom char* ASCII3 =
   %l
   rom char* ASCII4 =
   %m
   rom char* ASCII5 =
   %n
   rom char* ASCII6 =
   %o
   rom char* ASCII7 =
   %p
   rom char* ASCII8 =
   %q


do i replace this with the ascii code pixel codes, and remove the %j,%k,%l,%m,%n,%o,%p? or do these have to stay?
also in ext properties do i set it to custom font and remove the numbers from the box?

User avatar
Benj
Matrix Staff
Posts: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4603 times
Been thanked: 4241 times
Contact:

Re: Glcd Fonts

Postby Benj » Wed Aug 24, 2011 9:50 am

Hello,

The gLCD component properties populate the font data %j - %q you can either edit the fonts directly in the C file or you can edit via the component properties.

Here are instructions for replacing one of the characters via the component properties window.

viewtopic.php?f=29&t=8609#p25804
These users thanked the author Benj for the post:
cobra1 (Wed Aug 24, 2011 7:38 pm)
Rating: 5.26%
 

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Glcd Fonts

Postby cobra1 » Wed Aug 24, 2011 6:55 pm

Hi Ben

Thanks for that link, i think i can work it out from here.

1more thing about these LCDs, what chipset does flowcode support?? in the forums i read a post from one of the admins saying it was a Phillips chipset, however in the EB043 pdf it says it an Epson chipset.
Could you confirm which one the software is written for?

I have what i belive to be a Phillips chipset LCD here but i have yet to wire it up and test it.

User avatar
Benj
Matrix Staff
Posts: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4603 times
Been thanked: 4241 times
Contact:

Re: Glcd Fonts

Postby Benj » Thu Aug 25, 2011 10:13 am

Hello Cobra,

Hm its been a while but I think off the top of my head the displays we were using were the Epson style displays. The difference between the two is minor and is simply a change to the data byte for a single command in the initialize function.

Eg one display comes out looking inverted and one does not. If the display looks inverted then this is the command your interested in.

gLCD_SendByte(MX_GFXLCD_CMD, 0x20); //No inveMX_GFXLCD_RSion, 0x21 would be inverted display (different coloMX_GFXLCD_RS!)

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Glcd Fonts

Postby cobra1 » Sun Aug 28, 2011 6:13 pm

Hi Ben,

I have got my LCD wired up and finally got it to display something.

The LCD has to be turned upside down to read it but thats not a major concern. This command : gLCD_SendByte(MX_GFXLCD_CMD, 0x20); //No inveMX_GFXLCD_RSion, 0x21 would be inverted display (different coloMX_GFXLCD_RS!)
does not work for me, when i change 0x20 to 0x21 of does not invert the screen.

I am able to get different backgrounds to work, i.e red, blue, green etc, and the foreground colours also work, but these only work when set in the ext properties.

If i use the SET FORECOLOUR, in flowcode the text always prints in black regardless of the colour i set it as.

Any ideas what this could be due to?

Also just out of curiosity, in this command : gLCD_SendByte(MX_GFXLCD_CMD, 0x20); //No inveMX_GFXLCD_RSion, 0x21 would be inverted display (different coloMX_GFXLCD_RS!)
what is meant by this part : (different coloMX_GFXLCD_RS!)

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Glcd Fonts

Postby cobra1 » Sun Aug 28, 2011 7:38 pm

Just an update,

I figured out the colour of the font issue, also added in a few extra commands to set x, y orientation, and also setup for the contrast

There was one last thing, is there any way to speed up the write to the LCD? it seems pretty slow as you can see it scrolling when filling in a box or on initialisation. would be nice if it was instant.

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Glcd Fonts

Postby cobra1 » Thu Mar 22, 2012 7:46 pm

Hi, i could do with a bit of a nudge guys.

I am struggling to change the font size from 8x5 pixel to 8x6 pixel on the GLCD.

In the properties box the font that is defined there i can change as long as i only use 8x5 pixel, if i try to add the last byte it automatically removes it, So i cant get an 8x6 pixel character to display.

Can anyone help?

User avatar
Benj
Matrix Staff
Posts: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4603 times
Been thanked: 4241 times
Contact:

Re: Glcd Fonts

Postby Benj » Fri Mar 23, 2012 12:38 pm

Hello,

Are you using Flowcode v4? If so then you can use code customisation on the gLCD component to manually override the font ROM arrays and their contents.