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

Pages: 1 ... 8 9 [10]
 91 
 on: February 19, 2024, 08:12:11 PM 
Started by Rad - Last post by KarolBob
Hi there.
I've been recently testing the method with interrupt handling from the touch panel. Thanks to this, it's possible to practically not send anything to FT/BT81x for most of the time. When an interrupt occurs, only then do I read the TAG. Here's the interrupt configuration:
Code: [Select]
void EVE_INT_config(void)
{
    EVE_memWrite8(REG_INT_EN,1);                // IRQ on
    EVE_memWrite8(REG_INT_MASK,EVE_INT_TAG);    // EVE_INT_TOUCH|
    EVE_memRead8(REG_INT_FLAGS);                // clear by read flag
}

Then, in loop functions:
Code: [Select]
if(is_set(FLAGS,_f_tp_irq))
        {
            CurrTag = EVE_memRead8(REG_TOUCH_TAG);
            RESET(FLAGS,_f_tp_irq);
... // the rest of the code
            // refresh the screen by set timDisp to 0
            timDisp = 0;
            EVE_memRead8(REG_INT_FLAGS); // skasuj flagi
            timer_screensaver = time_screensaver; // przeładuj timer wygaszacza ekranu
        }
        // prepare a new display list:
        if(!timDisp)
        {
            timDisp = 50;     
            // start new 'display list'
            start_new_screen();
...// etc
            finish_new_screen();
        }
Also IRQ from pin change:
Code: [Select]
ISR(INT7_vect)
{
    SET(FLAGS,_f_tp_irq);
}

 92 
 on: February 19, 2024, 07:59:44 PM 
Started by KarolBob - Last post by KarolBob
Thank you for your response to my questions.
I note you mention an older screen does not present this issue, are both of these screens the same RVT101HVBNWC00-B model?

It turned out that the issue also occurs on the older/newer RVT101HVBNWC00-B panel. Currently, I am working on the project, and every time I power it on and restore the saved calibration matrix from EEPROM, I still have to perform calibration. I trigger the calibration with a button on the PCB.

On the occasion of the issue occurring does a re-run of the calibration routine result in accurate matrix values, or for example do you need to power cycle the board?
Running the calibration function solves the problem with the touchscreen panel. It seems like I mostly have to do this almost every time I power it on.

Have you noted any issues around the CTP connector to the displays main PCB?
I haven't noticed any problems with the CTP connector. When I used 7" panels with CTP before, everything worked fine. I'll add that I have the screen rotated 180 degrees, but that shouldn't be an issue.

PS. Perhaps the problem lies elsewhere, for example, I might be experiencing buffer overflow - I need to carefully check the source code again.
Regards,
Karol

 93 
 on: February 19, 2024, 03:48:01 PM 
Started by KarolBob - Last post by BRT Community
Hello,

Thank you for your post.

I note you mention an older screen does not present this issue, are both of these screens the same RVT101HVBNWC00-B model?

On the occasion of the issue occurring does a re-run of the calibration routine result in accurate matrix values, or for example do you need to power cycle the board?

Have you noted any issues around the CTP connector to the displays main PCB?

Best Regards,
BRT Community

 94 
 on: February 16, 2024, 12:30:17 PM 
