Go Down

Topic: UTFT_GHL now shipping from CTE!! (Read 20587 times) previous topic - next topic

ghlawrence2000

For anybody else wondering what the IC contains, 236 icons 42*42 pixels, the Coldtears Coloured smoke image, 320*240 pixels, 6 animated Monsters Inc images 62*62 pixels.

Image number and size allocation thus :-
Code: [Select]
Image Number : 1 w :  42 : h :  42
Image Number : 2 w :  42 : h :  42
Image Number : 3 w :  42 : h :  42
 
    INCLUSIVE    
 
Image Number : 234 w :  42 : h :  42
Image Number : 235 w :  42 : h :  42
Image Number : 236 w :  42 : h :  42
Image Number : 237 w : 320 : h : 240
Image Number : 275 w :  62 : h :  62
Image Number : 277 w :  62 : h :  62
Image Number : 279 w :  62 : h :  62
Image Number : 281 w :  62 : h :  62
Image Number : 283 w :  62 : h :  62
Image Number : 285 w :  62 : h :  62


Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

JohnPrime

Good work on finding that! Noted :)

try adding Serial.begin(115200); and try that...

Capricious as these things are, it was definitely worth the punt, but no luck. At ~8 seconds into this video the two things that don't work for me are shown, fortuitously, together on the two displays:

https://www.youtube.com/watch?v=JXcVw8dwxPw

It's the screen of accented characters that halt the program.

Coldtears did offer the suggestion that  ' u might forgot to pull up the fontIC CS pin, and random data in the spi bus made the data in the fontIC corrupted'. I haven't altered the example program and can't see any means of affecting the CS pin otherwise, so the suggestion was of, er, limited use. Don't even know what it means ...

PS If you'd rather I moved this to its own thread, please say.


ghlawrence2000

Coldtears did offer the suggestion that  ' u might forgot to pull up the fontIC CS pin, and random data in the spi bus made the data in the fontIC corrupted'. I haven't altered the example program and can't see any means of affecting the CS pin otherwise, so the suggestion was of, er, limited use. Don't even know what it means ...

PS If you'd rather I moved this to its own thread, please say.

Coldtears I have wholeheartedly been recommending on these forums for months now, given the quantity of Sainsmart related problems we see on these forums, and how many of those problems are fixed by Coldtears hardware. However, I recently had cause to request assistance from Coldtears, unrelated to the font ic, and to be honest, was severely unimpressed at being told they don't support Sainsmart, as the only reason that word was mentioned........... was because on this occasion, the Sainsmart hardware worked faultlessly, it was the Coldtears hardware with the problem, but they stalled as soon as the word Sainsmart was mentioned..... I accused them of money grabbing and poor customer service.... And doubled my efforts to implement their font ic...........

I appreciate this off topic, but it is MY thread so I don't feel guilty  :smiley-mr-green:  :P this is an email sent to them this evening....
Quote
Hello again,

Considering how unhelpful you were when I approached you for help recently, I have no other motivation to tell you the outcome of mine and David's efforts to resolve the Touch problems, other than I would like to think you will consider assisting other customers in future if anybody asks you about similar problems to the ones David experienced!!

To remind you, (I promise not to mention Sainsmart because you appear to forget how to read when you see that word!!!), David had a genuine CTE TFT Mega shield, and Genuine CTE 7" CPLD display, and touch functionality stopped working if the Serial monitor was opened. Well, he tried 2 different external power supplies, both exhibited the same symptoms. So imagine our surprise to find the problem fixed, if NO additional power supply was used.

To reiterate, when used with extra power, touch stops working when serial monitor is opened, BUT if no additional power is used, there are NO problems at all.  Hope this helps somebody else.
There is no need to make a new thread, I think it is long overdue we have a central location to discuss font ic related issues.

Have you tried editing the program yourself? Do NORMAL characters print ok? eg "ABCDEFGabcdefg" or "12345" ? Is it localised to 1 Font, or do ALL fonts exhibit the same problems?

