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.

Messages - BRT Community

Pages: 1 ... 5 6 [7] 8 9 ... 50
91
Discussion - EVE / Re: What is the purpose of CMD_REGREAD?
« on: May 31, 2023, 02:59:06 PM »
Hi Rudolph,

Yes both CMD_REGREAD and CMD_MEMWRITE are much less commonly used than the normal SPI write/read but useful to have for those kinds of uses.

We'll post back when the programming guide updates are completed,

Best Regards, BRT Community

 

92
Hello,

Thanks for your question.

Do you have the FT9xx Eclipse toolchain installed on you machine?

Best Regards,
BRT Community

93
Discussion - EVE / Re: What is the purpose of CMD_REGREAD?
« on: May 29, 2023, 04:47:38 PM »
Hi Rudolph,

Thanks for your feedback, yes we are going through the Programmers Guide to review the data types and we will update them where applicable. As you said, some of the signed/unsigned types are not the optimal ones.

For the CMD_REGREAD, sorry meant to also mention CMD_MEMWRITE in that reply. You could use the CMD_REGREAD and CMD_MEMWRITE so that you can do reads and writes with low latency between them.

Best Regards, BRT Community

94
Discussion - EVE / Re: What is the purpose of CMD_REGREAD?
« on: May 25, 2023, 01:56:07 PM »
Hi Rudolph,

As you said, in most application cases where the MCU wants to read or write, a standard SPI write would be most efficient.
There can be cases where it may be beneficial such as to reduce latency. e.g. if you want to do a read immediately after an operation which uses the co-processor, then waiting for the command to complete and then doing a SPI read would have more latency than adding a REGREAD command in your list of commands. For latency, one case may be reading the REG_CLOCK.
You could also write many registers together even if not in adjacent registers (e.g. call CMD_PCLKFREQ and then write the display registers)

For RAM_JBOOT, this is not designed to be accessed from the host MCU directly and so should only be used with the recommended methods (such as the custom touch settings in the BT817 datasheet)

Yes, we have implemented the commands in BRT_AN_025 directly and so they just add a dummy value which is replaced by the co-processor. We tend to use helper functions instead which then wrap those into more useful commands where you get the value back from the function (via return or pointer). We will look at adding some more of the EVE_LIB functions as helpers in the examples which we are producing for BRT_AN_025 to make these easier to use though, and so thanks for your feedback on this point.

Best Regards, BRT Community

95
Discussion - EVE / Re: CMD_PCLKFREQ requires the flash BLOB?
« on: May 18, 2023, 11:11:29 AM »
Hi Rudolph,
Thanks for your detailed information, we will review your feedback,
Yes, the main difference is that having the BLOB and Flash in full speed prevents the command from setting a value which exceeds the spec of the PLL frequency. Without these it may set a value which exceeds the allowable spec and so may affect reliable operation.

Best Regards, BRT Community


96
Discussion - EVE / Re: 1.2V regulator quiescent current draw
« on: May 12, 2023, 03:11:13 PM »
Hello,

According to the hardware team mac Icc1 is 2mA across PVT testing.

Best Regards,
BRT Community

97
Discussion - EVE / Re: 1.2V regulator quiescent current draw
« on: May 10, 2023, 03:54:50 PM »
Hello,

The hardware team have confirmed that the listed Icc1 current in powerdown mode includes the 1.2V regulator current.

Best Regards,
BRT Community

98
Discussion - EVE / Re: 1.2V regulator quiescent current draw
« on: May 09, 2023, 04:37:12 PM »
Hello,

Thank you for your question, i will double check this with the hardware team.

Best Regards,
BRT Community

99
Discussion - EVE / Re: ESD 4.16 type ft_argb32_t disappeared
« on: May 02, 2023, 09:23:21 AM »
Hello,

Thank you for your post.

The ft_argb32_t variable has been renamed to esd_argb32_t in ESD 4.16.

Best Regards,
BRT Community

100
Discussion - EVE / Re: Drawing arcs and circles
« on: March 29, 2023, 05:25:31 PM »
Hi,

Here is a small example of one way to use edge strips to draw an arc.

We can post an explanation too of how it works when ready. The only dependency is that you need cos and sin functions.
When drawing an arc using stencilling, the edge strips provide a good way to shade in an angle. However, each one (top, bottom, left, right) generally only work well for associated 90 degree areas and so we need to use more than one to make this arc.

