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 ... 27 28 [29] 30 31 ... 50
421
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);

}

422
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

423
Hello Mahdu,

Thank you for the details on your configuration.

I cannot see any glaring issues with the configuration of your PIC, but I ill reference the datasheet if you can provide the exact part number you are using.

I note in your SPI config block you have disabled the SPI interface (SPI2CONbits.ON = 0; //Disable SPI 2) but not re-enabled it. I assume you have omitted the line where this is re-enabled as you note a successful loopback test.

Please be aware that the EVE series of graphics controllers support only SPI mode 0, so please utilise this configuration in any subsequent testing.

Your initialization code for EVE looks correct, however its appears that your capture of the MOSI pins behaviour has not attached to this post. Would it be possible to take a logic capture of the MOSI/MISO PD_N and CS# lines  up to can including the "while (EVE_MemRead8(REG_ID) != 0x7C)" during boot?

Best Regards,
BRT Community

424
Hi,

We have a beta code sample below for various MCUs including PIC18F. Here are the links to the document and the code on our FTP site,

BRT_AN_025_FT8xx_Portable_MCU_Library_DRAFT.pdf
BRT_AN_025_Source_BETA.zip

Best Regards, BRT Community

425
Discussion - EVE / Re: CMD_GETPROPS
« on: March 23, 2021, 11:12:12 AM »
Hi,

On the BT815/6 CMD_GETPROPS will return the end of the decompressed image for PNG and will return the start address if using a JPEG. Therefore, your return value will depend on which format your image is in.

For PNG, you can use the address which you have specified in the LOADIMAGE command as the source of your image.

We added the command CMD_GETPTR for BT817/8 which can provide the next available address after the decompressed image data for both PNG and JPEG.

Best Regards, BRT Community

426
Hello,

Can I just clarify your question. Are you asking why there are SPI transactions for the text on the screen when render is called (even when you haven't changed the text to be displayed)? If I am mistaken please elaborate on your issue.

In general, for every screen update issued to EVE the entire display list used to create that screen must be re-written to the IC. For example if you have 5 labels with text, and you change the text to be displayed on one of these 5 labels, when updating the display all 5 labels must be written back into the display list and sent to the EVE IC via SPI.

Best Regards,
BRT Community

427
Hi Marco,

Great to hear that you solved the issue,

Best Regards, BRT Community

428
Hi,

Yes, as you mentioned Rudolph, you can display from flash as ASTC format or you could use a lower quality image format in RAM_G   (for example RGB565 uses two bytes per pixel whereas RGB332 uses only 1 and so is half the size but the color depth wont be as good)

Best Regards, BRT Community

429
Discussion - EVE / Re: Widget limit
« on: March 18, 2021, 12:10:17 PM »
Hello,

Thank you Rudolph for your excellent explanation.

On the point concerning using images to replace buttons, it is also possible to use bitmap cells for your button icons. A brief explanation of bitmap cells can be found in the following:
AN 314 FT800 Advanced Techniques Working with Bitmaps

The normal approach would be to update the display list when a touch is detected and draw a different cell in the bitmap for a given button. For example cell(0) could be button1 un-pressed, and cell(1) could be button1 pressed, etc.

Best Regards,
BRT Community

430
Discussion - EVE / Re: FT812 Quad SPI interface
« on: March 17, 2021, 03:40:11 PM »
Hello Goran,

Glad to hear you have resolved the issue!
Please let us know if you have any further questions.

Best Regards,
BRT Community

431
Discussion - EVE / Re: Widget limit
« on: March 17, 2021, 03:35:42 PM »
Hello,

Thank you for your question.

Can you clarify if you are using the CMD_Button widget to create your buttons? or are you using bitmaps in place of the button widget and tagging these as desired?

There is a limitation in regards to how many buttons can be drawn on the screen with CMD_Button, this relates to the usage of RAM_DL. A quick test on EVE Screen Editor shows that drawing 10 buttons on an otherwise blank screen utilises 28% of RAM_DL. As such it is likely that you are running out of available display list ram when utilising CMD_Button for 30+ buttons.

Best Regards,
BRT Community

432
Discussion - EVE / Re: EVE Asset Builder
« on: March 16, 2021, 04:57:39 PM »
Hello,

Yes that is correct, this procedure can be used to upload the unified.blob file from EAB also.

Depending on whether or not you have erased the flash IC you may need to re-upload the 'unified.blob' file to flash. If you are just trying to update the Flash IC then you can use the CMD_FLASHUPDATE command to achieve this.

Best Regards,
BRT Community

433
Hi Marco,

Could you advise how you handle your MCU counter which you use to write REG_CMD_WRITE after the burst?

Ensure that you have the rollover taken account of when tracking the offset value. EVE will roll over the internal counter at 4095 provided that you are in the middle of a burst. But if you use several bursts to create a single list in sections, you should re-calculate the offset after sending each one. Also, make sure you update the REG_CMD_WRITE before you add 4096-4 bytes of commands (if you update it after your 6 bursts of 244 bytes this should be fine though)

If your display list changes each time, it is also worth checking that your text strings are padded to multiple of 4 and that all commands begin at a 4-byte aligned address within the burst.

If the write pointer is written to a value which is lower than the read pointer, the FIFO will execute all the way round back to the value of REG_CMD_WRITE as it always goes upwards and round, which can cause it to execute unintended commands.

Best Regards, BRT Community

 

434
Discussion - EVE / Re: EVE Asset Builder
« on: March 15, 2021, 02:47:46 PM »
Hello,

To use the flash in FULL state we can download the BLOB and program it by following the steps below:

1)   Unzip the file into your local PC “unified.blob”, which is 4096 bytes only.
2)   Ensure that the EVE board is properly booted up by following the known sequence.
3)   Read the file “unified.blob” and download the whole 4096 bytes into RAM_G ( using EVE_MemWrite)
4)   Send the command cmd_flashupdate(0,  RAM_G, 4096) to RAM_CMD, update the write pointer(REG_CMD_WRITE) properly
5)   Wait till REG_CMD_WRITE is equal to REG_CMD_READ
6)   The flash has been programmed with BLOB file.

With the BLOB file, now users can send the command cmd_flashfast to switch it to “Full” state, users can now access any data in the flash properly.


Best Regards,
BRT Community

435
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

Pages: 1 ... 27 28 [29] 30 31 ... 50