Change logical dimensions for capacitive touch screen

The capacitive touch screen test in the UTFT library for the Arduino Due has a comment that reads:
// This demo was made for modules with a screen resolution
// of 480x272 pixels.

My 5" screen on an Arduino Due has a resolution of 800x480 so I am trying to adjust the demo.
The screen resolution can be adjusted fairly easily, but it isn't so easy to adjust the touch screen resolution.

A guess is that the 4k+ lines of firmware need to be adjusted to configure the touch screen appropriately for the 800x480 dimensions.

So, how does one go about modifying the firmware to adjust the dimensions? Are there tools somewhere to accomplish that?

Highly unlikely. But there is likely one line containing configuration variables somewhere in that 4k that needs to be changed. It's also possible that the configuration variables for that are not embedded in the firmware, rather in the user program (so look in the demo).

The tool for changing firmware source is a text editor.

You didn't identify either the display or the library.

It is the UTFT library mentioned above. The 5" display and adapter for the Due is:
Display 5 inch TFT Arduino Touch Shield w/SSD1963 for Mega/Due (buydisplay.com)

Also, looked pretty carefully in the demo but didn't see anything that looked like configuration for the touch screen dimensions.

I tried to post the code here, but there is a limit of 12000 characters and it exceeds that so,
Here is a link to the google mydrive file.
https://drive.google.com/file/d/1tcROcNLPLGPy2ZwpR3wN6TGi7bYn5Y1m/view?usp=drive_link

No, you will find that in the .cpp file of the library.

After more research, I found there was another set of firmware data that was configured for an 800x480 screen. I put that fw in the demo program and all is well now.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.