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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - MPW691

Pages: [1]
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:
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!

2
Discussion - EVE / Button Press Colour
« on: November 03, 2020, 09:55:40 AM »
Hi, this probably a simple question to many but I couldn't find the answer in the FT81X Programmers guide so thought I would ask here.

I am able to set the colour of the button with the 'CMD_FGCOLOR', however, while the button is pressed it reverts back to the default colour(dark blue). I Initially thought that CMD_BGCOLOR would set the press colour, but it turns out that's not the case, and looking at the manual (section 5.2.2) it clearly stated CMD_BGCOLOR is not used.

So my question is simple: How do I set the button colour for when it is pressed?

Thanks!

3
Discussion - EVE / Drawing filled polygon
« on: July 20, 2020, 09:32:26 AM »
Hi all,

I need to draw the following shape but I'm not sure how is best to do it with the minimal number of instructions (as I need a few of them and don't want to fill my display list).


I can draw the outline very easy with
Code: [Select]
BEGIN(LINE_STRIP)
VERTEX2II(150, 200, 0, 0)
VERTEX2II(200, 200, 0, 0)
VERTEX2II(225, 225, 0, 0)
VERTEX2II(225, 275, 0, 0)
//etc...

However I also need to fill it in. I tried doing:
Code: [Select]
STENCIL_OP(INCR, INCR)
COLOR_MASK(0, 0, 0, 0)
BEGIN(EDGE_STRIP_B)
//draw lines
END()
STENCIL_FUNC(EQUAL, 1, 255)
BEGIN(EDGE_STRIP_B)
//draw lines again
END()

But this only fills in part of the polygon, and leaves parts of it unfilled. Do I need to split this shape up into 3 mini shapes (which seems like a lot of extra unnecessary instructions added to the display list) or can I use a different method, maybe the scissor?

If possible I wan't to avoid loading in bitmaps because they never work quite how I want them too, I'd have to load in separate ones for filled and unfilled, and I don't have a lot of space to store them. Would prefer a display list option, which I'm sure must be possible.

I have tried a lot of different things so if anyone want's to take on this challenge and finds any code they could share that could create this shape then it would be hugely appreciated!

_ Image doesn't seem to want to display so I have attached it to this post) _

Pages: [1]