BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: cap-touch: configure / gesture ?  (Read 6010 times)

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
cap-touch: configure / gesture ?
« on: March 25, 2021, 06:31:05 PM »

I have been asked how to configure the sensitivity for a cap-touch controller connected to EVE.
That would be for GT911 but would also be interesting to  know if this is even possible for focaltech touch controllers.

I checked the datasheet and the programming guide and it looks like there is no way to configure anything for a cap-touch controller.


But what I found and what brings me to my second point, the datasheets have this:
"In extended mode a new set of readout registers are available, allowing gestures and up to five touches to be read."

As far as I can tell there is no gesture support and no way to activate an existing gesture mode in the touch-controller.
Is that correct or am I missing something?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 734
    • View Profile
Re: cap-touch: configure / gesture ?
« Reply #1 on: March 26, 2021, 03:25:03 PM »

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)

Code: [Select]
#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.zip

For 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
Logged