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: EVE Screen Editor V4.0.0 not smooth image conveter  (Read 14649 times)

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
EVE Screen Editor V4.0.0 not smooth image conveter
« on: March 10, 2021, 12:54:40 AM »

Hi all,
I hope you guys are well. 

I am  with EVE Screen Editor and EVE Asset builder, there are part number I can’t associate with and couldn’t find in the data sheet or the app note.

For example:
I am using EVE3x-43G-IPS-BLH-TPC-F128-HAP
And using the EVE2-USB2SPI-KIT-A board to work with ESE or EAB.

In the screen editor in the export EVE_HAL2
there are two items:
VM816C50A_LIBFT4222
VM816C50A_MPSSE

And I don't think these 2 associate with my module.

In the Project section, I set BT815, WQVGA(480x272) and one field is filled it with MX25L128(16MiB).
The problem is during I view the image using BTXX Emulator(BT8XXEMU_1), the image is great, but when I connected and Upload RAM and Coprocessor, the image is seems losing data so the image is not smooth and showed all the grid lines.

1. Where can I find all the related information of

VM816C50A_LIBFT4222
VM816C50A_MPSSE
MX25L128(16MiB)

2. What do I do to improve the image so it is the same as emulator?
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 390
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #1 on: March 10, 2021, 06:09:30 PM »

Hello,

the EVE2-USB2SPI-KIT-A has a FT232H, MPSSE is the correct option.
I have an EVE3-43G connected right now and I can access the FLASH from EAB.
Now I opened ESD 4.0, set the resolution to 480x272.
On the side is a tab "Devices". I selected the second option "Single RS232-HS ()" and pressed the connect button.
Now I can synchronize ESD with the display.

I went back into EAB, converted an image to ASTC 8x8 since ASTC format is the only one that can be displayed directly from flash.
I switched to FLASH Utilities and put that image in a .bin using the "Generate Flash Image" tab.
Now back to ESE, load the .bin on the right side into the simulated flash.
And the image needs to be added to the Coprocessor for display:

CLEAR(1, 1, 1)
CMD_SETBITMAP(0x800000 | 128, COMPRESSED_RGBA_ASTC_8x8_KHR, 256, 256)
BEGIN(BITMAPS)
VERTEX2II(0, 0, 0, 0)
END()

Works so far.

Now back to the "Devices" tab, press "Write Flash Content" and "Upload RAM and Coprocessor".

And yikes, this kind of works but it looks on the display like it got downscaled to 8 bit.
I did not expect that.

Okay, the flash-image should be already flashed now, so lets try to display it
with a microcontroller.

EVE_cmd_dl_burst(DL_COLOR_RGB | WHITE);
EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_setbitmap_burst(0x800000 | 128, EVE_COMPRESSED_RGBA_ASTC_8x8_KHR, 256, 256);
EVE_cmd_dl_burst(VERTEX2F(0, 0));
EVE_cmd_dl_burst(DL_END);

Works like a charm.

Okay, maybe there is something missing in ESE.

I modified it a little in ESE and uploaded it again to the display:

CLEAR_COLOR_RGB(0, 0, 0)
CLEAR(1, 1, 1)
COLOR_RGB(255,255,255)
CMD_SETBITMAP(0x800000 | 128, COMPRESSED_RGBA_ASTC_8x8_KHR, 256, 256)
BEGIN(BITMAPS)
VERTEX2F(0, 0)
END()

And now, that was not it.
Somehow the image gets dithered although it should be displayed directly from FLASH.

What else is different?
Could be the way the display is initialized.
So I tried using 800x480 instead and the result is the same.

That the foto from the display under ESE control is that blue must be my camera.
it actually does not look like this.
But it still can be seen that the image is different.
And my camera probably picked up that the image is brighter when displayed with a microcontroller.
« Last Edit: March 10, 2021, 06:13:04 PM by Rudolph »
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #2 on: March 11, 2021, 09:20:56 PM »

Hi Rudolph,
Sorry to ask these questions.  Can you please give me some pointers?
So I am still using my ESP32 nature io setup with your Eve2_81x.c/.h library.

I went over the the EAB to create the flash bin file

Flash's Map:
unified.blob                                           : 0    : 4096
page1livetext_480x272_COMPRESSED_RGBA_ASTC_8x8_KHR.raw : 4096 : 32640

Log:
Input files are ready!
C:/Users/Admin/Flash is selected as output folder.
Generating flash1.bin ...
Generate flash image flash1.bin successfully
Flash Map file         :  flash1.map
Flash Description file :  flash1.edf
Select input files!
Generating flash1.bin ...
Generate flash image flash1.bin successfully
Flash Map file         :  flash1.map
Flash Description file :  flash1.edf