This is just a basic one but we have used this technique for various arc gauge styles. You can add a point to make the leading and training edges rounded etc or a large point on the leading edge depending on the style which you want. You can also add more error checking etc. to handle out of range values.

It takes in various parameters including the max angle, min angle and the active value which defines how much of the arc is filled in.

p.s. one way to see what is happening is to comment out the line which turns off the color updates EVE_COLOR_MASK(0, 0, 0, 0);   and set a COLOR_RGB for each section.
Here is a small illustration attached showing how the centre circles, the wedge at the bottom and the four quadrant edge strips form a stencil which can then be colored in to make the active part of the arc.

Hope it helps,
BRT Community


Code: [Select]
void Custom_Widget_Arc_Gauge(uint16_t arc_centerx, uint16_t arc_centery, uint16_t arc_radius, uint16_t arc_thickness, uint32_t Arc_Active_Color, uint32_t Arc_Inactive_Color, uint16_t arc_min_limit, uint16_t arc_max_limit, uint16_t arc_value)
{
double arc_value_rad = 0;
uint16_t arc_activex = 0;
uint16_t arc_activey = 0;

double arc_min_limit_rad = 0;
uint16_t arc_start_x = 0;
uint16_t arc_start_y = 0;

double arc_max_limit_rad = 0;
uint16_t arc_end_x = 0;
uint16_t arc_end_y = 0;

//--------------------------------------------------------------------------------------------------------
// Process the angle data which will be used to make a uniform motion of the arc
//--------------------------------------------------------------------------------------------------------

// Ensure the value is within limits
if(arc_value > arc_max_limit)
arc_value = arc_max_limit;
if(arc_value < arc_min_limit)
arc_value = arc_min_limit;

//---------------------------------------------------------

// Calculate the angle in Radians for the Cos and Sin functions
// radians = ((degrees*pi)/180)

// For the arc which we will fill (the actual value of the arc gauge)
// Note: 0 degress is at the very bottom of the circle
if(arc_value > 180)
arc_value_rad = ((arc_value-180) * 3.14)/180;
else
arc_value_rad = (arc_value * 3.14)/180;

// For the min limit which can be for example at 20 degrees from the bottom
if(arc_min_limit > 180)
arc_min_limit_rad = ((arc_min_limit-180) * 3.14)/180;
else
arc_min_limit_rad = (arc_min_limit * 3.14)/180;

// For the max limit which can be for example at 340 degrees from the bottom
if(arc_max_limit > 180)
arc_max_limit_rad = ((arc_max_limit-180) * 3.14)/180;
else
arc_max_limit_rad = (arc_max_limit * 3.14)/180;

//---------------------------------------------------------

// Calculate the coordinates of the starting point, the gauge arc and the point at the tip of the arc

// for the arc gauge itself
arc_activex = (sin(arc_value_rad) * arc_radius);
arc_activey = (cos(arc_value_rad) * arc_radius);

// for the starting angle (the minimum value of the arc as it is normally not desired to be a full 360 deg circle)
arc_start_x = (sin(arc_min_limit_rad) * arc_radius);  
arc_start_y = (cos(arc_min_limit_rad) * arc_radius);         

// for the finishing angle (the maximum value of the arc as it is normally not desired to be a full 360 deg circle)
arc_end_x = (sin(arc_max_limit_rad) * arc_radius);     
arc_end_y = (cos(arc_max_limit_rad) * arc_radius);         

//--------------------------------------------------------------------------------------------------------
// Write to the stencil buffer and disable writing to the screen to make an invisible arc
//--------------------------------------------------------------------------------------------------------

// Set the stencil to increment and diasble writes to the screen
EVE_STENCIL_OP(EVE_STENCIL_INCR, EVE_STENCIL_INCR);
EVE_COLOR_MASK(0, 0, 0, 0);

// Draw concentric circles to form the stencil so that the arc has a unique stencil value and we can shade it later
EVE_BEGIN(EVE_BEGIN_POINTS);

// Outer circle makes the outer edge of the arc
EVE_POINT_SIZE(arc_radius*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);

// Inner circle makes the inner edge of the arc
EVE_POINT_SIZE((arc_radius - arc_thickness)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_END();

//--------------------------------------------------------------------------------------------------------
// Draw the edge strips which will fill in the arc
//--------------------------------------------------------------------------------------------------------

// These are drawn per quadrant as each edge strip will only work well on an angle up to 90 deg

// 0 - 89 Deg
if((arc_value > 0) && (arc_value < 90))
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_B);
EVE_VERTEX2F(((arc_centerx - arc_start_x)*16), (arc_centery+arc_start_y)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx - arc_activex)*16), (arc_centery + arc_activey)*16);
}
else
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_B);
EVE_VERTEX2F(((arc_centerx - arc_start_x)*16), (arc_centery+arc_start_y)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx - arc_radius)*16), (arc_centery)*16);
}

