5" Sainsmart TFT Font IC?!

Hi,

have a small problem with my TFT

im using the Sainsmart 5" TFT with arduino due and the adapter board

On board 64Mbit SPI Flash for storing fonts of 10 sizes and 236 icons for custom application development
Write images/icons to flash memory via SD card with zero programming.

so i have trying the demo of this

https://code.google.com/p/cte-lcd-modules-arduino-library/downloads/list

Arduino 1.5.8

can someone help me ?

Show your code?

Did you uncomment \Arduino\libraries\UTFT\hardware\arm\HW_ARM_defines.h line 4? :-

#define CTE_DUE_SHIELD 1

UTFT myGLCD(CTE50, 25,26,27,28);

Extra DC power eg 9V/1A.

Thats the usual problems(besides the other Sainsmart related issues :wink: :stuck_out_tongue: )

Merry Christmas! ;D

Graham

Hi,

im try this code

// Image Importer to Flash memory
// for CTE LCD Modules
// (C) 2013 Coldtears electronics
// For use with CTE TFT LCD Modules w/Font and Icon Flash IC
// in combination with CTE TFT/SD Shield for Arduino DUE
// web: http://stores.shop.ebay.com/coldtears-electronics-store
// For Usage, please read the PDF in the download package
// 
// This ultility requires SDfat and a compatible SDcard
// web: http://code.google.com/p/sdfatlib/
// Please use the sdfat library in the package as it is slightly modified
//

#include <SdFat.h>
#include <UTFT.h>
#include <SdFatUtil.h>
#include <Importer.h>
#include "SPI.h"

#define BVS_13 10
#define BVS_15 12
#define BVS_19 14
#define BVS_22 18
#define BVS_28 22
#define BVS_34 28
#define BVS_43 38
#define BVS_52 53
#define BVS_74 78
#define BVS_112 122

UTFT myGLCD(CTE50); //Remember to change this for your LCD module

const uint8_t chipSelect = 53; // SD CSpin 
#define FLASH_CS_PIN 52  //Flash CSpin
#define SPI_RATE 4

#define BUF_SIZE 256
static char name[14];
static char flash_memory_type;
uint8_t buf[BUF_SIZE];

unsigned long Location;
unsigned long address;
char IMAGE_FILENAME[] = "0.CTE";
unsigned int MAX_sector;

// file system
SdFat sd;

// test file
SdFile file;


ArduinoOutStream cout(Serial);

#define error(s) sd.errorHalt_P(PSTR(s))
void setup() {
  delay(1000);
  Serial.begin(38400);
  SPI_Flash_init(FLASH_CS_PIN,SPI_RATE);
  myGLCD.SPI_Flash_init(FLASH_CS_PIN,SPI_RATE);
  myGLCD.InitLCD();
  myGLCD.show_color_bar(); 
  delay(1000);
  myGLCD.clrScr();
}

void loop() {
 
  delay(400);  
  myGLCD.setColor(255, 255, 0);   
  myGLCD.setBackColor(0, 0, 0);   
  myGLCD.Set_character_spacing(1); 
  myGLCD.Put_Text("TEST",5,5,BVS_28);
  char charBuf[1]; charBuf[0]=169;charBuf[1]=0;
  myGLCD.setColor(255, 0, 255);   
  myGLCD.Put_Text(charBuf,5,40,BVS_28);
  myGLCD.Put_Text(" Coldtears electronics",30,40,BVS_28);
  myGLCD.setColor(255, 255, 255); 
  
  
 while(1){}                                                  
}

iv got now a other error, everytime when im flashing a other pic to the flash iv got a other error. it seems to be missing the fonts in die flash.

im using SPIFLASH lib. Have Someone a flash backup ?

external power is connected. without externel power the display doesnt work.

Hi,

im try this code

// Image Importer to Flash memory
// for CTE LCD Modules
// (C) 2013 Coldtears electronics
// For use with CTE TFT LCD Modules w/Font and Icon Flash IC
// in combination with CTE TFT/SD Shield for Arduino DUE
// web: http://stores.shop.ebay.com/coldtears-electronics-store
// For Usage, please read the PDF in the download package
// 
// This ultility requires SDfat and a compatible SDcard
// web: http://code.google.com/p/sdfatlib/
// Please use the sdfat library in the package as it is slightly modified
//

#include <SdFat.h>
#include <UTFT.h>
#include <SdFatUtil.h>
#include <Importer.h>
#include "SPI.h"

#define BVS_13 10
#define BVS_15 12
#define BVS_19 14
#define BVS_22 18
#define BVS_28 22
#define BVS_34 28
#define BVS_43 38
#define BVS_52 53
#define BVS_74 78
#define BVS_112 122

UTFT myGLCD(CTE50); //Remember to change this for your LCD module

const uint8_t chipSelect = 53; // SD CSpin 
#define FLASH_CS_PIN 52  //Flash CSpin
#define SPI_RATE 4

#define BUF_SIZE 256
static char name[14];
static char flash_memory_type;
uint8_t buf[BUF_SIZE];

unsigned long Location;
unsigned long address;
char IMAGE_FILENAME[] = "0.CTE";
unsigned int MAX_sector;

// file system
SdFat sd;

// test file
SdFile file;


ArduinoOutStream cout(Serial);

#define error(s) sd.errorHalt_P(PSTR(s))
void setup() {
  delay(1000);
  Serial.begin(38400);
  SPI_Flash_init(FLASH_CS_PIN,SPI_RATE);
  myGLCD.SPI_Flash_init(FLASH_CS_PIN,SPI_RATE);
  myGLCD.InitLCD();
  myGLCD.show_color_bar(); 
  delay(1000);
  myGLCD.clrScr();
}

void loop() {
 
  delay(400);  
  myGLCD.setColor(255, 255, 0);   
  myGLCD.setBackColor(0, 0, 0);   
  myGLCD.Set_character_spacing(1); 
  myGLCD.Put_Text("TEST",5,5,BVS_28);
  char charBuf[1]; charBuf[0]=169;charBuf[1]=0;
  myGLCD.setColor(255, 0, 255);   
  myGLCD.Put_Text(charBuf,5,40,BVS_28);
  myGLCD.Put_Text(" Coldtears electronics",30,40,BVS_28);
  myGLCD.setColor(255, 255, 255); 
  
  
 while(1){}                                                  
}

iv got now a other error, everytime when im flashing a other pic to the flash iv got a other error. it seems to be missing the fonts in die flash.

im using SPIFLASH lib. Have Someone a flash backup ?

external power is connected. without externel power the display doesnt work.

If you still need a copy of the flash image, send me a message to the email in my forum profile. I cannot post the flash image as it is larger than the forum software will allow.

What I have is an image of the flash, dumped from a CTE 5" display. I believe all displays use the same image, based on the library code CTE provides.