don't quite understand function

Thread Starter

Bear_2759

Joined May 23, 2008
120
just tried it, compiler returns no errors but when uploaded it doesnt work.

I find it strange that this displays something on the LCD
Rich (BB code):
G=6;
PixelRow = FONT16x32[1][G];
but this leaves me with a blank screen

Rich (BB code):
G=31;
PixelRow = FONT16x32[1][G];
G--;
I may have to try and work out another approach. this should work fine but doesnt.
 

Thread Starter

Bear_2759

Joined May 23, 2008
120
now I've tried a few things that should work, and do when testing in visual studio but just not when I upload them to the arduino board and I'm not sure why, may be a hardware limitation or bug with the arduino compiler I dont know. I know that using unsigned char works for a limited number of characters so I think I'm going to try splitting the font table into 3 or 4 seperate font tables.
 

Thread Starter

Bear_2759

Joined May 23, 2008
120
I might be one step closer to understanding the issue. I just tried to create 3 seperate font tables, 32 characters per table all defined as unsigned char. the below code does not work, blank screen. but if I comment out the 2 else if's for 32-63 and 64-95 then it works for the first 32 characters. that's as much as I know though so if you have any ideas you can suggest...

Rich (BB code):
k=((c - 0x1F)-2);
if (k>=0 && k<=31){
    pFont = (unsigned char *)FONT16x32a;
}
else if (k>=32 && k<=63){
        pFont = (unsigned char *)FONT16x32b;
}
else if (k>=64 && k<=95){
        pFont = (unsigned char *)FONT16x32c;
}
 
Top