background image

 

 

 

FT800 Series Programmer Guide 

 

Version 2.1

 

 
 

Document Reference No.: BRT_000030    Clearance No.: BRT#037 

 

 

 
 

93 

Product Page

 

 

Document Feedback

 

Copyright © Bridgetek Limited 

 

 

   Byte Order

A

Bit 15-12

R

Bit 11-8

G

Bit 7-4

B

Bit 3-0

   Byte Order

R

Bit 7-5

G

Bit 4-2

B

Bit 1-0

Byte Order

R

Bit 15-11

G

Bit 10-5

B

Bit 4-0

Byte Order

A

Bit 31-24

Byte 3

R

Bit 23-16

Byte 2

G

Bit 15-8

Byte 1

B

Bit 7-0

Byte 0

Palette format layout

Byte 0

RGB565 format layout

Byte 1
Byte 0

ARGB4 format layout

RGB332 pixel layout

Byte 1

Byte 0

 

Figure 11: Pixel format for ARGB4, RGB332, RGB565 and Palette 

 

Graphics context 

None 

See also 

  BITMAP_HANDLE, BITMAP_SIZE, BITMAP_SOURCE 

 

 

Содержание FT800

Страница 1: ...d FT800 Series Programmer Guide Version 2 1 Issue Date 2016 09 19 This document is a programmer guide for the FT800 series chip This guide details the chip features and procedures for use For FT801 sp...

Страница 2: ...on 12 2 2 1 Horizontal timing 13 2 2 2 Vertical timing 14 2 2 3 Signals updating timing control 14 2 2 4 Timing example 480x272 at 60Hz 15 2 2 5 Initialization Sequence 16 2 3 Sound Synthesizer 17 2 4...

Страница 3: ...t commands 81 4 1 Graphics State 81 4 2 Command encoding 82 4 3 Command groups 83 4 3 1 Setting Graphics state 83 4 3 2 Drawing actions 84 4 3 3 Execution control 84 4 4 ALPHA_FUNC 85 4 5 BEGIN 86 4 6...

Страница 4: ...R_TAG 118 4 24 COLOR_A 119 4 25 COLOR_MASK 120 4 26 COLOR_RGB 122 4 27 DISPLAY 123 4 28 END 124 4 29 JUMP 125 4 30 LINE_WIDTH 126 4 31 MACRO 127 4 32 POINT_SIZE 128 4 33 RESTORE_CONTEXT 129 4 34 RETUR...

Страница 5: ...5 12 CMD_DLSTART start a new display list 155 5 13 CMD_SWAP swap the current display list 156 5 14 CMD_COLDSTART set co processor engine state to default values 156 5 15 CMD_INTERRUPT trigger interrup...

Страница 6: ...lider 205 5 36 CMD_DIAL draw a rotary dial control 208 5 37 CMD_TOGGLE draw a toggle switch 211 5 38 CMD_TEXT draw text 214 5 39 CMD_NUMBER draw a decimal number 218 5 40 CMD_SETMATRIX write the curre...

Страница 7: ...graphics object 241 5 54 CMD_SNAPSHOT take a snapshot of the current screen 245 5 55 CMD_LOGO play FTDI logo animation 246 6 FT801 operation 247 6 1 FT801 introduction 247 6 2 FT801 touch engine 247 6...

Страница 8: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 8 Product Page Document Feedback Copyright Bridgetek Limited Appendix F Revision History 263...

Страница 9: ...es given for each specific instruction In addition it also covers various power modes audio and touch features as well as their usage Information on pin settings hardware model and hardware configurat...

Страница 10: ...ek Limited cmd_ Write 32 bits co processor engine command with its necessary parameters to the co processor engine FIFO RAM_CMD dl Write the specified 32 bits display list command to RAM_DL Refer to s...

Страница 11: ...ADPCM input data are in Little Endian format 2 1 General Software architecture The software architecture can be broadly classified into layers such as custom applications graphics GUI manager video ma...

Страница 12: ...ntrol registers with values for the particular display These registers control horizontal timing REG_PCLK REG_PCLK_POL REG_HCYCLE REG_HOFFSET REG_HSIZE REG_HSYNC0 REG_HSYNC1 These registers control ve...

Страница 13: ...00 data sheet for information on display register set 2 2 1 Horizontal timing Figure 2 Horizontal Timing REG_PCLK controls the frequency of PCLK The register specifies a divisor for the main 48 MHz cl...

Страница 14: ...SIZE rows of pixels in total They start after REG_VOFFSET cycles Vertical sync timing on signal VSYNC is controlled by REG_VSYNC0 and REG_VSYNC1 They specify the lines at which VSYNC falls and rises r...

Страница 15: ...ting the PCLK divisor REG_PCLK to 5 gives a PCLK frequency of 9 6 MHz and 800000 5 160000PCLKs per frame For a 480 x 272 display the typical horizontal period is 525 clocks and vertical period is 286...

Страница 16: ...use the MCU SPI clock less than 11MHz host_command CLKEXT send command to CLKEXT to FT800 host_command ACTIVE send host command ACTIVE to FT800 Configure display registers demonstration for WQVGA reso...

Страница 17: ...the xylophone wr8 REG_VOL_SOUND 0xFF set the volume to maximum wr16 REG_SOUND 0x6C 8 0x41 C8 MIDI note on xylophone wr8 REG_PLAY 1 play the sound Code snippet 2 sound synthesizer play C8 on the xyloph...

Страница 18: ...ed to be 64 bit 8 Bytes aligned To learn how to play back the audio data please check the sample code below wr8 REG_VOL_PB 0xFF configure audio playback volume wr32 REG_PLAYBACK_START 0 configure audi...

Страница 19: ...is wr32 RAM_DL 0 CLEAR 1 1 1 clear screen wr32 RAM_DL 4 BEGIN BITMAPS start drawing bitmaps wr32 RAM_DL 8 VERTEX2II 220 110 31 F ascii F in font 31 wr32 RAM_DL 12 VERTEX2II 244 110 31 T ascii T wr32 R...

Страница 20: ...ss always increments by 4 bytes as each command is 32 bit width Command CLEAR is recommended to be used before any other drawing operation in order to put FT800 graphics engine in a known state The en...

Страница 21: ...rious color formats POINTS anti aliased points point radius is 1 256 pixels LINES anti aliased lines with width from 0 to 4095 1 16th of pixel units width is from center of the line to boundary LINE_S...

Страница 22: ...0 128 0 dl LINE_WIDTH 4 16 dl VERTEX2F 60 16 25 16 dl VERTEX2F 60 16 63 16 dl COLOR_RGB 128 128 0 dl LINE_WIDTH 6 16 dl VERTEX2F 90 16 13 16 dl VERTEX2F 90 16 63 16 The VERTEX2F commands are in pairs...

Страница 23: ...e strips for sets of coordinates dl CLEAR_COLOR_RGB 5 45 110 dl COLOR_RGB 255 168 64 dl CLEAR 1 1 1 dl BEGIN LINE_STRIP dl VERTEX2F 5 16 5 16 dl VERTEX2F 50 16 30 16 dl VERTEX2F 63 16 50 16 Draw Edge...

Страница 24: ...00 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 24 Product Page Document Feedback Copyright Bridgetek Limited dl VERTEX2F 50 16 30 16 dl VERTEX2F 63 16 50...

Страница 25: ...dge strips for right dl CLEAR_COLOR_RGB 5 45 110 dl COLOR_RGB 255 168 64 dl CLEAR 1 1 1 dl BEGIN EDGE_STRIP_R dl VERTEX2F 5 16 5 16 dl VERTEX2F 50 16 30 16 dl VERTEX2F 63 16 50 16 Draw Edge strips for...

