TFT Graphic Library Set-up Tool
(Current version 1.03)

TFT_Graphic_Lib.exe is the main tool used to properly configure TFT Graphic Library 2. It automatically generates all the necessary include files required by your program. Due to the increasing complexity of the library, this tool is now mandatory, as it ensures that only the required optimized files are included and always in the correct order, based on your selected settings.
In addition, the tool provides new features such as saving and loading configuration profiles, and previewing fonts (BDF or Standard) before they are included.
Important: For the tool to function correctly, TFT_Graphic_Lib.exe must be located in the main library directory TftLib, together with the file TFT_Graphic_Lib.inc
PROFILE MANAGEMENT
MCU TYPE - Select the MCU type being used:
Sprites - Defines the use of the graphic RAM buffer.
TFT IC - Select the display driver IC from the drop-down menu.
TFT COM - Select the TFT communication interface type. Available options depend on the selected TFT driver IC and the physical module tested.
SPI_1/SPI_2 Defines - Inline commands to explicitly change the SPI clock speed
TFT DATA LINES - Configure which ports or pins will be used for the selected communication interface.
TOUCH IC - Select the touch controller driver.
SD CARD - Select whether an SD card is used:
MEMORY - Select external memory usage.
*Always consult the FLASH memory datasheet.
Fonts Bar
Header Text Box - This section displays all required includes and defines, generated in the correct order, to ensure proper operation of the TFT Graphic Library.
COPY TO CLIPBOARD - Copies all generated includes and defines from the Header Text Box directly to the clipboard.
Note: If a particular feature is not being used, you should set it to "Not Used." Doing so helps reduce both code size and RAM consumption.
Example header:
|
Device = 33EP128MC504 Declare Xtal = 150 Declare Auto_Heap_Arrays = On Declare Auto_Heap_Strings = On Declare Auto_Variable_Bank_Cross = On Declare Stack_Expand = On Declare Watchdog = OFF Declare Warnings = Off Declare Access_Upper_64K = On '================ MCU ======================= $define McuType 1 '================ TFT SCREEN ================ $define TFT_IC ILI9341 $define TftScreenWidth 320 $define TftScreenHeight 240 $define TftWidthOffset 0 $define TftHeightOffset 0 $define TftPixelCheck 0 $define TFT_COM SPI_2 $define TFT_COM_Slow SPI2STAT = 0X0000 : SPI2CON1 = 0X0323 : SPI2BUF = 0 : SPI2STAT = 0X8000 $define TFT_COM_Fast SPI2STAT = 0X0000 : SPI2CON1 = 0X033B : SPI2BUF = 0 : SPI2STAT = 0X8000 $define TFT_RESET PORTC.2 $define TFT_CS PORTC.9 $define TFT_DC PORTC.1 $define TFT_MOSI PORTC.6 $define _TFT_MOSI _PORTC.6 $define TFT_MISO PORTC.5 $define _TFT_MISO _PORTC.5 $define TFT_SCLK PORTC.7 $define _TFT_SCLK _PORTC.7 Include "TftLib\TFT_Graphic_Lib.inc" Include "TftLib\Colors\Colors.inc" Include "TftLib\Drivers\Drivers.inc" Include "TftLib\Drivers\ILI9341.inc" Include "TftLib\System\System.inc" Include "TftLib\System\System_SPI_V4.inc" Include "TftLib\Shapes\Shapes.inc" Include "TftLib\Shapes\Shapes_SPI_V1.inc" '================ SD CARD =================== $define SDCardUsed 1 $define SDCardFatUsed 1 $define SD_COM SPI_1 $define SD_CS PORTA.1 $define SD_SDO PORTA.4 $define _SD_SDO _PORTA.4 $define SD_SDI PORTA.9 $define _SD_SDI _PORTA.9 $define SD_CLK PORTC.3 $define _SD_CLK _PORTC.3 Include "TftLib\SdCard\SdCard.inc" Include "TftLib\SdCard\Fat.inc" Include "TftLib\SdCard\SdCard_SPI_V4.inc" '================ MEMORY ==================== $define MemoryType 2 $define MEM_PAGE_SIZE 256 $define MEM_SECTOR_SIZE 4096 $define MEM_SECTOR_COUNT 2048 $define MEM_FILE_COUNT 256 $define MEM_WRITE_DELAY 5 $define MEM_COM SPI_1 $define MEM_CS PORTA.7 $define MEM_MOSI PORTA.4 $define _MEM_MOSI _PORTA.4 $define MEM_MISO PORTA.9 $define _MEM_MISO _PORTA.9 $define MEM_SCLK PORTC.3 $define _MEM_SCLK _PORTC.3 Include "TftLib\Memory\Memory.inc" Include "TftLib\Memory\Flash.inc" Include "TftLib\Memory\Memory_SPI_V3.inc" Include "TftLib\Memory\Flash_SPI_V1.inc" '================ TFT TOUCH ================= $define TOUCH_IC XPT2046 $define Z_Threshold 500 $define TouchAveragePoints 2 $define TouchMedianDistance 8 $define TOUCH_COM SPI_SW $define T_CS PORTC.8 $define T_IRQ PORTA.8 $define T_MOSI PORTC.6 $define _T_MOSI _PORTC.6 $define T_MISO PORTC.5 $define _T_MISO _PORTC.5 $define T_SCLK PORTC.7 $define _T_SCLK _PORTC.7 Include "TftLib\Touch\Touch.inc" Include "TftLib\Touch\XPT2046.inc" '================ SPRITES =================== $define SpritesUsed 1 $define SpriteBufferSize 900 $define SpriteBufferNumber 3 Include "TftLib\Sprites\Sprites.inc" Include "TftLib\Sprites\Sprites_SPI_V2.inc" '=============== SND FONT =================== $define FontSNDUsed 1 Include "TftLib\Fonts\SND\F0_SND_8x8_Basic.inc" $define FontSmooth 0 $define FontMaxSpace 8 $define FontMaxPixels 8 Include "TftLib\Fonts\SND.inc" Include "TftLib\Fonts\SND_SPI_V1.inc" '=============== BDF FONT =================== $define FontBDFUsed 1 Include "TftLib\Fonts\BDF\F2_BDF_Margarine-Regular-24.inc" Include "TftLib\Fonts\BDF.inc" Include "TftLib\Fonts\BDF_SPI_V1.inc" |
Created with the Personal Edition of HelpNDoc: Full-featured EPub generator