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

Main Menu

Capacitive touch screen calibration

Started by T.Pierret, June 10, 2020, 04:22:24 PM

Previous topic - Next topic

T.Pierret

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.

BRT Community

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

avanti

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?

T.Pierret

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.

BRT Community

Hello,

Quote from: avanti on June 11, 2020, 02:41:41 PM
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.

Quote from: T.Pierret on June 12, 2020, 07:44:16 AM

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

Rudolph

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.

T.Pierret

Hi,

Thanks for those answers.

QuoteIf 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

BRT Community

Hello,

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

Best Regards,
BRT Community

BRT Community

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

T.Pierret


Matrix Orbital

Quote from: T.Pierret on June 15, 2020, 09:54:21 AM
Hi,

Thanks for those answers.

QuoteIf 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!
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

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

BRT Community

Hello,

Theres a slightly better definition of the operation of the touch registers available in the BT81x programmers guide:
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

T.Pierret

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

BRT Community

Hello,

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

Best Regards,
BRT Community