Started by KarolBob - Last post by KarolBob
Hi there.  :)
This is my first post on this forum, so I would like to say hello to everyone. Also, I want to express my gratitude to Rudolph for his amazing work. Big thanks for that!
I'm using RVT101HVBNWC00-B with BT817Q:
Sometimes i have strange calibration matrix value, only with 0 or 65535 values:
Quote
TransMatrix1 = 65536;
TransMatrix2 = 0;
TransMatrix3 = 0;
TransMatrix4 = 0;
TransMatrix5 = 65536;
TransMatrix6 = 0;
Sometimes it works well, other times it doesn't. This is my source code:
Code: [Select]
void restore_calibrate_matrix(void)
{
uint32_t TransMatrix[6];
eeprom_busy_wait();
TransMatrix[0] = eeprom_read_dword(&TransMatrix1);
// check if eeprom is emptyi 0xFFFFFFFF = 2^32 = 4294967295
if(TransMatrix[0] == 0xFFFFFFFF || is_clear(CALIBRATE_PIN,CALIBRATE))
{
        //
        Touch_Panel_Calibrate();
}
// jesli zapisane bylo cos innego niz fabryczna wartosc to pobierz reszte
else
{
char buff[20];
uart0_puts_P(PSTR("\rTransMatrix[0] = "));
uart0_puts(ultoa(TransMatrix[0],buff,10));
eeprom_busy_wait();
TransMatrix[1] = eeprom_read_dword(&TransMatrix2);
eeprom_busy_wait();
TransMatrix[2] = eeprom_read_dword(&TransMatrix3);
eeprom_busy_wait();
TransMatrix[3] = eeprom_read_dword(&TransMatrix4);
eeprom_busy_wait();
TransMatrix[4] = eeprom_read_dword(&TransMatrix5);
eeprom_busy_wait();
TransMatrix[5] = eeprom_read_dword(&TransMatrix6);
eeprom_busy_wait();
EVE_memWrite32(REG_TOUCH_TRANSFORM_A, TransMatrix[0]);
EVE_memWrite32(REG_TOUCH_TRANSFORM_B, TransMatrix[1]);
EVE_memWrite32(REG_TOUCH_TRANSFORM_C, TransMatrix[2]);
EVE_memWrite32(REG_TOUCH_TRANSFORM_D, TransMatrix[3]);
EVE_memWrite32(REG_TOUCH_TRANSFORM_E, TransMatrix[4]);
EVE_memWrite32(REG_TOUCH_TRANSFORM_F, TransMatrix[5]);
//disp_transMatrix(TransMatrix);
}
}
//
void Touch_Panel_Calibrate(void) 
{
uint32_t TransMatrix[6];
EVE_cmd_dl(CMD_DLSTART); // Start the display list
    EVE_cmd_dl(CMD_COLDSTART);
EVE_cmd_dl(DL_CLEAR_RGB | GRAY);
EVE_cmd_dl(DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG); // Clear the screen - this and the previous prevent artifacts between lists
make_bigger_fonts();
    char txt[50];
    strcpy_P(txt,PSTR("Dotknij wskazane\npunkty na ekranie")); // in english "touch the indicated points"
    EVE_cmd_text((EVE_HSIZE/2),(EVE_VSIZE/2), 3, EVE_OPT_CENTER, txt);
EVE_cmd_calibrate();
EVE_cmd_dl(DL_DISPLAY); // Instruct the graphics processor to show the list
EVE_cmd_dl(CMD_SWAP); // Make this list active
while(EVE_busy() == 1);
TransMatrix[0] = EVE_memRead32(REG_TOUCH_TRANSFORM_A);
TransMatrix[1] = EVE_memRead32(REG_TOUCH_TRANSFORM_B);
TransMatrix[2] = EVE_memRead32(REG_TOUCH_TRANSFORM_C);
TransMatrix[3] = EVE_memRead32(REG_TOUCH_TRANSFORM_D);
TransMatrix[4] = EVE_memRead32(REG_TOUCH_TRANSFORM_E);
TransMatrix[5] = EVE_memRead32(REG_TOUCH_TRANSFORM_F);
save_matrix(TransMatrix);
disp_transMatrix(TransMatrix);
    uart0_send_trans_matrix(TransMatrix);
}
//
void save_matrix(uint32_t *TransMatrix)
{
// eeprom write -> update block :))
eeprom_busy_wait();
eeprom_write_dword(&TransMatrix1, TransMatrix[0]);
eeprom_busy_wait();
eeprom_write_dword(&TransMatrix2, TransMatrix[1]);
eeprom_busy_wait();
eeprom_write_dword(&TransMatrix3, TransMatrix[2]);
eeprom_busy_wait();
eeprom_write_dword(&TransMatrix4, TransMatrix[3]);
eeprom_busy_wait();
eeprom_write_dword(&TransMatrix5, TransMatrix[4]);
eeprom_busy_wait();
eeprom_write_dword(&TransMatrix6, TransMatrix[5]);
eeprom_busy_wait();
}
//
void disp_transMatrix(uint32_t *TransMatrix)
{
uint8_t i = 6;
page_start();
    uint16_t y = EVE_VSIZE/2;   // połowa ekranu
    uint8_t dy = 30;            // odstęp pomiedzy wierszami w osi oY
    y = y - (3*dy);             // zaczynam o 3 wiersze wcześniej
for(i=0; i<6; i++)
{
EVE_cmd_number(EVE_HSIZE/2,y,30,EVE_OPT_CENTER,TransMatrix[i]);
        y += dy;
}
    y += dy;
    char txt[50];
    strcpy_P(txt,PSTR("Dotknij ekranu lub nacisnij przycisk aby wyjsc")); // in english: "touch the screen to exit"
    EVE_cmd_text(EVE_HSIZE/2,y,31,EVE_OPT_CENTER,txt);
page_stop();
_delay_ms(500); //while(1){};

    while(0 == EVE_memRead8(REG_TOUCH_TAG) && is_set(CALIBRATE_PIN,CALIBRATE));
//while(is_set(CALIBRATE_PIN,CALIBRATE)){}; // czekam na ponowne nacisniecie przycisku
}
void uart0_send_trans_matrix(uint32_t * TransMatrix)
{
    char buff[16];
    for(uint8_t i=0; i<6; i++)
    {
        //EEMEM uint32_t TransMatrix1 = 33612304;
        uart0_puts_P(PSTR("\rEEMEM uint32_t TransMatrix"));
        uart0_puts(utoa(i+1,buff,10));
        uart0_puts_P(PSTR(" = "));
        uart0_puts(ultoa(TransMatrix[i],buff,10));
        uart0_puts_P(PSTR(";"));
    }
    //uart0_puts_P(PSTR("\r test="));    uart0_puts(ultoa(UINT32_MAX,buff,10));
}
In the main function, I simply call the 'restore_calibrate_matrix' function. This function reads the calibration matrix from EEPROM. If EEPROM is empty (i.e., it has a value of 0xFFFFFFFF), I invoke the screen calibration and then save the new calibration matrix values to EEPROM. However, if EEPROM contains any saved values, it reads the consecutive 'TransMatrix[n]' and then saves them to 'REG_TOUCH_TRANSFORM_n'.

