Hello,
In general to adjust the sensitivity of a capacitive touch control you would hold the CTP in reset and write configuration values to it. It would also be possible to write the applicable registers with your MCU. Unfortunately I do not have any examples for the GT911 to had, but I do have some examples for focaltech parts.
For BT81X:
- Hold the touch engine in reset (set REG_CPURESET = 2)
- Write the CTPM configuration register address and value to the BT81x designated memory location
- Up to 10 register address/value can be added
- Release the touch engine reset (set REG_CPURESET = 0)
#define FW_RD(a) VC.rd16(RAM_JTBOOT + 2 * (a))
#define FW_WR(a, v) VC.wr16(RAM_JTBOOT + 2 * (a), (v))
void init_custom_touch(size_t num_regs, uint8_t *reg_value)
{
while (VC.rd(REG_CPURESET) != 0)
;
VC.wr(REG_CPURESET, 2);
uint16_t main = FW_RD(0) & 0xfff;
uint16_t i_set = 0x4000 | (main - 4);
uint16_t patch = main + 1;
uint16_t i_eol = FW_RD(patch);
while (num_regs--) {
uint8_t reg = *reg_value++;
uint8_t val = *reg_value++;
FW_WR(patch++, 0x8000 | val);
FW_WR(patch++, 0x8000 | reg);
FW_WR(patch++, i_set);
}
FW_WR(patch, i_eol);
VC.wr(REG_CPURESET, 0);
}
For FT801:
- Bootup FT801
- Enable ROMSUB to be accessible by host
- Hold the touch engine in reset
- Download firmware and write respective registers & values into memory location indicated by PATCH_START macro (array of {register address,register value}is the structure used)
- Disable ROMSUB to be accessible by host
- Release the touch engine from reset
Please see
FT801_SampleApp_CustomFW.zipFor FT81x:
-Similar to above
Please see
FT811_SampleApp_CustomFW.7Z where the firmware included is for FT5x06 controllers. It can support sensitivity but some other changes need the factory mode of the CTP and so please check for your CTP datasheet.
If factory mode changes are needed, you can get programmer modules for CTP from the CTP manufacturer.
CTouchFirmware[] - Custom firmware to download
SAMAPP_BootupConfig() - Api for FT8xx bootup. Presently demonstrate setting up of 4 controller registers with respective values.
SAMAPP_InitCustomTouch() - Api to download the firmware, set the values of intended registers and values of capacitive touch controller.
Please note: The host shall follow this programming procedure every time the touch engine is reset or FT8xx is been through power modes.
Setting the REG_CTOUCH_EXTENDED register to allow for extended mode provides extra touch_xy registers for up to 5 touch points, it would then be up to the application to infer any gestures from the given tough inputs.
Best Regards,
BRT Community