Страница 26: ...l unsigned long cmd wr32 RAM_DL dli cmd dli 4 dli 0 start writing the display list dl CLEAR 1 1 1 clear screen dl BEGIN BITMAPS start drawing bitmaps dl VERTEX2II 220 110 31 F ascii F in font 31 dl VE...

Страница 27: ...named as identity matrix The coordinates after transforming is calculated in following equation 1 m 1 i e where A B C E D E F stands for the values assigned by commands BITMAP_TRANSFORM_A F 2 5 6 Col...

Страница 28: ...ansparent and an alpha of 255 is fully opaque Here a value of 150 gives a partially transparent effect 2 5 7 VERTEX2II and VERTEX2F The VERTEX2II command used above only allows positive screen coordin...

Страница 29: ...de Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 29 Product Page Document Feedback Copyright Bridgetek Limited dl BEGIN BITMAPS dl VERTEX2F 160 160 dl END Code snippet 11 negative...

Страница 30: ...creenshot ly SCREEN_HEIGHT lx rd32 RAM_SCREENSHOT lx 4 wr8 REG_SCREENSHOT_READ 0 wr8 REG_SCREENSHOT_EN 0 Code Snippet 12 Screenshot with full pixel value 2 5 9 Performance The graphics engine has no f...

Страница 31: ...ent Feedback Copyright Bridgetek Limited To summarize Table 1 Bitmap rendering performance Filter Mode Format Rate Nearest TEXT8X8 TEXTVGA and PALETTED 1 pixel per clock Nearest all other formats 4 pi...

Страница 32: ...summary of the FT800 please check the datasheet instead In addition please note that all the reserved bits are read only and shall be zero All the hexadecimal values are prefixed with 0x Readers are...

Страница 33: ...s set to one PCLK polarity is on the falling edge Reserved REG_PCLK_POL Definition Register Definition 3 REG_CSPREAD Definition Please check the sector 2 2 3 for more details R W 31 1 0 Address 0x1024...

Страница 34: ...fferent LCD panel Please check the table above for details Reserved R W REG_SWIZZLE Definition Table 2 REG_SWIZZLE and RGB pins mapping table REG_SWIZZLE PINS b3 b2 b1 b0 R7 R6 R5 R4 R3 R2 G7 G6 G5 G4...

Страница 35: ...m this bit means dithering feature is disabled Reserved Note Please refer to REG_SWIZZLE and RGB pins mapping table for details REG_DITHER Definition Register Definition 6 REG_OUTBITS Definition 31 9...

Страница 36: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 36 Product Page Document Feedback Copyright Bridgetek Limited...

Страница 37: ...again Bit 0 180 degree screen Rotation switch Writing this bit to 0 will turn off the rotation functionality Writing this bit to 1 will turn on the rotation functionality and 180 degree rotation will...

Страница 38: ...9 0 Note NONE REG_VSYNC0 Definition Bit0 9 The value of these bits specifies how many lines for the high state of signal VSYNC takes at the start of new frame R W Address 0x102448 Reset Value 0x000 Re...

Страница 39: ...FSET Definition 31 9 0 Note REG_VOFFSET Definition Bit0 9 The value of these bits specifies how many lines takes after the start of new frame R W Address 0x102440 Reset Value 0x00C Reserved Register D...

Страница 40: ...Note NONE Bit0 9 The value of these bits specifies how many PCLK cycles for HSYNC during start of line REG_HSYNC1 Definition R W Address 0x102438 Reset Value 0x029 Reserved Register Definition 14 REG...

Страница 41: ...1 10 9 0 Address 0x102430 Reset Value 0x1E0 Note NONE Bit0 9 These bits are used to specify the numbers of PCLK cycles per horizonal line R W Reserved REG_HSIZE Definition Register Definition 16 REG_H...

Страница 42: ...These bits are the number of total PCLK cycles per horizontal line scan The default value is 548 and supposed to support 480x272 screen resolution display Please check the display panel specification...

Страница 43: ...ge Document Feedback Copyright Bridgetek Limited Register Definition 19 REG_TAP_CRC Definition 31 0 Address 0x102420 Reset Value 0x00000000 Note NONE Read Only Bit0 31 These bits are set by FT800 as t...

Страница 44: ...een depending on what values of these bits are set 01 Graphics engine will render the screen immediately after current line is scanned out It may cause tearing effect 10 Graphics engine will render th...

Страница 45: ...e updated with tag value by FT800 graphics engine The tag value here is corresponding to the touching point coordinator given in REG_TAG_X and REG_TAG_Y Host can read this register to check which grap...

Страница 46: ...0x102470 Reset Value 0x0 Note NONE REG_TAG_X Definition Bit 0 8 These bits are set by host as X coordinate of touching point which will enable host to query the tag value This register shall be used...

Страница 47: ...Definition Reserved 31 26 25 16 15 10 9 0 REG_TOUCH_DIRECT_Z1Z2 Definition Address 0x102578 Note To know it is touched or not please check the 31st bit of REG_TOUCH_DIRECT_XY FT800 touch engine will...

Страница 48: ...served 31 26 25 16 15 10 9 0 RO RO REG_TOUCH_DIRECT_XY Definition Address 0x102574 Note Bit 0 9 The 10 bit ADC value for Y coordinate Bit 16 25 The 10 bit ADC value for X coordinate Bit 31 If this bit...

Страница 49: ...REG_TOUCH_TRANSFORM_F Definition 31 30 16 15 0 R W REG_TOUCH_TRANSFORM_F Definition Address 0x102530 Note This register represents fixed point number and the default value is 0 0 after reset Bit 0 15...

Страница 50: ...inition 31 30 16 15 0 R W REG_TOUCH_TRANSFORM_E Definition Address 0x10252C Note This register represents fixed point number and the default value is 1 0 after reset Bit 0 15 The value of these bits r...

Страница 51: ...efinition 31 30 16 15 0 R W REG_TOUCH_TRANSFORM_D Definition Address 0x102528 Note This register represents fixed point number and the default value is 0 0 after reset Bit 0 15 The value of these bits...

Страница 52: ...efinition 31 30 16 15 0 R W REG_TOUCH_TRANSFORM_C Definition Address 0x102524 Note This register represents fixed point number and the default value is 0 0 after reset Bit 0 15 The value of these bits...

Страница 53: ...efinition 31 30 16 15 0 R W REG_TOUCH_TRANSFORM_B Definition Address 0x102520 Note This register represents fixed point number and the default value is 0 0 after reset Bit 0 15 The value of these bits...

Страница 54: ...inition 31 30 16 15 0 R W REG_TOUCH_TRANSFORM_A Definition Address 0x10251C Note This register represents fixed point number and the default value is 1 0 after reset Bit 0 15 The value of these bits r...

Страница 55: ...18 Reset Value 0 Note The valid tagvalue range is from 1 to 255 therefore the default value of this register is zero meaningthere is no touch by default Bit 0 7 These bits are set as the tagvalue of t...

Страница 56: ..._XY Definition Address 0x102514 Reset Value 0 Note Host can read this register to check the coordinates used by the touch engine to update the tag register REG_TOUCH_TAG Bit 0 15 The value of these bi...

Страница 57: ...put of the touch engine of the FT800 It has been mapped into screen size Bit 0 15 The value of these bits are the Y coordinates of the touch screen After doing calibration it shall be within the heigh...

Страница 58: ...eserved RO Reserved Register Definition 36 REG_TOUCH_RAW_XY Definition 31 16 15 0 REG_TOUCH_RAW_XY Definition Address 0x102508 Note The coordinates in this register have not mapped into the screen coo...

Страница 59: ...sensitivity by setting this register The default value after reset is 0xFFFF and it means the lightest touch will be accepted by the touch engine of the FT800 The host can set this register by doing...