I feel that one panel, the older one, works perfectly fine while the newer one has the problems described above.

Regards
Karol

 95 
 on: February 15, 2024, 03:07:53 PM 
Started by karst.drenth - Last post by karst.drenth
Hi,

For some projects, I need to have the Text property of an ESD_TextBox to be editable ( I need it a.o. for a OS_Keyboard )
I looked in the Keyboard example and saw the use of "cstring" there. As I wanted so be sure that each instance has it's own storage, I checked the generated code.

To my asthonisment, I saw that in the EVE_Header files "cstring" is just a typedef of "const char*" which in turn means, that I will be writing directly in "some" memory where the default value is kept  :o

Is there anybody out there who can wake me up from this bad dream  ;D I am probably missing something, but can't figure out what.

Greets and already thanks for an answer,
Karst


 96 
 on: February 10, 2024, 09:48:08 PM 
Started by Rad - Last post by Rudolph
My code usually checks for touch events every 5ms and that function does three reads now.
Reading REG_CMDB_SPACE to check if EVE is still busy from the display refresh or if there was a co-processor fault.
Reading REG_CMD_DL as a debug measure to get the size of the last generated display-list.
Reading REG_TOUCH_TAG.

I just did an experiment with a Teensy 4.1 under Arduino as this was wired up to the logic analyzer.
The SPI clock is 16MHz.
I moved out the function call to check for touch events that I placed in the loop() function to outside
the code that checks that 5ms passed.
And all that happens is that I can see with the logic analyzer that the SPI is flooded.
The REG_TOUCH_TAG is read every 12µs.

Now I commented out the reading of REG_CMD_DL which means that REG_TOUCH_TAG is read every 8µs.

Ok, I can get away with not reading REG_CMDB_SPACE since I have an internal flag for the DMA transfer of the display update.
And reading REG_TOUCH_TAG does not interfere with the co-processor.
Now the logic-analyzer traces shows reads of REG_TOUCH_TAG about every 3.6µs.

And the EVE3-50G module which has a BT815 and a GT911 is just fine.
No crash and the touch still works fine.

So no, there does not appear to be a limit on how often REG_TOUCH_TAG can be read.
My display update is every 20ms though, so it really does not help to read the register >5400 times in between. :-)

My main loop does this now, 5ms per step:
read read read display read read read display

And there probably would not be a noticeable difference if I changed that to >read / display< with 10ms steps.

Hmm, I wonder now how long touch events actually are, or rather how short these can get.
I went back to reading REG_TOUCH_TAG every 12µs and added a counter that is set to 1 on registering the touch of a button and gets increased as long as the button is touched.
And I can not get this time realiably below 3000.
Right now the number is 1142 which meant I managed to touch the button for only 13ms.
2161 - 28ms
976 - 12ms
2138
3298
4417
3275
3304
2156

Going back to 5ms timeslots I can not get the counter lower than 3.
And not trying to touch as fast as possible I get closer to 20.

So I guess it is ok to assume that the duration of touch events is at least 10ms.

 97 
 on: February 09, 2024, 08:55:59 AM 
Started by Juanj - Last post by BRT Community
Hi,
Yes, nice work and a very interesting project, thanks for sharing and let us know how it is going as you add the new features,
Best Regards,
BRT Community

 98 
 on: February 08, 2024, 06:01:02 PM 
Started by Juanj - Last post by Juanj
Hello, it should work with any hardware that this library covers: https://github.com/RudolphRiedel/FT800-FT813 But I have only tested it on an FT813.

LVGL feature list:

*Text
*Fill( rectangle, circle, border )
*Arc
*Triangle
*Lines
*Images in raw (RGB565, L8, ARGB8888 converted to RGBA4 and RGB565A8 converted to RGB1555).

I am currently working on gradients and images in PNG and JPG formats using the file system.


 99 
 on: February 08, 2024, 04:51:14 PM 
Started by david - Last post by BRT Community
Hi David,

We're just checking with our R&D team and will let you know as soon as possible,

Best Regards, BRT Community

 100 
 on: February 08, 2024, 04:43:39 PM 
Started by sjasz - Last post by BRT Community
Hi,

We'll need to check about that error but yes, the RUNANIM command will block and so could cause a display list not to be shown after the command.

Doing the animation frame by frame is worth trying,

Best Regards, BRT Community

Pages: 1 ... 8 9 [10]