1
Discussion - EVE / Touch register intermittently gets correct values
« on: April 21, 2022, 03:35:57 PM »
Hi all,
I am using the FT811 chip with an LCD screen, and have set the size of the screen and other parameters. When I press on a button, it triggers an interrupt as expected, and within the function I read the tag register and press position on the screen:
Sometimes, when I press the button, I get the expected response, that looks like:
However sometimes, I press on the button, and get this:
But I don't understand why its intermittent. Its not a different type of press, every press generates an interrupt correctly and I am reading the values directly (and in this case immediately printing them), so why are the tag and press registers empty? Is there a setting I need to change to get this to be more reliable?
Any help would be greatly appreciated!
I am using the FT811 chip with an LCD screen, and have set the size of the screen and other parameters. When I press on a button, it triggers an interrupt as expected, and within the function I read the tag register and press position on the screen:
Code: [Select]
void ft811_new_interrupt() {
uint8_t press_mask = ft_read8(FT_REG_INT_MASK);
uint8_t press_tag = ft_read8(FT_REG_CTOUCH_TAG);
uint32_t tag_xy = ft_read32(FT_REG_TOUCH_TAG_XY);
uint32_t press_xy = ft_read32(FT_REG_CTOUCH_TOUCH0_XY);
uint8_t int_flags = ft_read8(FT_REG_INT_FLAGS);
Sometimes, when I press the button, I get the expected response, that looks like:
Code: [Select]
TAG:0x06
TagXY:0x023C0160
PressXY0:0x023C0160
MASK:0x06
FLAGS:0xA7
However sometimes, I press on the button, and get this:
Code: [Select]
TAG:0x0
TagXY:0x80008000
PressXY0:0x80008000
MASK:0x06
FLAGS:0xAF
But I don't understand why its intermittent. Its not a different type of press, every press generates an interrupt correctly and I am reading the values directly (and in this case immediately printing them), so why are the tag and press registers empty? Is there a setting I need to change to get this to be more reliable?
Any help would be greatly appreciated!