Страница 60: ...t 0 3 These bits control the touch screen settle time in the unit of 6 clocks The default value is 3 meaning the settle time is 18 3 6 system clock cycles R W Reserved Register Definition 40 REG_TOUCH...

Страница 61: ...es lower power consumption but with less accuracy 1 Differential Mode It causes higher power consumption but with more accuracy The default mode after reset Register Definition 42 REG_TOUCH_MODE Defin...

Страница 62: ...ng To stop the sound effect the host needs to select the silence sound effect by setting up REG_SOUND and set this register to play Register Definition 44 REG_SOUND Definition Reserved 31 16 15 0 R W...

Страница 63: ...ddress 0x102480 Reset Value 0xFF Note Bit 0 7 These bits control the volume of the synthesizer sound The default value 0xFF is highest volume The value zero means mute Reserved R W Register Definition...

Страница 64: ...ion 47 REG_PLAYBACK_PLAY Definition R W 31 1 0 REG_PLAYBCK_PLAY Definition Address 0x1024BC Reset Value 0x0 Note Please refer to the datasheet section Audio Playback for the details of this register R...

Страница 65: ...of this register Reserved Bit 0 this bit controls the audio engine to play back the audio data in RAM_G from the start address once it consumes all the data A value of 1 means LOOP is enabled a value...

Страница 66: ...0 15 These bits specify the sampling fequency of audio playback data Units is in Hz Reserved R O Register Definition 51 REG_PLAYBACK_READPTR Definition 31 20 19 0 Note Please read the datasheet sectio...

Страница 67: ...se bits specify the length of audio data in RAM_G to playback starting from the address specified in REG_PLAYBACK_START register Reserved R W REG_PLAYBACK_LENGTH Definition Address 0x1024A8 Reset Valu...

Страница 68: ...he display list commands are generated into the display list buffer By setting this register properly the host can specify the starting address in the display list buffer for the coprocessor engine to...

Страница 69: ...o this register unless in error recovery case Its default value is zero after the coprocessor engine is reset Bit 0 11 These bits are updated by the coprocessor engine as long as the coprocessor engin...

Страница 70: ...to indicate the tracking value for the tracked graphics objects The coprocessor caculates how much the current touching points take within the predefined range Please check the CMD_TRACK for more deta...

Страница 71: ...uct Page Document Feedback Copyright Bridgetek Limited Reserved 31 8 7 0 R W REG_PWM_DUTY Definition Address 0x1024C4 Reset Value 0x80 Note Bit 0 7 These bits define the backlight PWM output duty cycl...

Страница 72: ...Z The default is 250 Hz after reset The valid frequency is from 250Hz to 10000Hz R W Reserved Register Definition 60 REG_INT_MASK Definition 31 8 7 0 Note Please read the datasheet section Interrupts...

Страница 73: ...Register Definition 61 REG_INT_EN Definition R W 31 1 0 REG_INT_EN Definition Address 0x10249C Reset Value 0x0 Note Please refer to the datasheet section Interrupts for the details of this register R...

Страница 74: ...set by the FT800 The host can read these bits to determine which interrupt takes place These bits are cleared automatically by reading The host shall not write this register After reset there are no i...

Страница 75: ...ction of GPIO7 The bit value 1 means the GPIO pin is set as an output otherwise it means an input After reset only the GPIO7 is set to output by default R W Reserved Register Definition 65 REG_CPURESE...

Страница 76: ...is required to set before reading out the screenshot of selected Y lines The screenshot resides in RAM_SCREENSHOT and the format of each pixel is in 32 bit BGRA format Blue channel is in lowest addre...

Страница 77: ...led Bit 1 31 Reserved REG_SCREENSHOT_START Definition Reserved Register Definition 69 REG_SCREENSHOT_Y Definition 31 9 Address 0x102414 Reset Value 0x000 Note NONE Bit 0 8 The value of these 9 bits sp...

Страница 78: ...clock frequency is 48MHz by default The value is in HZ If the host selects the alternative frequency by using host command CLK36M this register must be updated accordingly REG_FREQUENCY Definition Re...

Страница 79: ...ead Only Bit0 31 These bits are set to zero after reset The register counts the number of screen frames If the refresh rate is 60Hz it will wrap up till about 828 days after reset REG_FRAMES Definitio...

Страница 80: ...edback Copyright Bridgetek Limited Register Definition 75 REG_TRIM Definition 31 5 4 0 Address 0x10256C Reset Value 0x0 REG_TRIM Definition Note Please check the application note AN_299_FT800_FT801_In...

Страница 81: ...ial Although the bitmap handle is part of the graphics context the parameters for each bitmap handle are not part of the graphics context They are neither saved nor restored by SAVE_CONTEXT and RESTOR...

Страница 82: ...r 0 0 0 CLEAR_COLOR_RGB Each display list command in this section lists any graphics context it sets 4 2 Command encoding Each display list command has a 32 bit encoding The most significant bits of t...

Страница 83: ...he bitmap handle BITMAP_LAYOUT set the source bitmap memory format and layout for the current handle BITMAP_SIZE set the screen drawing of bitmaps for the current handle BITMAP_SOURCE set the source a...

Страница 84: ...ner of the scissor clip rectangle STENCIL_FUNC set function and reference value for stencil testing STENCIL_MASK control the writing of individual bits in the stencil planes STENCIL_OP set stencil tes...

Страница 85: ...func ref Parameters func Specifies the test function one of NEVER LESS LEQUAL GREATER GEQUAL EQUAL NOTEQUAL or ALWAYS The initial value is ALWAYS 7 NAME VALUE NEVER 0 LESS 1 LEQUAL 2 GREATER 3 GEQUAL...

Страница 86: ...3 Line drawing primitive LINE_STRIP 4 Line strip drawing primitive EDGE_STRIP_R 5 Edge strip right side drawing primitive EDGE_STRIP_L 6 Edge strip left side drawing primitive EDGE_STRIP_A 7 Edge stri...

Страница 87: ...ument Feedback Copyright Bridgetek Limited Examples Drawing points lines and bitmaps dl BEGIN POINTS dl VERTEX2II 50 5 0 0 dl VERTEX2II 110 15 0 0 dl BEGIN LINES dl VERTEX2II 50 45 0 0 dl VERTEX2II 11...

Страница 88: ...is from 0 to 31 Description Handles 16 to 31 are defined by the FT800 for built in font and handle 15 is defined in the co processor engine commands CMD_GRADIENT CMD_BUTTON and CMD_KEYS Users can def...

Страница 89: ...ory format and layout for the current handle Encoding 31 24 23 22 21 20 19 18 9 8 0 0x07 format linestride Height Parameters format Bitmap pixel format The valid range is from 0 to 11 and defined as p...

Страница 90: ...han y otherwise a transparent pixel The result is a bar graph of the bitmap data A maximum of 256x256 size bitmap can be drawn using the BARGRAPH format Orientation width and height of the graph can b...

Страница 91: ...t is that the bitmap acts like a TEXTVGA grid A single bitmap can be drawn which covers all or part of the display each TEXTVGA data type in the bitmap corresponds to one 8x16 pixel character cell PAL...

Страница 92: ...Pixel 0 Bit 7 4 Pixel 1 Bit 3 0 Byte Order Pixel 0 Bit 7 0 Byte 0 pixel 1 Bit 15 8 Byte 1 pixel 2 Bit 23 16 Byte 2 L8 format layout L1 format layout L4 format layout Byte 0 Byte 0 Figure 9 Pixel form...

Страница 93: ...te Order R Bit 7 5 G Bit 4 2 B Bit 1 0 Byte Order R Bit 15 11 G Bit 10 5 B Bit 4 0 Byte Order A Bit 31 24 Byte 3 R Bit 23 16 Byte 2 G Bit 15 8 Byte 1 B Bit 7 0 Byte 0 Palette format layout Byte 0 RGB5...

