Rev.1.1 REVISION RECORD REVNO. REVDATE CONTENTS 1.0 2015-02-09 Initial Release 1.1 2015-09-30 Adding note about FT81x chip REMARKS CONTENTS REVISION RECORD ................................................................................................................................... 2 CONTENTS ............................................................................................................................................... 2 1. Introduction........................................
Rev.1.1 1. Introduction This paper describes Demo Application for Revelation Board. Demo Application show basic functionality of FT800 and FT801 chips. Thanks to the application user can learn how to prepare his own application using FT80x or FT81x chips and STM32F0 microcontroller in fast way. Riverdi prepared two version of Demo application: one for 3.5” and 4.3” displays and the second for 7.0” models. Both Demo applications consist of 6 sub-applications.
Rev.1.1 Parameters for 4.3” CTP display with FT801 chip: case CTP35: DemoTime=&DemoTime_CTP43; /*4.
Rev.1.1 Parameters for 7.0” CTP display with FT813 chip: case CTP70: DemoTime=&DemoTime_CTP70; /*7.
Rev.1.1 2.2 Setting background color and text formatting In this example the method for setting the background color and text drawing is presented. You will see a red string with the name of the sub-application in the middle of the white screen. Result is presented in Figure 2. Figure 2.
Rev.1.1 OPT_CENTERX centers the text horizontally, OPT_CENTERY centers it vertically. OPT_CENTER centers the text in both directions. OPT_RIGHTX right-justifies the text, so that the x is the rightmost pixel. The value of OPT_RIGHTX is 2048. The string contain displayed text. Ft_App_WrCoCmd_Buffer(phost, command) function write command into command buffer of FT800/FT801. Ft_Gpu_CoCmd_Swap(phost) function swap current display list. 2.
Rev.1.1 /* Wait till coprocessor completes the operation */ Ft_Gpu_Hal_WaitCmdfifo_empty(phost); You can set point size using POINT_SIZE command, set point color using COLOR_RGB and set location using VERTEX2F. There is possibility to draw in very similar way round-cornered rectangles (RECTS command), curvature of the corners can be adjusted using LINE_WIDTH command. 2.4 Lines drawing In this example, the method for drawing lines in different locations is presented.
Rev.1.1 Ft_App_Flush_Co_Buffer(phost); // Wait till coprocessor completes the operation Ft_Gpu_Hal_WaitCmdfifo_empty(phost); You can change line color using COLOR_RGB command. Drawing lines starts after BEGIN(LINES) command. You must only give coordinate of line start and end using VERTEX2F command. There is possibility to draw in very similar way lines connected head-to-tail using LINE_STRIP command. There is also possibility to draw edge strips thanks to EDGE_STRIP_A/B/L/R command. 2.
Rev.1.1 2.6 Spinners In this example, the method for drawing spinners is presented. The spinner is an animated overlay that shows the user that some task is continuing.You will see on the screen spinner bellow two strings. After some time spinner will change into different type. Figure 6.
Rev.1.1 2.7 Keys usage In this example, the method for drawing and handling keys an buttons is presented. You will see on the screen keyboard. After pressing keys the text will appear at the top of the screen. If displayed string is too long it will be cleared. Figure 7.
Rev.1.
Rev.1.
Rev.1.1 2.8 Sketch function usage In this example, the method for using sketch function is presented. You will see on the screen white area surrounded by the frame with string “Draw test”. After touching white area remains black trace on it. You can clear this area pressing “CLEAR” button. Figure 8.
Rev.1.
Rev.1.1 } /* Send the stop command */ Ft_Gpu_Hal_WrCmd32(phost, CMD_STOP); /* Update the command buffer pointers - both read and write pointers */ Ft_Gpu_Hal_WaitCmdfifo_empty(phost); } Ft_Gpu_CoCmd_MemZero(phost,(RAM_G+ending_address),MemZeroSz) function clear graphic RAM memory of FT800 chip. Second argument provide information about start address of memory clearing. Third argument is size of clearing memory area.
Rev.1.1 3. FT801 and FT813 specific functionality All FT8xx chips share exactly the same graphics feature sets. The touch capabilities of the FT800 and FT812 devices are designed for controlling touch on a resistive panel, while FT801 and FT813 are for capacitive touch and allows simultaneous up to 5 touch points. Therefore, the FT801/FT813 have a different touch engine and touch control register set from the FT800/FT812.
Rev.1.