and download the bin in the EVE3x-43G module

Log:
Updating C:/Users/Admin/Flash/flash1.bin to flash, erasing if necessary ...
 Information on channel number 0:
 Flags=0x2
 Type=0x8
 ID=0x1b3d0200
 LocId=0x1c3
 SerialNumber=0k5RJ57L
 Description=USB 2 SPI
 ftHandle=0x0

handle=0x5d8bb7d0 status=0x0
VC1 register ID after wake up 7c

 reg_touch_rz =0x7fff
 reg_touch_rzthresh =0xffff
 reg_touch_tag_xy=0x80008000
 reg_touch_tag=0x0

Switch flash status to BASIC. Result: SUCCESS
Updating Flash file "C:/Users/Admin/Flash/flash1.bin" to BT81X Flash Storage.
Switch flash status to FULL. Result: SUCCESS
Switch flash status to BASIC. Result: SUCCESS
Switch flash status to FULL. Result: SUCCESS
Switch flash status to BASIC. Result: SUCCESS
Switch flash status to FULL. Result: SUCCESS
Update Flash file "C:/Users/Admin/flash1.bin" to BT81X Flash Storage successfully
Switch flash status to BASIC. Result: SUCCESS
Switch flash status to FULL. Result: SUCCESS
Verifying Flash...
Verify flash successfully!
DONE!

From ESP after the SPI initilization and display the text and blue circle as an example

I added

    Send_CMD(CMD_DLSTART);
    Send_CMD(CLEAR_COLOR_RGB(0,0,0));
    Send_CMD(CLEAR(1,1,1));
    Cmd_SetBitmap(0x800000, COMPRESSED_RGBA_ASTC_8x8_KHR, 480, 272);
    Send_CMD(BEGIN(BITMAPS));
    Send_CMD(VERTEX2F(0, 0));
    Send_CMD(END());

But there is nothing show on the screen.
Is the problem from my commands?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #3 on: March 12, 2021, 05:16:31 PM »

Hi Rudolph,

Thanks for your results, we'll look into that on ESE,

Hi Chadpham75,

I think you are missing the "| 128" in your address,   this is 0x800000 | 4096/32 where 4096 is the address in flash that you loaded the image

    Cmd_SetBitmap(0x800000 |128, COMPRESSED_RGBA_ASTC_8x8_KHR, 480, 272);

Best Regards, BRT Community
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #4 on: March 12, 2021, 07:17:00 PM »

HI BRT Community,
Thank you for your reply  I did try different configurations but I am still not success to see my ASTC image display on screen.  I am still believe I missed out something else.

I have tried

{
    printf("Make live screen\n");
    Send_CMD(CMD_DLSTART);
    Send_CMD(CLEAR_COLOR_RGB(0,0,0));
    Send_CMD(CLEAR(1,1,1));
    Send_CMD(BEGIN(BITMAPS));
    Cmd_SetBitmap(0x800000|128, COMPRESSED_RGBA_ASTC_8x8_KHR, 480, 272);
    Send_CMD(VERTEX2F(0, 0));
    Send_CMD(END());
}
or this

{
    printf("Make live screen\n");
    Send_CMD(CMD_DLSTART);
    Send_CMD(CLEAR_COLOR_RGB(0,0,0));
    Send_CMD(CLEAR(1,1,1));
    Cmd_SetBitmap(0x800000|128, COMPRESSED_RGBA_ASTC_8x8_KHR, 480, 272);
    Send_CMD(BEGIN(BITMAPS));
    Send_CMD(VERTEX2F(0, 0));
    Send_CMD(END());
}
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #5 on: March 20, 2021, 05:31:03 AM »

Hi BRT Community,
Do you have any chance to follow up with the bug for the ESE that Rudolph reported above?
Please let me know since I really need the support ESE to make the EVE3x-43G to work as expected.
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 390
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #6 on: March 22, 2021, 06:47:56 PM »

That bug is purely cosmetical.
Sure, it does not look as nice when using ESE do display the image on an attached display,
but that is all.
The preview in ESE works just fine and displaying that image that ESE wrote to the flash with an attached
micro-controller also works fine.
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #7 on: March 23, 2021, 04:00:13 PM »

Rudolph,
Thank you for your reply.  As a beginner, I am trying to learning about the tools which advertised to support the Modules.  I am stuck in the middle between Matrix Orbital and Brigdgetek supports because I couldn't find any solid document to guide me through one good example from beginning to the end of the finish.  I am looking for the example of using my own PNG image, load to flash, tag it, and load the image on screen every time I cycle power, and touch the image in the tag area to generate the interrupt (I already learn how to generate the interrupt), and read back the tag number from the touch area.
I am trying to replace the current product with this module but it is so much missing for new evaluation or usages.
Can you please help me out?  Please just in blank pseudo code or just blank statements what should I support to do?
I am using EVE3x-43G module with EVE2-USB2SPI-KIT-A to connect to Bridgetek EAB.
Thank you so much.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #8 on: March 24, 2021, 08:52:32 AM »