Страница 94: ...REPEAT or BORDER The value of BORDER is 0 and the value of REPEAT is 1 wrapy Bitmap y wrap mode one of REPEAT or BORDER width Drawn bitmap width in pixels height Drawn bitmap height in pixels Descrip...

Страница 95: ...5 128 64 dl BITMAP_SIZE NEAREST BORDER BORDER 64 64 dl BEGIN BITMAPS dl VERTEX2II 48 28 0 0 Reducing the size to 32 x 50 dl BITMAP_SOURCE 0 dl BITMAP_LAYOUT RGB565 128 64 dl BITMAP_SIZE NEAREST BORDER...

Страница 96: ...TMAP_TRANSFORM_A 128 dl BITMAP_TRANSFORM_E 128 dl BITMAP_SIZE NEAREST BORDER BORDER 128 128 dl BEGIN BITMAPS dl VERTEX2II 16 0 0 0 Using a bilinear filter makes the zoomed image a little smoother dl B...

Страница 97: ...format is RGB565 ARGB4 ARGB1555 the bitmap source shall be aligned to 2 bytes Description The bitmap source address is normally the address in main memory where the bitmap graphic data is loaded Exam...

Страница 98: ...eries Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 98 Product Page Document Feedback Copyright Bridgetek Limited Graphics context None See also BITMAP_LAYOUT BITM...

Страница 99: ...BITMAP_TRANSFORM_A F coefficients are used to perform bitmap transform functionalities such as scaling rotation and translation These are similar to openGL transform functionality Examples A value of...

Страница 100: ...rsion 2 1 Document Reference No BRT_000030 Clearance No BRT 037 100 Product Page Document Feedback Copyright Bridgetek Limited Graphics context The value of a is part of the graphics context as descri...

Страница 101: ...31 24 23 17 16 0 0x16 Reserved b Parameters b Coefficient B of the bitmap transform matrix in signed 8 8 bit fixed point form The initial value is 0 Description BITMAP_TRANSFORM_A F coefficients are...

Страница 102: ...ncoding 31 24 23 0 0x17 c Parameters c Coefficient C of the bitmap transform matrix in signed 15 8 bit fixed point form The initial value is 0 Description BITMAP_TRANSFORM_A F coefficients are used to...

Страница 103: ...31 24 23 17 16 0 0x18 Reserved d Parameters d Coefficient D of the bitmap transform matrix in signed 8 8 bit fixed point form The initial value is 0 Description BITMAP_TRANSFORM_A F coefficients are...

Страница 104: ...BITMAP_TRANSFORM_A F coefficients are used to perform bitmap transform functionalities such as scaling rotation and translation These are similar to openGL transform functionality Examples A value of...

Страница 105: ...rsion 2 1 Document Reference No BRT_000030 Clearance No BRT 037 105 Product Page Document Feedback Copyright Bridgetek Limited Graphics context The value of e is part of the graphics context as descri...

Страница 106: ...ncoding 31 24 23 0 0x1A f Parameters f Coefficient F of the bitmap transform matrix in signed 15 8 bit fixed point form The initial value is 0 Description BITMAP_TRANSFORM_A F coefficients are used to...

Страница 107: ...computed one of the same constants as src The initial value is ONE_MINUS_SRC_ALPHA 4 Table 8 BLEND_FUNC constant value definition NAME VALUE Description ZERO 0 Check openGL definition ONE 1 Check ope...

Страница 108: ...on using the alpha value dl BEGIN BITMAPS dl VERTEX2II 50 30 31 0x47 dl COLOR_A 128 dl VERTEX2II 60 40 31 0x47 A destination factor of zero means that destination pixels are not used dl BEGIN BITMAPS...

Страница 109: ...ersion 2 1 Document Reference No BRT_000030 Clearance No BRT 037 109 Product Page Document Feedback Copyright Bridgetek Limited The values of src and dst are part of the graphics context as described...

Страница 110: ...31 24 23 16 15 0 0x1D Reserved dest Parameters dest The destination address in RAM_DL which the display command is to be switched FT800 has the stack to store the return address To come back to the ne...

Страница 111: ...ment Feedback Copyright Bridgetek Limited 4 18 CELL Specify the bitmap cell number for the VERTEX2F command Encoding 31 24 23 7 6 0 0x06 Reserved Cell Parameters cell bitmap cell number The initial va...

Страница 112: ...1 will clear the stencil buffer of the FT800 to the preset value Setting this bit to 0 will maintain the stencil buffer of the FT800 with an unchanged value The preset value is defined in command CLE...

Страница 113: ...ocument Feedback Copyright Bridgetek Limited To clear part of the screen to gray part to blue using scissor rectangles dl CLEAR_COLOR_RGB 100 100 100 dl CLEAR 1 1 1 dl CLEAR_COLOR_RGB 0 0 255 dl SCISS...

Страница 114: ...Bridgetek Limited 4 20 CLEAR_COLOR_A Specify clear value for the alpha channel Encoding 32 24 23 8 7 0 0x0F Reserved Alpha Parameters alpha Alpha value used when the color buffer is cleared The initi...

Страница 115: ...buffer is cleared The initial value is 0 green Green value used when the color buffer is cleared The initial value is 0 blue Blue value used when the color buffer is cleared The initial value is 0 Des...

Страница 116: ...t Reference No BRT_000030 Clearance No BRT 037 116 Product Page Document Feedback Copyright Bridgetek Limited Graphics context The values of red green and blue are part of the graphics context as desc...

Страница 117: ...dback Copyright Bridgetek Limited 4 22 CLEAR_STENCIL Specify clear value for the stencil buffer Encoding 31 24 23 8 7 0 0x11 Reserved s Parameters s Value used when the stencil buffer is cleared The i...

Страница 118: ...dback Copyright Bridgetek Limited 4 23 CLEAR_TAG Specify clear value for the tag buffer Encoding 31 24 23 8 7 0 0x12 Reserved t Parameters t Value used when the tag buffer is cleared The initial value...

Страница 119: ...5 Description Sets the alpha value applied to drawn elements points lines and bitmaps How the alpha value affects image pixels depends on BLEND_FUNC the default behavior is a transparent blend Example...

Страница 120: ...nnel update of the FT800 color buffer The initial value is 1 and means enable a Enable or disable the alpha channel update of the FT800 color buffer The initial value is 1 and means enable Description...

Страница 121: ...1 Document Reference No BRT_000030 Clearance No BRT 037 121 Product Page Document Feedback Copyright Bridgetek Limited Graphics context The values of r g b and a are part of the graphics context as de...

Страница 122: ...the current color The initial value is 255 blue Blue value for the current color The initial value is 255 Description Sets red green and blue values of the FT800 color buffer which will be applied to...

Страница 123: ...000030 Clearance No BRT 037 123 Product Page Document Feedback Copyright Bridgetek Limited 4 27 DISPLAY End the display list FT800 will ignore all the commands following this command Encoding 31 24 23...

Страница 124: ...pyright Bridgetek Limited 4 28 END End drawing a graphics primitive Encoding 31 24 23 0 0x21 Reserved Parameters None Description It is recommended to have an END for each BEGIN Whereas advanced users...

Страница 125: ...arance No BRT 037 125 Product Page Document Feedback Copyright Bridgetek Limited 4 29 JUMP Execute commands at another location in the display list Encoding 31 24 23 16 15 0 0x1E Reserved dest Paramet...

Страница 126: ...drawn lines The width is the distance from the center of the line to the outermost drawn pixel in units of 1 16 pixel The valid range is from 16 to 4095 in terms of 1 16th pixel units Please note the...

Страница 127: ...rom a macro register Encoding 31 24 23 1 0 0x25 Reserved m Parameters m Macro register to read Value 0 means the FT800 will fetch the command from REG_MACRO_0 to execute Value 1 means the FT800 will f...

