Newhaven Display Forum

Newhaven Products => TFTs => Topic started by: sachin patil on August 02, 2018, 06:50:10 AM

Title: API_VERTEX_TRANSLATE_X(250*16); is not working
Post by: sachin patil on August 02, 2018, 06:50:10 AM
I am using following display.
http://www.newhavendisplay.com/-p-9561.html

 (  NHD-3.5-320240FT-CSXN-CTP ).
I have change only SPI driver from "BRT_AN_014".
http://www.ftdichip.com/Support/SoftwareExamples/FT800_Projects.htm


I am able to run demo functions well. Only, I am not able to get resolution.
For eg.
API_COLOR_RGB(0, 0, 255);                 // Set color to blue
    API_VERTEX_TRANSLATE_X(250*16);      // Add an offset of 250 to X direction of subsequent Vertex commands
    API_VERTEX2II(500,100,30,0x43);

Then, I am not able to see letter at postion 750 (500+250), 100.
I have not change anything in "Main.c\ void APP_Init(void)" function.
Title: Re: API_VERTEX_TRANSLATE_X(250*16); is not working
Post by: Ted_M on August 02, 2018, 10:12:27 AM
Hi Sachin,

Please check the display settings in main.c and confirm they are configured for the 320x240 resolution.  These parameter names are from our Arduino example code for the 3.5" EVE2 module and are specified differently in the FTDI main.c file but you may use the values pertaining to each setting.

Code: [Select]
  /* Values specific to QVGA LCD display */
  FT_DispWidth = 320;
  FT_DispHeight = 240;
  FT_DispHCycle =  408;
  FT_DispHOffset = 70;
  FT_DispHSync0 = 0;
  FT_DispHSync1 = 10;
  FT_DispVCycle = 263;
  FT_DispVOffset = 13;
  FT_DispVSync0 = 0;
  FT_DispVSync1 = 2;
  FT_DispPCLK = 8;
  FT_DispSwizzle = 2;
  FT_DispPCLKPol = 0;
  FT_DispCSpread = 1;
  FT_DispDither = 1;

#endif

Here is a link to our example code on Github for further reference:
https://github.com/NewhavenDisplay/EVE2-TFT-Modules/tree/master/3.5in/Capacitive/FT_App_Graph/Project/Arduino/FT_App_Graph (https://github.com/NewhavenDisplay/EVE2-TFT-Modules/tree/master/3.5in/Capacitive/FT_App_Graph/Project/Arduino/FT_App_Graph)

Regards,

Ted
Title: Re: API_VERTEX_TRANSLATE_X(250*16); is not working
Post by: sachin patil on August 07, 2018, 01:45:21 AM
Thanks for answer. Now, I am not getting font.
I have followed document to get custom font.
I took times.ttf from windows. "Test_ASCII.txt" (this has times new roman alphabet & save as UTF-8).
I use below command,
" fnt_cvt -i times.ttf -s 25 -u Test_ASCII.txt -d 500"
 I am not getting font on display.