// 90 - 179 deg
if((arc_value >= 90)&& (arc_value < 180))
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_L);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx - arc_activex)*16), (arc_centery - arc_activey)*16);
}
else if (arc_value > 90)
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_L);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery - arc_radius)*16);
}

// 180 - 269 deg
if((arc_value >= 180)&& (arc_value < 270))
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_A);
EVE_VERTEX2F(((arc_centerx-1)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx + arc_activex)*16), (arc_centery - arc_activey)*16);
}
else if (arc_value > 180)
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_A);
EVE_VERTEX2F(((arc_centerx-1)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx + arc_radius )*16), (arc_centery)*16);
}

// 270 - 359 deg
if((arc_value > 270)&& (arc_value < 360))
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_R);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx + arc_activex)*16), (arc_centery + arc_activey)*16);
}
else if (arc_value > 270)
{
// Edge strip to draw the arc
EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_R);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery + arc_radius)*16);
}

// and finally draw a wedge shape at the bottom to ensure the inactive part of the arc is not coloured in

EVE_BEGIN(EVE_BEGIN_EDGE_STRIP_B);
EVE_VERTEX2F(((arc_centerx - arc_start_x)*16), (arc_centery + arc_start_y)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
EVE_VERTEX2F(((arc_centerx + arc_end_x)*16), (arc_centery + arc_end_y)*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);

EVE_END();

//--------------------------------------------------------------------------------------------------------
// Draw a circle which will fill the arc
//--------------------------------------------------------------------------------------------------------

// Stop incrementing the stencil
EVE_STENCIL_OP(EVE_STENCIL_KEEP, EVE_STENCIL_KEEP);
// re-enable writes to the screen
EVE_COLOR_MASK(1, 1, 1, 1);

// For the Active arc area, only draw in areas with stencil == 3
EVE_STENCIL_FUNC(EVE_TEST_EQUAL, 3, 255);
EVE_BEGIN(EVE_BEGIN_POINTS);
EVE_COLOR_RGB( ((uint8_t)(Arc_Active_Color>>16)), ((uint8_t)(Arc_Active_Color>>8)),  ((uint8_t)(Arc_Active_Color)));
EVE_POINT_SIZE(arc_radius*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
////////EVE_END();

// For the Inactive area of the arc, only draw in areas with stencil == 2
EVE_STENCIL_FUNC(EVE_TEST_EQUAL, 2, 255);
EVE_BEGIN(EVE_BEGIN_POINTS);
EVE_COLOR_RGB( ((uint8_t)(Arc_Inactive_Color>>16)), ((uint8_t)(Arc_Inactive_Color>>8)),  ((uint8_t)(Arc_Inactive_Color)));
EVE_POINT_SIZE(arc_radius*16);
EVE_VERTEX2F(((arc_centerx)*16), (arc_centery)*16);
////////EVE_END();

EVE_END();

//--------------------------------------------------------------------------------------------------------
// Clean up to avoid affecting other items later in the display list
//--------------------------------------------------------------------------------------------------------

EVE_STENCIL_FUNC(EVE_TEST_ALWAYS, 1, 255); // Revert to always drawing for the subsequent items

EVE_CLEAR(0,1,0); // Clear the stencil buffer to ensure it does not affect other items on the screen
}

//###############################################################################################################################################################
//###############################################################################################################################################################

void eve_display(void)
{

uint16_t arc_value = 40; // actual value
uint8_t direction = 0; // 0 means count up

while(1)
{
EVE_LIB_BeginCoProList();                                               // Begin new screen
EVE_CMD_DLSTART();                                                      // Tell co-processor to create new Display List

EVE_CLEAR_COLOR_RGB(0x00, 0x55, 0xFF);                                  // Specify color to clear screen to
EVE_CLEAR(1,1,1);                                                       // Clear color, stencil, and tag buffer

EVE_COLOR_RGB(255, 255, 255);
EVE_CMD_NUMBER(200, 200, 30, EVE_OPT_CENTERX, arc_value); // Print numerical arc value

EVE_COLOR_RGB(255, 255, 255);

//                      position Diam  Arc    Arc color  Arc color ----values------
//                                            active      backgnd   limit    arc
//                       X    Y  Size width    RRGGBB      RRGGBB  min max  value
Custom_Widget_Arc_Gauge(200, 200, 180, 30,   0xFF6000,  0x800080, 40, 320, arc_value);

EVE_DISPLAY();                                                          // Tell EVE that this is end of list
EVE_CMD_SWAP();                                                         // Swap buffers in EVE to make this list active

EVE_LIB_EndCoProList();                                                 // Finish the co-processor list burst write
EVE_LIB_AwaitCoProEmpty();                                              // Wait until co-processor has consumed all commands

if(direction == 0)
{
arc_value ++;
if(arc_value == 320)
direction = 1; // count down next time
}
else
{
arc_value --;
if(arc_value == 40)
direction = 0; // count up next time
}
}
}

101
Discussion - EVE / Re: Drawing arcs and circles
« on: March 23, 2023, 01:02:52 PM »
Hi,

Do you have SIN and COS functions in your MCU code framework?
It can be done using just the EVE commands (we can send an example) but ideally it works best if you have these trig functions available (either full or via lookup table).

Best Regards,
BRT Community

102
Discussion - EVE / Re: Drawing arcs and circles
« on: March 20, 2023, 01:13:07 PM »
Hi,

As you said Rudolph, two dots is a good way to make an un-filled circle.

Blending/stencilling can be used to create an arc by drawing an edge strip to overlap the active or non-active area of the circle if you want to have a certain quadrant shown and then only displaying the part of the circle which is within this arc. This is similar to the technique we often use to draw an arc gauge. We can create and post a small example here once it is ready.

Best Regards, BRT Community

 

103
Discussion - EVE / Re: Disable AUDIO_L output signal
« on: March 10, 2023, 10:07:39 AM »
Hi,

Could you advise which EVE device you have?

Best Regards, BRT Community

104
Discussion - EVE / Re: Widgets
« on: March 09, 2023, 05:01:16 PM »
Hello,

Quote from: BRT Community
Have you chosen an MCU to use as a SPI master interface yet?

Thank you but I already developed my own ESP32 library and a decompiler to iterate in CI/CD.
I believe Rudolph understood my question. Substantially I would like to create my own widgets, upload them (in flash?) and then use them as I can do with the Button.
The reason for this is that I really miss primitives like Arcs and (unfilled) Circles.
I read the documents that you linked but they are not exhaustive and do not explain how to do this.
Is there any reason why BRT is not allowing to create custom widgets?

Yes unfortunately it is not possible to define a widget in this way with EVE to the extent that you would be able to issue custom co-processor commands. I will however suggest this as a feature for future EVE revisions.

Currently the approach to generate custom widgets is to code them individually into custom functions (this is the approach ESD uses) using the inbuilt primitives or co-processor functions. OR as Rudolph has suggested utilise the CMD_NEWLIST / CMD_CALLIST or CMD_APPEND functions.

Best Regards,
BRT Community

105
Discussion - EVE / Re: Widgets
« on: March 06, 2023, 04:54:06 PM »
Hello,

Thank you for your question.

EVE has many in-built widgets which can be utilised by issuing the appropriate co-processor commands to the IC (such as CMD_BUTTON()) for example.
Please see the programmers guide for the full list of widgets:
https://brtchip.com/wp-content/uploads/Support/Documentation/Programming_Guides/ICs/EVE/BRT_AN_033_BT81X_Series_Programming_Guide.pdf

If you require some basics on how the EVE series of ICs can be programmed, please refer to the following application notes:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT-AN-006-FT81x-Simple-PIC-Example.pdf
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT_AN_008_FT81x_Creating_a_Simple_Library_For_PIC_MCU.pdf

These cover the low level SPI transactions required to interface with EVE and generate displays.

Finally Section 8 and 9 of the following examples application note covers some cases of widget usage:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT_AN_014_FT81X_Simple_PIC_Library_Examples.pdf

Have you chosen an MCU to use as a SPI master interface yet?
The BRT_AN_025 library is an port of the PIC library from the above application notes, and provides support for a wider range of MCU platforms, you can find the source here:
https://github.com/Bridgetek/EVE-MCU-BRT_AN_025

Best Regards,
BRT Community

Pages: 1 ... 5 6 [7] 8 9 ... 50