Страница 128: ...al value is 16 Description Sets the size of drawn points The width is the distance from the center of the point to the outermost drawn pixel in units of 1 16 pixels The valid range is from 16 to 8191...

Страница 129: ...on Restores the current graphics context as described in section 4 1 Four 4 levels of SAVE and RESTORE are available in the FT800 Any extra RESTORE_CONTEXT will load the default values into the presen...

Страница 130: ...Feedback Copyright Bridgetek Limited 4 34 RETURN Return from a previous CALL command Encoding 31 24 23 0 0x24 Reserved Parameters None Description CALL and RETURN have 4 levels of stack in addition to...

Страница 131: ...eserved Parameters None Description Saves the current graphics context as described in section 4 1 Any extra SAVE_CONTEXT will throw away the earliest saved context Examples Saving and restoring conte...

Страница 132: ...is 512 The valid value range is from 0 to 512 height The height of the scissor clip rectangle in pixels The initial value is 512 The valid value range is from 0 to 512 Description Sets the width and h...

Страница 133: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 133 Product Page Document Feedback Copyright Bridgetek Limited None...

Страница 134: ...clip rectangle in pixels The initial value is 0 y The y coordinate of the scissor clip rectangle in pixels The initial value is 0 Description Sets the top left position of the scissor clip rectangle w...

Страница 135: ...stencil test The initial value is 0 mask Specifies a mask that is ANDed with the reference value and the stored stencil value The initial value is 255 Description Stencil test rejects or accepts pixe...

Страница 136: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 136 Product Page Document Feedback Copyright Bridgetek Limited STENCIL_OP STENCIL_MASK...

Страница 137: ...imited 4 39 STENCIL_MASK Control the writing of individual bits in the stencil planes Encoding 31 24 23 8 7 0 0x13 reserved mask Parameters mask The mask used to enable writing stencil bits The initia...

Страница 138: ...n to take when the stencil test fails one of KEEP ZERO REPLACE INCR DECR and INVERT The initial value is KEEP 1 spass Specifies the action to take when the stencil test passes one of the same constant...

Страница 139: ...enting stencil at each pixel then draw the pixels with value 2 in red dl STENCIL_OP INCR INCR dl POINT_SIZE 760 dl BEGIN POINTS dl VERTEX2II 50 60 0 0 dl VERTEX2II 110 60 0 0 dl STENCIL_FUNC EQUAL 2 2...

Страница 140: ...uffer of the FT800 that applies to the graphics objects when they are drawn on the screen This TAG value will be assigned to all the following objects unless the TAG_MASK command is used to disable it...

Страница 141: ...FT800 is set as the default value rather than the value given by TAG command in the display list Description Every graphics object drawn on screen is attached with the tag value which is defined in th...

Страница 142: ...X Y Parameters x Signed x coordinate in 1 16 pixel precision y Signed y coordinate in 1 16 pixel precision Description The range of coordinates is from 16384 to 16383 in terms of 1 16th pixel units T...

Страница 143: ...ate in pixels from 0 to 511 handle Bitmap handle The valid range is from 0 to 31 From 16 to 31 the bitmap handle is dedicated to the FT800 built in font cell Cell number Cell number is the index of bi...

Страница 144: ...Engine commands CMD_TEXT draw text CMD_BUTTON draw a button CMD_CLOCK draw an analog clock CMD_GAUGE draw a gauge CMD_GRADIENT draw a smooth color gradient CMD_KEYS draw a row of key CMD_PROGRESS draw...

Страница 145: ...port 4096 bytes of free space to prevent completely wrapping the FIFO and making it appear empty If enough space is available in the FIFO the MCU writes the commands at the appropriate location in the...

Страница 146: ...set clear color cmd CLEAR 1 1 1 clear screen cmd DISPLAY display Of course this display list could have been written directly to RAM_DL The advantage of this technique is that you can mix low level op...

Страница 147: ...cs e g character height and width are used by software when placing font characters For the ROM character bitmaps these font metrics are in ROM The co processor engine uses these metrics when drawing...

Страница 148: ...lt in ROM font of the FT800 the valid character range for one bitmap handle is printable ASCII code i e from 32 to 127 both inclusive For custom RAM font the ASCII code range of valid characters is fr...

Страница 149: ...ondition Set REG_CMD_READ and REG_CMD_WRITE to zero Set REG_CPURESET to 0 to restart the co processor engine 5 6 widgets physical dimension This section contains the common physical dimensions of the...

Страница 150: ...r YES Text CMD_NUMBER NO NO YES CMD_CALIBRATE YES Animating dot YES Outer dot NO CMD_SPINNER NO NO YES 5 8 Co processor engine graphics state The co processor engine maintains a small amount of intern...

Страница 151: ...n in 3D effect The default option CMD_BUTTON CMD_CLOCK CMD_KEYS CMD_GAUGE CMD_SLIDER CMD_DIAL CMD_TOGGLE CMD_PROGRESS CMD_SCROLLBAR OPT_RGB565 0 Co processor option to decode the JPEG image to RGB565...

Страница 152: ...ht justified CMD_KEYS CMD_TEXT CMD_NUMBER OPT_NOBACK 4096 Co processor widget has no background drawn CMD_CLOCK CMD_GAUGE OPT_NOTICKS 8192 Co processor clock widget is drawn without hour ticks Gauge w...

Страница 153: ...swap the current display list Commands to draw graphics objects CMD_TEXT draw text CMD_BUTTON draw a button CMD_CLOCK draw an analog clock CMD_BGCOLOR set the background color CMD_FGCOLOR set the for...

Страница 154: ...t matrix CMD_SETMATRIX write the current matrix as a bitmap transform CMD_GETMATRIX retrieves the current matrix coefficients Other commands CMD_COLDSTART set co processor engine state to default valu...

Страница 155: ...ent Feedback Copyright Bridgetek Limited 5 12 CMD_DLSTART start a new display list When the co processor engine executes this command it waits until the current display list is scanned out then sets R...

Страница 156: ...lease see REG_DLSWAP Definition This co processor engine command will not generate any display list command into display list memory RAM_DL C prototype void cmd_swap Command layout 0 CMD_DLSWAP 0xffff...

Страница 157: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 157 Product Page Document Feedback Copyright Bridgetek Limited...

Страница 158: ...rrupt INT_CMDFLAG C prototype void cmd_interrupt uint32_t ms Parameters ms Delay before interrupt triggers in milliseconds The interrupt is guaranteed not to fire before this delay If ms is zero the i...

Страница 159: ...fied in REG_CMD_DL C prototype void cmd_append uint32_t ptr uint32_t num Parameters ptr Start of source commands in main memory num Number of bytes to copy This must be a multiple of 4 Command layout...

Страница 160: ...read a register value C prototype void cmd_regread uint32_t ptr uint32_t result Parameters ptr Address of register to read result The register value to be read at ptr address Command layout 0 CMD_REG...

Страница 161: ...should immediately follow in the command buffer If the number of bytes is not a multiple of 4 then 1 2 or 3 bytes should be appended to ensure 4 byte alignment of the next command these padding bytes...

Страница 162: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 162 Product Page Document Feedback Copyright Bridgetek Limited cmd 100...

Страница 163: ...library This is particularly useful for loading graphics data C prototype void cmd_inflate uint32_t ptr Parameters ptr Destination address The data byte should immediate follow in the command buffer D...

Страница 164: ...command appends display list commands to set the source layout and size of the resulting image Option OPT_NODL prevents this nothing is written to the display list OPT_NODL can be OR ed with OPT_MONO...

Страница 165: ...65 Product Page Document Feedback Copyright Bridgetek Limited Examples To load a JPEG image at address 0 then draw the bitmap at 10 20 and 100 20 cmd_loadimage 0 0 JPEG file data follows cmd BEGIN BIT...