Hi,

We have an example in the readme (word doc) of this zip file which shows how to convert and display an image in three different ways.

BRT_AN_025_Source_BETA_BT81x

You can find the code attached to display these.

It does not currently use touch but we can add this in and will post it later on,

Hope it helps,

BRT Community
« Last Edit: March 24, 2021, 10:53:23 AM by BRT Community »
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #9 on: March 24, 2021, 04:04:25 PM »

Hi BRT Community,
Thank you so much for the information.  I am able to download the eve_example.c file, but I won't be able to download the zip file, seem like the ftp server is not available.  Can you please help me to attach the zip again?
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 390
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #10 on: March 24, 2021, 05:55:48 PM »

Well, as I wrote on Github, open a new issue and I'll see what I can do.

..touch the image in the tag area to generate the interrupt (I already learn how to generate the interrupt),
and read back the tag number from the touch area.

My code library does not directly support using interrupts, there are no pin definitions for the
interrupt pin and I do not have a single example for using interrupts.
The reason is that checking for touch events does only cost a couple of micro-seconds. Even on the ESP32, although it is painfully slow when using the SPI.
And reading REG_TOUCH_TAG should be done outside of the interrupt anyways as it takes too much time within an interrupt function.
So you set a flag for your cyclically called mainfunction() to read out REG_TOUCH_TAG if an interrupt occured.

I setup my main loop to be executed every 5ms and read REG_TOUCH_TAG every time.
The display is refreshed every 20ms in my code.
There is no noticeable lag between a touch-event and the display-refresh, not even with an Arduino UNO.


The display-refresh could happen slower, for example triggered by touch-events.
But it must never happen faster than the framerate of the display which is typically 60Hz or 16.667ms.
So a pure touch->refresh approach would need a safeguard to delay the next refresh.

I usually have too much on the display though to keep track of everything that could change,
not only touch events but things like measurements that are received from outside and need to be displayed
as graphic, numeric value, text, or whatever.
So tracking all these things would be rather cumbersome.
Take an instrument cluster for cars for example, or as there is nothing to be touched, the radio perhaps.
The unit displays values from outside like RDS text for the station you are playing and also lets you
select the station by touch.
In contrast just refreshing the display regardless if it actually has changed does not cost much time.
Even less so as all the controllers I am currently using offer SPI transfers over DMA.
Oh yes, just refreshing the display everytime makes animations very easy, the code can rely on that it is called
every 20ms.

On the ESP32 we have <100µs for the touch and <50µs for the display-refresh.
And that is really slow for a 240MHz dual-core controller.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #11 on: March 25, 2021, 10:58:37 AM »

Hi,

Here is a small edit to add touch tags.

It displays the touch tag, and the x and y coordinates.

The X and Y will read 32768 when not touched indicating a pen-up condition. They will show the coordinates of the touch when present.

The tag will show 0 if there is no touch, and 100 if touched on a non-tagged area (see code line CLEAR_TAG(100) where we set this).
It will show 1, 2 or 3 if you touch the respective image on the screen.

There are several ways to implement touch including interrupts but this shows one way to poll the touch and is quite easy to add to your code.

Some browsers don't work with the FTP links and so if using Windows 10 you can search for 'Internet Explorer' in Windows 10 search (even if not your main browser) and paste the FTP link into the browser. Windows 10 behaviour has changed as now Edge and Chrome browsers do not allow FTP download without an external FTP Client.

Best Regards, BRT Community