Just so you know what I am working on now I have a working font ic....... If you have played with UTFT and UTFT fonts at all, you will know there is the ability to print a string CENTERed.... I am trying to implement that for the BVS fonts, which you may or maynot know, are proportional eg W is 10 pixels wide, whereas I is 2 pixels....

By the way, I just noticed there is an error in the sketch I am using, they used image 287 after the color bars, of course it should be 237!!

I don't know how far you have gone to try to rectify this??

What model CTE display are you using?

Include your sketch that is not working.......

Simple proposal, try something like this.....

Code: [Select]
void setup()
{
  Serial.begin(115200);
  delay(1000);
  myGLCD.InitLCD();
  myGLCD.setFont(SmallFont);
  myGLCD.setBackColor(VGA_BLACK);
  CTE_LCD.SPI_Flash_init(FLASH_CS_PIN);
}

void loop()
{
  CTE_LCD.show_color_bar();
  delay(1000);
  myGLCD.clrScr();
  CTE_LCD.Load_image(0,0,237);
  myGLCD.setColor(255, 222, 111);  //Set font color
  myGLCD.setBackColor(0, 0, 0);  //Set background color
  CTE_LCD.Set_character_spacing(1);
  CTE_LCD.Put_Text("Coldtears electronics",5,180,BVS_34);
  CTE_LCD.Put_Text("TFT LCD w/Font IC Demo",5,220,BVS_34);
  delay(1000);
  myGLCD.clrScr();
  CTE_LCD.Put_Text(" ",0,0,BVS_13);
  CTE_LCD.Put_Text("A",0,0,BVS_13);
  CTE_LCD.Put_Text("B",0,0,BVS_13);
  CTE_LCD.Put_Text("C",0,0,BVS_13);
  CTE_LCD.Put_Text("D",0,0,BVS_13);
  CTE_LCD.Put_Text("E",0,0,BVS_13);
  CTE_LCD.Put_Text("F",0,0,BVS_13);
  CTE_LCD.Put_Text("G",0,0,BVS_13);
  CTE_LCD.Put_Text("H",0,0,BVS_13);
  CTE_LCD.Put_Text("I",0,0,BVS_13);
  CTE_LCD.Put_Text("J",0,0,BVS_13);
  CTE_LCD.Put_Text("K",0,0,BVS_13);
  CTE_LCD.Put_Text("L",0,0,BVS_13);
  CTE_LCD.Put_Text("M",0,0,BVS_13);
  CTE_LCD.Put_Text("N",0,0,BVS_13);
  CTE_LCD.Put_Text("O",0,0,BVS_13);
  CTE_LCD.Put_Text("P",0,0,BVS_13);
  CTE_LCD.Put_Text("Q",0,0,BVS_13);
  CTE_LCD.Put_Text("R",0,0,BVS_13);
  CTE_LCD.Put_Text("S",0,0,BVS_13);
  CTE_LCD.Put_Text("T",0,0,BVS_13);
  CTE_LCD.Put_Text("U",0,0,BVS_13);
  CTE_LCD.Put_Text("V",0,0,BVS_13);
  CTE_LCD.Put_Text("W",0,0,BVS_13);
  CTE_LCD.Put_Text("X",0,0,BVS_13);
  CTE_LCD.Put_Text("Y",0,0,BVS_13);
  CTE_LCD.Put_Text("Z",0,0,BVS_13);
 
  while(1);
}


You will notice the coordinates are all 0,0 so will overprint, I couldn't be bothered to edit them for you....... you should be able to figure it out yourself.....

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

JohnPrime

I appreciate this off topic, but it is MY thread so I don't feel guilty  :smiley-mr-green:  :P
I agree that it's a salient place for a fontIC related problem but didn't want to derail the whole thread into another newb-rescuing exercise. Much appreciated :)


Quote from: ghlawrence2000 link=msg=2146489 date=1426713749
Have you tried editing the program yourself?
 Do NORMAL characters print ok? eg "ABCDEFGabcdefg" or "12345" ?
 Is it localised to 1 Font, or do ALL fonts exhibit the same problems?