Страница 166: ...memory block num Number of bytes in the source memory block result Output parameter written with the CRC 32 after command execution The completion of this function is detected when the value of REG_C...

Страница 167: ...to a block of memory C prototype void cmd_memzero uint32_t ptr uint32_t num Parameters ptr Starting address of the memory block num Number of bytes in the memory block The completion of this function...

Страница 168: ...oid cmd_memset uint32_t ptr uint32_t value uint32_t num Parameters ptr Starting address of the memory block value Value to be written to memory num Number of bytes in the memory block The completion o...

Страница 169: ...id cmd_memcpy uint32_t dest uint32_t src uint32_t num Parameters dest address of the destination memory block src address of the source memory block num number of bytes to copy The completion of this...

Страница 170: ...fy the font used in button label See ROM and RAM Fonts options By default the button is drawn with a 3D effect and the value is zero OPT_FLAT removes the 3D effect The value of OPT_FLAT is 256 s butto...

Страница 171: ...ocument Feedback Copyright Bridgetek Limited 10 H 12 Font 14 Options 16 S 17 n 0 Examples A 140x00 pixel button with large text cmd_button 10 10 140 100 31 0 Press Without the 3D look cmd_button 10 10...

Страница 172: ...037 172 Product Page Document Feedback Copyright Bridgetek Limited cmd_button 10 70 50 25 26 0 Three Changing button color cmd_fgcolor 0xb9b900 cmd_button 10 10 50 25 26 0 Banana cmd_fgcolor 0xb97300...

Страница 173: ...Parameters x x coordinate of clock center in pixels y y coordinate of clock center in pixels options By default the clock dial is drawn with a 3D effect and the name of this option is OPT_3D Option O...

Страница 174: ...radius r 200 256 Each tick is a point of radius r 10 256 The seconds hand has length r 200 256 and width r 3 256 The minutes hand has length r 150 256 and width r 9 256 The hours hand has length r 10...

Страница 175: ...k Limited Setting the background color cmd_bgcolor 0x401010 cmd_clock 80 60 50 0 8 15 0 0 Without the 3D look cmd_clock 80 60 50 OPT_FLAT 8 15 0 0 The time fields can have large values Here the hours...

Страница 176: ...ce No BRT_000030 Clearance No BRT 037 176 Product Page Document Feedback Copyright Bridgetek Limited No seconds hand cmd_clock 80 60 50 OPT_NOSECS 8 15 0 0 No background cmd_clock 80 60 50 OPT_NOBACK...

Страница 177: ...0 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 177 Product Page Document Feedback Copyright Bridgetek Limited No hands cmd_clock 80 60 50 OPT_NOHANDS 8 15...

Страница 178: ...RGB number Red is the most significant 8 bits blue is the least So 0xff0000 is bright red Foreground color is applicable for things that the user can move such as handles and buttons affordances Comma...

Страница 179: ...GB number Red is the most significant 8 bits blue is the least So 0xff0000 is bright red Background color is applicable for things that the user cannot move Example behind gauges and sliders etc Comma...

Страница 180: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 180 Product Page Document Feedback Copyright Bridgetek Limited...

Страница 181: ...color as a 24 bit RGB number Red is the most significant 8 bits blue is the least So 0xff0000 is bright red Gradient is supported only for Button and Keys widgets Command layout 0 CMD_GRADCOLOR 0xfff...

Страница 182: ...rence No BRT_000030 Clearance No BRT 037 182 Product Page Document Feedback Copyright Bridgetek Limited The gradient color is also used for keys cmd_fgcolor 0x101010 cmd_keys 10 10 140 30 26 0 abcde c...

Страница 183: ...e void cmd_gauge int16_t x int16_t y int16_t r uint16_t options uint16_t major uint16_t minor uint16_t val uint16_t range Parameters x X coordinate of gauge center in pixels y Y coordinate of gauge ce...

Страница 184: ...e Maximum value Description The details of physical dimension are The tick marks are placed on a 270 degree arc clockwise starting at south west position Minor ticks are lines of width r 2 256 major r...

Страница 185: ...ocument Feedback Copyright Bridgetek Limited 18 Range Examples A gauge with radius 50 pixels five divisions of four ticks each indicating 30 cmd_gauge 80 60 50 0 5 4 30 100 Without the 3D look cmd_gau...

Страница 186: ...ument Feedback Copyright Bridgetek Limited Setting the minor divisions to 1 makes them disappear cmd_gauge 80 60 50 0 10 1 30 100 Setting the major divisions to 1 gives minor divisions only cmd_gauge...

Страница 187: ...learance No BRT 037 187 Product Page Document Feedback Copyright Bridgetek Limited Scale 0 1000 indicating 1000 cmd_gauge 80 60 50 0 5 2 1000 1000 Scaled 0 65535 indicating 49152 cmd_gauge 80 60 50 0...

Страница 188: ...imited No tick marks cmd_gauge 80 60 50 OPT_NOTICKS 4 4 49152 65535 No pointer cmd_gauge 80 60 50 OPT_NOPOINTER 4 4 49152 65535 Drawing the gauge in two passes with bright red for the pointer GAUGE_0...

Страница 189: ...idgetek Limited Add a custom graphic to the gauge by drawing its background a bitmap then its foreground GAUGE_0 OPT_NOPOINTER OPT_NOTICKS GAUGE_1 OPT_NOBACK cmd_gauge 80 60 50 GAUGE_0 4 4 49152 65535...

Страница 190: ...NT draw a smooth color gradient C prototype void cmd_gradient int16_t x0 int16_t y0 uint32_t rgb0 int16_t x1 int16_t y1 uint32_t rgb1 Parameters x0 x coordinate of point 0 in pixels y0 y coordinate of...

Страница 191: ...ted based on smooth curve interpolated from the RGB0 to RGB1 parameter The smooth curve equation is independently calculated for all three colors and the equation used is R0 t R1 R0 where t is interpo...

Страница 192: ...k Limited A vertical gradient cmd_gradient 0 0 0x808080 0 120 0x80ff40 The same colors in a diagonal gradient cmd_gradient 0 0 0x808080 160 120 0x80ff40 Using a scissor rectangle to draw a gradient st...

Страница 193: ...FT800 Series Programmer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 193 Product Page Document Feedback Copyright Bridgetek Limited...

Страница 194: ...s Parameters x x coordinate of keys top left in pixels y y coordinate of keys top left in pixels font Bitmap handle to specify the font used in key label The valid range is from 0 to 31 options By def...

Страница 195: ...abels one character per key The TAG value is set to the ASCII value of each key so that key presses can be detected using the REG_TOUCH_TAG register Description The details of physical dimension are T...

Страница 196: ...No BRT 037 196 Product Page Document Feedback Copyright Bridgetek Limited Examples A row of keys cmd_keys 10 10 140 30 26 0 12345 Without the 3D look cmd_keys 10 10 140 30 26 OPT_FLAT 12345 Default vs...

Страница 197: ...II code 0x32 cmd_keys 10 10 140 30 26 0x32 12345 A calculator style keyboard using font 29 cmd_keys 22 1 116 28 29 0 789 cmd_keys 22 31 116 28 29 0 456 cmd_keys 22 61 116 28 29 0 123 cmd_keys 22 91 11...

Страница 198: ...No BRT 037 198 Product Page Document Feedback Copyright Bridgetek Limited Showing the f ASCII 0x66 key pressed k 0x66 cmd_keys 2 2 156 21 20 k OPT_CENTER qwertyuiop cmd_keys 2 26 156 21 20 k OPT_CENTE...

Страница 199: ...s int16_t x int16_t y int16_t w int16_t h uint16_t options uint16_t val uint16_t range Parameters x x coordinate of progress bar top left in pixels y y coordinate of progress bar top left in pixels w...

