Library for FTDI FT800, Support up to 512 x 512 pixel resolution.
Dependents: FT800-Demo-Sliders FT800-Clock FT800-Demo-Bitmap
Hardware
- Display TFT 4.3" 480 x 272 (RVT43ULFNWC03) by Riverdi
- Break Out Board 20 by Riverdi
- Cable FFC, 0.5mm pitch, 20 pin, 150 mm
Info
- FT800 - Display, Audio and Touch Graphics Controller IC
- FT801 - Capacitive Touch Enabled Display, Audio and Touch Controller IC
- FT800 Series Programmer Guide
FT800_Display.h@0:b699e59d925b, 2020-12-03 (annotated)
- Committer:
- nz
- Date:
- Thu Dec 03 21:59:15 2020 +0000
- Revision:
- 0:b699e59d925b
Library for FTDI FT800
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nz | 0:b699e59d925b | 1 | /* mbed Library for FTDI FT800 */ |
nz | 0:b699e59d925b | 2 | |
nz | 0:b699e59d925b | 3 | #ifndef FT800_DISPLAY_H |
nz | 0:b699e59d925b | 4 | #define FT800_DISPLAY_H |
nz | 0:b699e59d925b | 5 | |
nz | 0:b699e59d925b | 6 | #define GPU_FREQ 48000000ULL // FT800 frequency |
nz | 0:b699e59d925b | 7 | #define DISP_FPS 60 // frame rate |
nz | 0:b699e59d925b | 8 | |
nz | 0:b699e59d925b | 9 | //------------------------------------------------------------------------------ |
nz | 0:b699e59d925b | 10 | //DISPLAY TIMING 480 x 272 320 x 240 |
nz | 0:b699e59d925b | 11 | //------------------------------------------------------------------------------ |
nz | 0:b699e59d925b | 12 | #define DISP_WIDTH 480 // 320 // Horizontal Size |
nz | 0:b699e59d925b | 13 | #define DISP_HSYNC0 0 // 0 // Start of HSYNC (falling edge) |
nz | 0:b699e59d925b | 14 | #define DISP_HSYNC1 41 // 10 // End of HSYNC (rising edge) |
nz | 0:b699e59d925b | 15 | #define DISP_HFP 25 |
nz | 0:b699e59d925b | 16 | #define DISP_HSLEN 2 |
nz | 0:b699e59d925b | 17 | |
nz | 0:b699e59d925b | 18 | #define DISP_HEIGHT 272 // 240 // Vertical Size |
nz | 0:b699e59d925b | 19 | #define DISP_VSYNC0 0 // 0 // Start of VSYNC (falling edge) |
nz | 0:b699e59d925b | 20 | #define DISP_VSYNC1 10 // 2 // End of VSYNC (rising edge) |
nz | 0:b699e59d925b | 21 | #define DISP_VFP 8 |
nz | 0:b699e59d925b | 22 | #define DISP_VSLEN 2 |
nz | 0:b699e59d925b | 23 | |
nz | 0:b699e59d925b | 24 | #define DISP_PCLK_POL 1 // 0 // Pixel Clock Polarity |
nz | 0:b699e59d925b | 25 | #define DISP_SWIZZLE 0 // B[7:2] G[7:2] R[7:2] - arrangement of output RGB pins |
nz | 0:b699e59d925b | 26 | |
nz | 0:b699e59d925b | 27 | #define DISP_HCYCLE 548 // 408 // (DISP_WIDTH + DISP_HSYNC1 + DISP_HFP + DISP_HSLEN) Total number of clocks per line |
nz | 0:b699e59d925b | 28 | #define DISP_VCYCLE 292 // 263 // (DISP_HEIGHT+ DISP_VSYNC1 + DISP_VFP + DISP_VSLEN) Total number of lines per screen |
nz | 0:b699e59d925b | 29 | #define DISP_PCLK 5 // 8 // (GPU_FREQ / DISP_VCYCLE / DISP_HCYCLE /(DISP_FPS-1)) Set Pixel Clock Frequenc |
nz | 0:b699e59d925b | 30 | |
nz | 0:b699e59d925b | 31 | #define DISP_PWM_HZ 250 // 250 // Set backlight PWM frequency in Hz |
nz | 0:b699e59d925b | 32 | #define DISP_PWM_DUTY 128 // 128 // Set backlight duty cycle (brightness), 0 = off, 0x80 = full brightness |
nz | 0:b699e59d925b | 33 | |
nz | 0:b699e59d925b | 34 | //------------------------------------------------------------------------------ |
nz | 0:b699e59d925b | 35 | //TOUCH SCREEN |
nz | 0:b699e59d925b | 36 | //------------------------------------------------------------------------------ |
nz | 0:b699e59d925b | 37 | #define TOUCH_SENSITIVITY 1500 // 0x0000-0xFFFF (highest sensitivity) |
nz | 0:b699e59d925b | 38 | #define TOUCH_MODE 3 // 0-off, 1- single mode, 2-frame mode, 3-continuous mode |
nz | 0:b699e59d925b | 39 | #define TOUCH_ADC_MODE 1 // 0-Single Ended mode, 1-Differential Mode |
nz | 0:b699e59d925b | 40 | #define TOUCH_CHARGE 6000 // touch-screen charge time, in the unit of 6 clocks |
nz | 0:b699e59d925b | 41 | #define TOUCH_SETTLE 3 // touch screen settle time in the unit of 6 clocks |
nz | 0:b699e59d925b | 42 | #define TOUCH_OVERSAMPLE 7 // 1-15, touch screen oversample factor. The higher value -> more accuracy & more power consumption |
nz | 0:b699e59d925b | 43 | |
nz | 0:b699e59d925b | 44 | //------------------------------------------------------------------------------ |
nz | 0:b699e59d925b | 45 | //GPIO PINS |
nz | 0:b699e59d925b | 46 | //------------------------------------------------------------------------------ |
nz | 0:b699e59d925b | 47 | #define GPIO_DIR 0x80 // GPIO7-GPIO0, 1=output, 0=input |
nz | 0:b699e59d925b | 48 | #define GPIO_SET 0x80 // GPIO7-GPIO0, 1="HI", 0="LO" |
nz | 0:b699e59d925b | 49 | |
nz | 0:b699e59d925b | 50 | #endif |