I had managed to use the flash fonts in all sizes and several colours.
Your sketch worked apart from the image which didn't show at all, even inverted. It's only the font display from the 'while' loop that doesn't work.
I've tried changing the fonts in the sketch to other sizes with no effect.

Quote from: ghlawrence2000 link=msg=2146489 date=1426713749
Just so you know what I am working on now I have a working font ic.
Excellent news. We'll wait for full disclosure with bated breath :)



The display is a 320x240 with touchscreen and a fontIC shield on a mega 2560. I've attached the full example sketch from Coldtears with added comments pointing to which bits work and which don't.

Incidentally, the .raw images in UTFT_SdRaw display correctly.


Again, thanks for your advice. I'm guessing the flashIC's poorly ...

ghlawrence2000

So, lets try this from another angle........

Use the image uploader and send the coldtears smoke image to another location if everything else is working?

The way I figured out the image numbers was :

Code: [Select]
for(int location = 0; x<300; x++) {
myGLCD.clrScr();
CTE_LCD.Load_image(0,0,location);
delay(2000);
Serial.print("Image number ");
Serial.println(location);
}


try something like that???

G
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

JohnPrime

Use the image uploader and send the coldtears smoke image to another location if everything else is working?
The image uploader is not playing nicely for me. Remember what I said earlier about newbs derailing threads? :D


Code: [Select]
for(int location = 0; x<300; x++) {
myGLCD.clrScr();
CTE_LCD.Load_image(0,0,location);
delay(2000);
Serial.print("Image number ");
Serial.println(location);
}

That's a nice demonstration of how to use the serial port. Noted.
I did something similar with results not unlike yours in post 15. I noticed the 320x240 'smoke' image lives at location 219.

The really good news is that I've got the full shooting-match working as it should, by doing a clean install of 1.05 on a different computer with only Coldtears' SdFat and UTFT libraries installed.
After that I cleaned out the libraries from my main computer and reinstalled only the 2 Coldtears libs. Wouldn't compile (some error about fonts must be 'char' in DefaultFonts.c in UTFT). Commented out a couple of lines in that file, so it compiled but the displayed images were mangled.

I conclude that the current IDE version and the Coldtears demo are not bosom pals.


I shall watch this thread for more reports on your exploration of the flashIC.

PS Have some Karma.

ghlawrence2000

I did something similar with results not unlike yours in post 15. I noticed the 320x240 'smoke' image lives at location 219.

Wouldn't compile (some error about fonts must be 'char' in DefaultFonts.c in UTFT). Commented out a couple of lines in that file, so it compiled but the displayed images were mangled.

I conclude that the current IDE version and the Coldtears demo are not bosom pals.

PS Have some Karma.
So let's address the points you make.

Image location 219 is either something YOU messed up, or you have a different version of the font ic. The 41*41 icons occupy image locations 1-236....

'Some error' thats descriptive.... but I know what you mean. You need the latest version of UTFT, and there is absolutely no problems with Coldtears demo and IDE V1.6.1.

Thanks for the Karma.

Below is map of the icons. I found it somewhere, so can't take credit for it.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

JohnPrime

'Some error' thats descriptive.... but I know what you mean.
I was being ironically vague  :)  This is the error message:


