Skip to content

Configuration library

Tomas edited this page Apr 9, 2018 · 10 revisions

Configuration library

Define pins

All the settings are made in the file GD23Z.h Depending on your MCU and screen type you will have to modify some parameters.

The screen only defines the type of chip and its rotation, are the two most important points. It will be documented by default pins

For Arduino UNO, MEGA, Due, Teensy 2 and Teensy 3/5-6

Default pin;

#define CS 10 // Riverdi NHD

#define SD_PIN 5 // Riverdi NHD

alternative:

//#define CS 8 // gameduino 2/3

//#define SD_PIN 9 // gameduino 2/3

For ESP8266

Default pin;

#define CS D8

#define SD_PIN D9

For ESP32

Default pin;

#define CS 5

#define SD_PIN 4

For STM32F

Default pin;

#define CS PA4 //SPI1 F767ZI

#define SD_PIN PA11 //SPI2 F767ZI (This pin defines CS for the microSD reader) This ejemple for STM32F767,

for other boards, check your definition of the file generated in your STM32GENERIC, for example; /home/arduino-1.8.5/hardware/STM32GENERIC/STM32/system/STM32F4/ and here you will find the defined pins.

Choose the file of your boards and examine the pins of SPI1 and SPI2

Define Library for your screen FT8xx

It is very important to define the type of model of your screen. If you do not do it correctly, the screen does not start, dashes come out or you will just get the backlight on. Follow these small adjustments carefully and everything will work very well.

Model screen FT81x (model 800x480)

Default is 1

#define TFT_FT81X_ENABLE 1 // 0 FT80X, 1 FT81x

#define SCREEN_FT81X 10 //12, 13, 10 para 10y11, 14 FT813_5, 15 FT813_43, 16 FT813_35

The registers of the screen, depending on the model, are different between one another and the definition is as follows;

  1. 10 for FT810 and FT811
  2. 12 for FT812
  3. 13 for FT813
  4. 14, 15 and 16 be for screen models less than 5 inches, for example 4.3 or 3.5 inches using an FT813Q chip

Limit memory the screen;

Default is 1

#if ( TFT_FT81X_ENABLE ==** 1**)

#define FT_LIMITE_SUP_MEMORIA 0x100000UL

#else

#define FT_LIMITE_SUP_MEMORIA 0x40000UL

#endif

For FT80x memory limit is 256KBytes, FT81X limit up memory is 1MBytes

Orientation screen

Default 0

#define ORIENTACION 0 // 0, 1, 2, 3, FT81X

Only applicable to FT81x models, you can choose 4 modes.