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] 2

Author Topic: Capacitive touch screen calibration  (Read 21823 times)

T.Pierret

  • Newbie
  • *
  • Posts: 22
    • View Profile
Capacitive touch screen calibration
« on: June 10, 2020, 04:22:24 PM »

Hi,

Am I wrong if I say that the Capacitive Touch Engine does not need a calibration in extended mode ?

Currently, we only own and tested resistive touch screens. The calibration process appears as a big constraint for a "mass" production.

Thanks in advance for any answer.

Regards.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 734
    • View Profile
Re: Capacitive touch screen calibration
« Reply #1 on: June 11, 2020, 12:03:47 PM »

Hello,

It is recommended to run the calibration routine for every display.
When using CMD_CALIBRATE the co-processor engine overlays the touch targets on the
current display list, gathers the calibration input and updates REG_TOUCH_TRANSFORM_A-F.

One option for mass production would be to calibrate one given display and read back the values stored in REG_TOUCH_TRANSFORM_A-F, you can then use these known 'good values' in your production line by writing the values into REG_TOUCH_TRANSFORM_A-F for subsequent displays. This should allow your displays to be approximately calibrated, after which you can provide a calibration routine in your code for your customers to use to re-calibrate the display if desired.

Best Regards,
BRT Community
Logged

avanti

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Capacitive touch screen calibration
« Reply #2 on: June 11, 2020, 02:41:41 PM »

While we are on the topic, there is something I have been confused about:

Are REG_TOUCH_TRANSFORM_A-F stored persistently in the EVE? And, if the chip has non-volatile memory, what else is there that doesn't clear on a power-cycle or reset?
Logged

T.Pierret

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Capacitive touch screen calibration
« Reply #3 on: June 12, 2020, 07:44:16 AM »

Thanks for those info.

That what's we did (reusing the transformation matrix from one calibration), but this solution has some side effects. If the touches at the calibration are not accurate (and they always are in real life), it leads to area on the edges of the screen where one of the provided coordinates becomes 65535 (observed several times). So I figure out that this would also happen if the transformation matrix is arbitrary chosen from one calibration. This means that, in a mass production, some of the screens would be wrongly calibrated. This is not acceptable.

The real solution would be a transformation matrix that is the result of many calibrations. For this, the coordinates of the points that are drawn on the calibration screen should be known. Is it possible to get such info ?

Regards.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 734
    • View Profile
Re: Capacitive touch screen calibration
« Reply #4 on: June 12, 2020, 01:10:56 PM »

Hello,

Are REG_TOUCH_TRANSFORM_A-F stored persistently in the EVE? And, if the chip has non-volatile memory, what else is there that doesn't clear on a power-cycle or reset?

No, REG_TOUCH_TRANSFORM_A-F are not stored persistently in EVE, it is recommended to run the CMD_CALIBRATE command or write known good values to these registers on every start up.


The real solution would be a transformation matrix that is the result of many calibrations. For this, the coordinates of the points that are drawn on the calibration screen should be known. Is it possible to get such info ?

The point positioning varies depending on screen resolution. If you let me know what screen resolution you are using I can query the dev team for information on where the points would be located on the screen.


Best Regards,
BRT Community
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: Capacitive touch screen calibration
« Reply #5 on: June 12, 2020, 03:22:53 PM »

I am storing the calibration values as constants in my code and I have a whole bunch of them in my example code.
Switching between different displays of the same type usually works well enough but I have no experience
on product level amounts of the same type of display.

And yes, the calibration requires some precision.
I am using a special stylus to calibrate my capacitive touch screens.

Regarding the points during calibration, Matrix Orbital added a manual calibration function to their library
that does not use EVEs CMD_CALIBRATE:
https://github.com/MatrixOrbital/EVE2-Library Calibrate_Manual()

I picked that up and adapted if for my library as well:
https://github.com/RudolphRiedel/FT800-FT813/blob/4.x/EVE_commands.c EVE_calibrate_manual()

This is needed for the more exotic displays like EVE3-38 with 480x116 for which EVEs own calibration does not work since the dots are partly displayed off-screen.
So you could even customize the positions of the dots with this function.
Logged