~/sketchbook/libraries/UTFT/DefaultFonts.c:14:14: error: variable 'SmallFont' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 fontdatatype SmallFont[1144] PROGMEM={

You need the latest version of UTFT, and there is absolutely no problems with Coldtears demo and IDE V1.6.1.
Well there are here. I've used various combinations of IDE 1.05, 1.6, 1.61 with new and old versions of UTFT and the only one that runs without colour inversion (and without failing to run the accented characters screen) is on Windows 7 with IDE1.0.5 r2 and using the versions of SdFat and UTFT from Coldtears' 'image import' folder.

Infuriating, bizarre, capricious, I know. I think I shall leave this particular blind alley for now.

Thanks for the Karma.
You're more than welcome. I've learned a huge amount over the past couple of days.



Cheers,

John.

ghlawrence2000

I am not sure if you ACTUALLY want help, or detract from what I am aiming to achieve here?? :(

IF you have the latest version of UTFT (v.2.79), you will find your default fonts file looks like this :-

Which I PROMISE works with IDE v1.6.1!!!!

Code: [Select]
// DO NOT ADD YOUR OWN FONTS TO THIS FILE
// If you want to use your own/downloaded fonts you should just drop the font .c file into your sketch folder.
// -----------------------------------------------------------------------------------------------------------

#if defined(__AVR__)
#include <avr/pgmspace.h>
#define fontdatatype const uint8_t
#elif defined(__PIC32MX__)
#define PROGMEM
#define fontdatatype const unsigned char
#elif defined(__arm__)
#define PROGMEM
#define fontdatatype const unsigned char
#endif

// SmallFont.c
// Font Size : 8x12
// Memory usage : 1144 bytes
// # characters : 95

fontdatatype SmallFont[1144] PROGMEM={         
0x08,0x0C,0x20,0x5F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <Space>
0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00, // !
0x00,0x28,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "

etc


Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

ghlawrence2000

In the meantime, for anybody else, interested in further font ic development, I have now managed to implement CENTER and RIGHT justified placement of ALL of the BVS font sizes!! ;) :D Although so far this only works in Landscape format.

Example shown below.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

JohnPrime

I have UTFT (v.2.79), IDE v1.6.1 and my default fonts file is as you say. With this installation the demo presents the errors that I've stated. At this point the effort/returns ratio is telling me it's time to move on.

Yes, I'm very grateful for your help, as I've stated several times. No, I'm not trying to derogate your efforts  :); quite the contrary.


Good work with the FontIC!

Cheers,
J

luigi1705

Just an update for anyone still watching. I now have a routine which is capable of producing a verifiable FontIC. And a modified version of UTFT_CTE that works with CPLD displays!!

Regards,

Graham
Hi Graham, very good work. Sorry for my not socially acceptable English, but I'm interested for your work. Is it possible to have a tip for me for your modified version of UTFT_CTE for CPLD displays. I'm not familar in programming libraries, so it is a very strong way for me to the stars. I need it for my project "balancing machine" for copter brushless motors. All my displays 3,2", 5", 7" with ssd controllers (incl. winbond font IC) work fine, but I've an issues with my 7" CPLD display. I just do not get ahead :smiley-cry:

Regards
Ludwig

ghlawrence2000

Hi Ludwig,

I would like to have it working in portrait AND landscape mode if possible before I think about making it available to people. I am also thinking I would like some form of contribution since it was a bit of a nightmare to implement to be honest........

Watch this space.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

ghlawrence2000

For anybody else that struggled to put the font ic image onto a chip....... I have a stable reliable routine that will write any file to the SPI flash.

It is done using 'Processing' on the PC end, and a sketch on the Arduino / (CC3200 if you don't know, don't ask!), the Arduino sketch is now MEGA/DUE friendly.

I have discovered a pretty cool (free) hexeditor for Windows, called Hexedit 4.0, http://www.hexedit.com/

This makes it incredibly easy to append extra 'stuff' on the end of the font ic image, and then using my sketch, squirt the whole file to the SPI-flash. There is no clever file system, there is no structure, just place files anywhere you like, make a note of the addresses, and play to your hearts content.

I am currently using this approach to develop a webserver on the Arduino / CC3200 utilising HTML and JPEG files stored in SPI...

I also have a provisional Processing / Arduino sketch pair for extracting the contents of a SPI Flash ic also.

If anybody is interested in this or has any ideas for development, I would be interested to hear them.

As a result of the multiple projects on going currently, no time scales on completion of any of them  :smiley-roll-blue:

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

luigi1705

Hi Ludwig,

I would like to have it working in portrait AND landscape mode if possible before I think about making it available to people. I am also thinking I would like some form of contribution since it was a bit of a nightmare to implement to be honest........

Watch this space.

Regards,

Graham
Thanks Graham, I think I've understand you. I wait ... and I watch ... :smiley-cool:

Reagrds,

Ludwig

Go Up