Страница 200: ...e Maximum value Description The details of physical dimensions are x y w h give outer dimensions of progress bar Radius of bar r is min w h 2 Radius of inner progress line is r 7 8 Refer to Co process...

Страница 201: ...000030 Clearance No BRT 037 201 Product Page Document Feedback Copyright Bridgetek Limited Without the 3D look cmd_progress 20 50 120 12 OPT_FLAT 50 100 A 4 pixel high bar range 0 65535 with a brown b...

Страница 202: ...scrollbar int16_t x int16_t y int16_t w int16_t h uint16_t options uint16_t val uint16_t size uint16_t range Parameters x x coordinate of scroll bar top left in pixels y y coordinate of scroll bar top...

Страница 203: ...the value of options is zero Options OPT_FLAT removes the 3D effect and its value is 256 val Displayed value of scroll bar between 0 and range inclusive range Maximum value Description Refer to CMD_P...

Страница 204: ...0030 Clearance No BRT 037 204 Product Page Document Feedback Copyright Bridgetek Limited Without the 3D look cmd_scrollbar 20 50 120 8 OPT_FLAT 10 40 100 A brown themed vertical scroll bar cmd_bgcolor...

Страница 205: ...ons uint16_t val uint16_t range Parameters x x coordinate of slider top left in pixels y y coordinate of slider top left in pixels w width of slider in pixels If width is greater than height the scrol...

Страница 206: ...k Copyright Bridgetek Limited range Maximum value Description Refer to CMD_PROGRESS for more information on physical Dimension Command layout 0 CMD_SLIDER 0xffffff10 4 X 6 Y 8 W 10 H 12 options 14 val...

Страница 207: ...cument Reference No BRT_000030 Clearance No BRT 037 207 Product Page Document Feedback Copyright Bridgetek Limited A brown themed vertical slider with range 0 65535 cmd_bgcolor 0x402000 cmd_fgcolor 0x...

Страница 208: ...t16_t options uint16_t val Parameters x x coordinate of dial center in pixels y y coordinate of dial center in pixels r radius of dial in pixels Options By default the dial is drawnwith a 3D effect an...

Страница 209: ...ils of physical dimension are The marker is a line of width r 12 256 drawn at a distance r 140 256 to r 210 256 from the center Refer to Co processor engine widgets physical dimensions for more inform...

Страница 210: ...ce No BRT 037 210 Product Page Document Feedback Copyright Bridgetek Limited Dials set to 0 33 and 66 cmd_dial 28 60 24 0 0x0000 cmd_text 28 100 26 OPT_CENTER 0 cmd_dial 80 60 24 0 0x5555 cmd_text 80...

Страница 211: ...mited 5 37 CMD_TOGGLE draw a toggle switch C prototype void cmd_toggle int16_t x int16_t y int16_t w int16_t font uint16_t options uint16_t state const char s Parameters x x coordinate of top left of...

Страница 212: ...S String label for toggle A character value of 255 in C it can be written as xff separates the two labels Description The details of physical dimension are Outer bar radius r is font height 10 16 pix...

Страница 213: ...d_toggle 60 20 33 27 0 0 no xff yes cmd_toggle 60 60 33 27 0 65535 no xff yes Without the 3D look cmd_toggle 60 20 33 27 OPT_FLAT 0 no xff yes cmd_toggle 60 60 33 27 OPT_FLAT 65535 no xff yes With dif...

Страница 214: ...Parameters x x coordinate of text base in pixels y y coordinate of text base in pixels font Font to use for text 0 31 See ROM and RAM Fonts options By default x y is the top left pixel of the text an...

Страница 215: ...edback Copyright Bridgetek Limited The text string itself which should be terminated by a null character Command layout 0 CMD_TEXT 0xffffff0c 4 X 6 Y 8 Font 10 Options 12 S 0 null character to termina...

Страница 216: ...No BRT_000030 Clearance No BRT 037 216 Product Page Document Feedback Copyright Bridgetek Limited Centered horizontally cmd_text 80 60 31 OPT_CENTERX Text Right justified cmd_text 80 60 31 OPT_RIGHTX...

Страница 217: ...rammer Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 217 Product Page Document Feedback Copyright Bridgetek Limited Centered both horizontally and vertically cmd_text 80 60 3...

Страница 218: ...d RAM Fonts options By default x y is the top left pixel of the text OPT_CENTERX centers the text horizontally OPT_CENTERY centers it vertically OPT_CENTER centers the text in both directions OPT_RIGH...

Страница 219: ...nce No BRT_000030 Clearance No BRT 037 219 Product Page Document Feedback Copyright Bridgetek Limited Command layout 0 CMD_NUMBER 0xffffff2e 4 X 6 Y 8 Font 10 Options 12 n Examples A number cmd_number...

Страница 220: ...Product Page Document Feedback Copyright Bridgetek Limited Signed output of positive and negative numbers cmd_number 20 20 31 OPT_SIGNED 42 cmd_number 20 60 31 OPT_SIGNED 42 Forcing width to 3 digits...

Страница 221: ...IDENTITY 0xffffff26 5 40 CMD_SETMATRIX write the current matrix to the display list The co processor engine assigns the value of the current matrix to the bitmap transform matrix of the graphics engin...

Страница 222: ...eter b of the command BITMAP_TRANSFORM_B for formatting c output parameter written with matrix coefficient c See the parameter c of the command BITMAP_TRANSFORM_C for formatting d output parameter wri...

Страница 223: ...pressed data as was specified by CMD_INFLATE while the end address of decompressed data can be retrieved by this command It is one out parameter and can be passed in as any value with CMD_GETPTR to RA...

Страница 224: ...decompressed by last CMD_LOADIMAGE before this command It is an output parameter height The height of image which was decompressed by last CMD_LOADIMAGE before this command It is an output parameter...

Страница 225: ...37 225 Product Page Document Feedback Copyright Bridgetek Limited y scale factor in signed 16 16 bit fixed point form Command layout 0 CMD_SCALE 0xffffff28 4 sx 8 sy Examples To zoom a bitmap 2X cmd B...

Страница 226: ...ance No BRT 037 226 Product Page Document Feedback Copyright Bridgetek Limited To zoom a bitmap 2X around its center cmd BEGIN BITMAPS cmd_loadidentity cmd_translate 65536 32 65536 32 cmd_scale 2 6553...

Страница 227: ...ckwise rotation angle in units of 1 65536 of a circle Command layout 0 CMD_ROTATE 0xffffff29 4 a Examples To rotate the bitmap clockwise by 10 degrees with respect to the top left of the bitmap cmd BE...

Страница 228: ...ce No BRT 037 228 Product Page Document Feedback Copyright Bridgetek Limited Rotating a 64 x 64 bitmap around its center cmd BEGIN BITMAPS cmd_loadidentity cmd_translate 65536 32 65536 32 cmd_rotate 9...

Страница 229: ...current matrix C prototype void cmd_translate int32_t tx int32_t ty Parameters tx x translate factor in signed 16 16 bit fixed point form ty y translate factor in signed 16 16 bit fixed point form Co...

Страница 230: ...Reference No BRT_000030 Clearance No BRT 037 230 Product Page Document Feedback Copyright Bridgetek Limited To translate the bitmap 20 pixels to the left cmd BEGIN BITMAPS cmd_loadidentity cmd_transla...

Страница 231: ...y list and then use CMD_CALIBRATE The co processor engine overlays the touch targets on the current display list gathers the calibration input and updates REG_TOUCH_TRANSFORM_A F C prototype void cmd_...

Страница 232: ...MACRO_1 registers are utilized to perform the animation kind of effect The frequency of points movement is with respect to the display frame rate configured Typically for 480x272 display panels the di...