Code: [Select]
while(1)
{

// Create screen
EVE_LIB_BeginCoProList();
EVE_CMD_DLSTART();
EVE_CLEAR_COLOR_RGB(255, 255, 255); // colour of the background of the screen
EVE_CLEAR_TAG(100); // tag value of any un-tagged areas of screen
EVE_CLEAR(1,1,1); // clear all

EVE_COLOR_RGB(255,255,255); // set white to ensure images display in their original colours

EVE_TAG_MASK(1); // enable tagging
EVE_BEGIN(EVE_BEGIN_BITMAPS);

EVE_TAG(1); // this image will be tagged with 1
EVE_CMD_SETBITMAP(0, EVE_FORMAT_ARGB1555, 240, 114);
EVE_VERTEX2F((20*16),(100*16));
//EVE_END();

//EVE_BEGIN(EVE_BEGIN_BITMAPS);
EVE_TAG(2); // this image will be tagged with 2
EVE_CMD_SETBITMAP(80000, EVE_FORMAT_ARGB1555, 240, 114);
EVE_VERTEX2F((280*16),(100*16));
//EVE_END();

//EVE_BEGIN(EVE_BEGIN_BITMAPS);
EVE_TAG(3); // this image will be tagged with 3
EVE_CMD_SETBITMAP(0x800000 | 66496 / 32, EVE_FORMAT_COMPRESSED_RGBA_ASTC_4x4_KHR, 240, 114);
EVE_VERTEX2F((540*16),(100*16));

EVE_END();
EVE_TAG_MASK(0); // disable tagging

// Add the description text
EVE_COLOR_RGB(0, 0, 255);
EVE_CMD_TEXT(20 + (240/2), 240, 28, EVE_OPT_FORMAT | EVE_OPT_CENTER, "Raw Image \n Copied to RAM_G");
EVE_CMD_TEXT(280 + (240/2),240, 28, EVE_OPT_FORMAT | EVE_OPT_CENTER, "Bin Image \n Inflated to RAM_G");
EVE_CMD_TEXT(540 + (240/2),240, 28, EVE_OPT_FORMAT | EVE_OPT_CENTER, "ASTC Image \n Direct from Flash");

// print the tag number and coordinates
EVE_COLOR_RGB(255, 0, 0);
EVE_CMD_TEXT(20, 300, 28, EVE_OPT_FORMAT, "Tag is %d ", TagVal);
EVE_CMD_TEXT(20, 340, 28, EVE_OPT_FORMAT, "X is %d ", TouchX);
EVE_CMD_TEXT(20, 380, 28, EVE_OPT_FORMAT, "Y is %d ", TouchY);

EVE_DISPLAY();
EVE_CMD_SWAP();
EVE_LIB_EndCoProList();
EVE_LIB_AwaitCoProEmpty();


// read the tracker coordinates
TagVal = HAL_MemRead8(EVE_REG_TOUCH_TAG);
TouchXY = HAL_MemRead32(EVE_REG_TOUCH_SCREEN_XY);
TouchY = (TouchXY & 0x0000FFFF);
TouchX = ((TouchXY & 0xFFFF0000) >> 16);

}
« Last Edit: March 25, 2021, 11:00:21 AM by BRT Community »
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #12 on: March 26, 2021, 07:32:13 AM »

Hi BRT Community and Rudolph,
Thank you so much for both of your helps.  I finally successfully follow your instructions and Rudolph's version 5 of the EVE library and I am able to convert the image using EAB and download then be able to display the image correctly.

BRT Community,
Can you please help me to point me to the right document for the animation implementation for BT81x so I can test out this feature as well?  Thank you so much for your helps.

This is the complete code snippet in case anyone is beginner who need to the quick display commands from MCU.  You will need the usual SPI communication initialization and TFT_init
    EVE_cmd_flashfast();
    EVE_cmd_dl(CMD_DLSTART); /* Start the display list */
    EVE_cmd_dl_burst(DL_CLEAR_RGB | 0xffffffUL); /* set the default clear color to white */
    EVE_cmd_dl_burst(DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG); /* clear the screen - this and the previous prevent artifacts between lists, Attributes are the color, stencil and tag buffers */
    EVE_cmd_setbitmap(0x800000|128, EVE_COMPRESSED_RGBA_ASTC_4x4_KHR, 480, 272);
    EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
    EVE_cmd_dl_burst(VERTEX2F(0, 0));
    EVE_cmd_dl_burst(DL_END);
    EVE_cmd_dl_burst(DL_DISPLAY); /* instruct the graphics processor to show the list */
    EVE_cmd_dl_burst(CMD_SWAP); /* make this list active */
    EVE_end_cmd_burst(); /* stop writing to the cmd-fifo, the cmd-FIFO will be executed automatically after this or when DMA is done */
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Screen Editor V4.0.0 not smooth image conveter
« Reply #13 on: April 06, 2021, 08:05:45 AM »

Hi BRT Community,
Do you have any chance to follow up with the bug for the ESE?
I have tested every widgets features in the ESE 4.0 and they are all seem got down grade to 8-bit.

I also looking for the information or the tutorial how to draw the partial circle to show the temperature, the progress of the task, the humidity etc... but I couldn't find any tutorial how to draw the partial circle.  The widgets offer the gauge but it is a complete circle and I would like to draw the interface at the same as this example link in the CES 2018 Smart Greenhouse Demonstration from Bridgetek.  Can you please help to point me to the information?
https://www.youtube.com/watch?v=0DXu6LGbvnU

For any one new with EVE BT81x, if you want the details examples please go to the app notes
https://brtchip.com/application-notes/#toggle-id-1
Even though these are for FT800 but they are very similar function for BT81x.  I learn a lot from these app notes.
Logged