T.Pierret

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Capacitive touch screen calibration
« Reply #6 on: June 15, 2020, 09:54:21 AM »

Hi,

Thanks for those answers.

Quote
If you let me know what screen resolution you are using I can query the dev team for information on where the points would be located on the screen.

We are currently testing the 4.3" screen, with a resolution of 480x272. We will probably migrate to a 7" screen for a resolution of 800x480.

@Rudolph
Thanks for the custom calibration function. This may be helpful if the calibration points of the CMD_CALIBRATE function cannot be known.

Best regards
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 734
    • View Profile
Re: Capacitive touch screen calibration
« Reply #7 on: June 15, 2020, 03:31:53 PM »

Hello,

Thanks, I have pinged the dev team to see if they can provide the point positions.

Best Regards,
BRT Community
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 734
    • View Profile
Re: Capacitive touch screen calibration
« Reply #8 on: June 16, 2020, 12:01:13 PM »

Hello,

the positioning of the three dots is as follows (X,Y) : (10%w,10%h), (90%w,50%h), (50%w, 90%h) w is the width of screen resolution, h is the height of screen resolution.


Best Regards,
BRT Community
Logged

T.Pierret

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Capacitive touch screen calibration
« Reply #9 on: June 16, 2020, 04:15:53 PM »

Many thanks for this  :)
Logged

Matrix Orbital

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Matrix Orbital
Re: Capacitive touch screen calibration
« Reply #10 on: June 16, 2020, 09:46:37 PM »

Hi,

Thanks for those answers.

Quote
If you let me know what screen resolution you are using I can query the dev team for information on where the points would be located on the screen.

We are currently testing the 4.3" screen, with a resolution of 480x272. We will probably migrate to a 7" screen for a resolution of 800x480.

Hello T.Pierret,

Please contact me if we can help you with the hardware.

sales@matrixorbital.ca

Thank you!
Logged
Matrix Orbital
Display Solution Provider

Embedded HDMI TFT's, EVE2, EVE3 & EVE4 TFT's, Serial LCD's, USB, LCD's

www.matrixorbital.com
www.lcdforums.com/forums

T.Pierret

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Capacitive touch screen calibration
« Reply #11 on: June 17, 2020, 08:36:22 AM »

In the domain of this topic, it happened that one of the coordinates provided by the REG_TOUCH_SCREEN_XY register has a value of 65xxx. Is it a negative value ?
The documentation mentions a value within the width/height of the screen.

Regards
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 734
    • View Profile
Re: Capacitive touch screen calibration
« Reply #12 on: June 17, 2020, 03:48:27 PM »

Hello,

Theres a slightly better definition of the operation of the touch registers available in the BT81x programmers guide:
Code: [Select]
The raw touch screen (x, y) values are available in register REG_TOUCH_RAW_XY. The range of
these values is 0-1023. If the touch screen is not being pressed, both registers read 0xFFFF.

These touch values are transformed into screen coordinates using the matrix in registers
REG_TOUCH_TRANSFORM_A-F. The post-transform coordinates are available in register
REG_TOUCH_SCREEN_XY. If the touch screen is not being pressed, both registers read 0x8000
(-32768). The values for REG_TOUCH_TRANSFORM A-F may be computed using an on-screen
calibration process.

This indicates that the values stored in REG_TOUCH_SCREEN_XY represent a twos compliment number (0x8000 = -32768). A return value of 0x65xx for either the x or y value of the register would represent a positive number.

Is this value obtained pre or post screen calibration?

Best Regards,
BRT Community
Logged

T.Pierret

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Capacitive touch screen calibration
« Reply #13 on: June 18, 2020, 09:07:57 AM »

Hi,
Thanks for this.

The mentionned value 65xxx was in decimal format, i.e. 0xF... in the hexadecimal format. This value is directly read from the REG_TOUCH_SCREEN_XY register.
The values have been observed in normal run, while the calibration process (CMD_CALIBRATE) has been executed.

Regards
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 734
    • View Profile
Re: Capacitive touch screen calibration
« Reply #14 on: June 18, 2020, 03:35:19 PM »

Hello,

Just to clarify, are these the values you're seeing whilst running the CMD_Calibrate routine?

Best Regards,
BRT Community
Logged
Pages: [1] 2