Страница 233: ...nate of top left of spinner Y The Y coordinate of top left of spinner Style The style of spinner Valid range is from 0 to 3 Scale The scaling coefficient of spinner 0 means no scaling Examples Create...

Страница 234: ...eference No BRT_000030 Clearance No BRT 037 234 Product Page Document Feedback Copyright Bridgetek Limited Style 1 a line of dots cmd_spinner 80 60 1 0 Style 2 a rotating clock hand cmd_spinner 80 60...

Страница 235: ...er Guide Version 2 1 Document Reference No BRT_000030 Clearance No BRT 037 235 Product Page Document Feedback Copyright Bridgetek Limited Half screen scale 1 cmd_spinner 80 60 0 1 Full screen scale 2...

Страница 236: ...of CMD_SKETCH CMD_SCREENSAVER or CMD_SPINNER can be active at one time C prototype void cmd_screensaver Description REG_MACRO_0 is updated with respect to frequency of frames displayed depending on t...

Страница 237: ...CMD_SCREENSAVER or CMD_SPINNER can be active at one time This command is applicable for FT800 and FT801 users is recommended to use CMD_CSKETCH since the optimization has been done for capacitive touc...

Страница 238: ...0xffffff30 4 X 6 Y 8 W 10 H 12 Ptr 16 Format Examples To start sketching into a 480x272 L1 bitmap cmd_memzero 0 480 272 8 cmd_sketch 0 0 480 272 0 L1 Then to display the bitmap cmd BITMAP_SOURCE 0 cm...

Страница 239: ...he co processor engine to stop the periodic operation which is triggered by CMD_SKETCH CMD_SPINNER or CMD_SCREENSAVER C prototype void cmd_stop Command layout 0 CMD_STOP 0xffffff17 Parameters None Des...

Страница 240: ...out how to set up custom font please refer to ROM and RAM Fonts C prototype void cmd_setfont uint32_t font uint32_t ptr Command layout 0 CMD_SETFONT 0xffffff2b 4 font 8 ptr Parameters font The bitmap...

Страница 241: ...he center Linear tracker mode If parameter w is greater than h track the relative distance of touching point to the width of graphics object specified by tag value If parameter w is not greater than h...

Страница 242: ...gine tag tag of the graphics object to be tracked 1 255 Command layout 0 CMD_TRACK 0xffffff2c 4 X 6 Y 8 W 10 h 12 tag Examples Horizontal track of rectangle dimension 40x12pixels and the present touch...

Страница 243: ...255 168 64 dl CLEAR 1 1 1 dl BEGIN RECTS dl VERTEX2F 70 16 40 16 dl VERTEX2F 82 16 80 16 dl COLOR_RGB 255 0 0 dl VERTEX2F 70 16 40 16 dl VERTEX2F 82 16 60 16 dl COLOR_MASK 0 0 0 0 dl TAG 1 dl VERTEX2...

Страница 244: ...at 80 60 adjustable by touch uint16_t angle 0x8000 cmd_track 80 60 1 1 33 while 1 cmd TAG 33 cmd_dial 80 60 55 0 angle uint32_t tracker rd32 REG_TRACKER if tracker 0xff 33 angle trackeI 16 To make an...

Страница 245: ...engine needs to write the result into the destination address the destination address must be never used or referenced by graphics engine C prototype void cmd_snapshot uint32_t ptr Parameters ptr Sna...

Страница 246: ...esources After 2 5 seconds have elapsed the co processor engine writes zero to REG_CMD_READ and REG_CMD_WRITE and starts waiting for commands After this command is complete the MCU shall write the nex...

Страница 247: ...creen Engine CTSE built in with the following features I2 C interface to Capacitive Touch Panel Module CTPM Support up to 5 touching points at the same time Support CTPM with Focaltech FT5x06 series o...

Страница 248: ...ode multi touch detection mode up to 5 touch points 1 Compability mode single touch detection mode R W Reserved 0 Register Definition 78 REG_CTOUCH_TOUCH0_XY Definition 31 16 15 0 Reset Value 0x800080...

Страница 249: ...ddress 0x102508 Bit 0 15 The value of these bits are the Y coordinates of the second touch point Bit 16 31 The value of these bits are X coordinates of the second touch point RO RO Register Definition...

Страница 250: ..._TOUCH3_XY Definition Address 0x102578 Bit 0 15 The value of these bits are the Y coordinates of the fourth touch point Bit 16 31 The value of these bits are X coordinates of the fourth touch point RO...

Страница 251: ...RANSFORM_B has the same definition with REG_TOUCH_TRANSFORM_B See REG_TOUCH_TRANSFORM_B for more details REG_CTOUCH_TRANSFORM_C Definition REG_CTOUCH_TRANSFORM_C has the same definition with REG_TOUCH...

Страница 252: ...these bits are Y coordinates of touch point but before going through transform matrix Bit 16 31 The value of these bits are X coordinates of touch point but before going through transform matrix REG_C...

Страница 253: ...OUCH_T AG 0x0 1058072 4 bytes 1058092 4 bytes 0x10000 REG_CT OUCH_T RANSF ORM _F REG_CT OUCH_T RANSF ORM _F 0x0 REG_T OUCH_T RANSFOR M _F 0x0 1058096 4 bytes 0x0 REG_CT OUCH_T RANSF ORM _E REG_CT OUC...

Страница 254: ...und 100Hz to report the coordinates the sketch functionality updates less frequently compared to resistive touch CMD_CSKETCH introduces a linear interpolation algorithm to provide a smoother effect wh...

Страница 255: ...map format Format of sketch bitmap either L1 or L8 freq The oversampling frequency The typical value is 1500 to make sure the lines are connected smoothly The value zero means no oversampling operatio...

Страница 256: ...ails of our distributor s and sales representative s in your country System and equipment manufacturers and designers are responsible to ensure that their systems and any Future Technology Devices Int...

Страница 257: ...T800 FT801 Internal Clock Trimming AN_299_FT800_FT801_Internal_Clock_Trimming Acronyms Abbreviations Terms Description CS Chip select DL dl Display list EVE Embedded Video Engine GPIO General Purpose...

Страница 258: ...format for L1 L4 L8 92 Figure 10 Pixel format for ARGB2 1555 92 Figure 11 Pixel format for ARGB4 RGB332 RGB565 and Palette 93 Figure 12 STENCIL_OP constants definition 138 List of Tables Table 1 Bitm...

Страница 259: ...revision information Byte 0 1 Chip ID 0801 Byte 2 3 Version ID 0100 0B B23Ch 0F FFFBh 275 kB ROM_FONT Font table and bitmap 0F FFFCh 0F FFFFh 4 B ROM_FONT_ADDR Font table pointer address 10 0000h 10 1...

Страница 260: ...o playback 18 Code snippet 6 Check the status of audio playback 18 Code snippet 7 Stop the audio playback 18 Code snippet 8 Getting Started 19 Code snippet 9 dl function definition 26 Code snippet 10...

Страница 261: ...gister Definition 25 REG_TOUCH_DIRECT_XY 48 Register Definition 26 REG_TOUCH_TRANSFORM_F Definition 49 Register Definition 27 REG_TOUCH_TRANSFORM_E Definition 50 Register Definition 28 REG_TOUCH_TRANS...

Страница 262: ...efinition 75 Register Definition 66 REG_SCREENSHOT_READ Definition 76 Register Definition 67 REG_SCREENSHOT_BUSY Definition 76 Register Definition 68 REG_SCREENSHOT_START Definition 77 Register Defini...

Страница 263: ...FT800 Series Programmer Guide Document Reference No BRT_000030 Clearance No BRT 037 Product Page http brtchip com product Document Feedback Send Feedback Revision Changes Date 0 1 Initial Draft Releas...

Отзывы: