Page 1 of 1

SAMA5D2 resistive touchscreen code?

Posted: Thu Jul 25, 2019 3:57 pm
by TimH
I have a custom board with a SAMA5D27 and an LCD with resistive touchscreen. This is using C code ("bare metal") rather than Linux.

The "softpack" has loads of useful examples and I have the board running, and graphics on the display etc. but there are no code examples for a resistive touchscreen (4 wire).

Before I plough through the datasheet and create my own library for this, does anyone happen to know of any code out there that I could use, either as-is or, at least, as a starting point? I've searched on here and not found anything, but apologies if there is and I've missed it.

Re: SAMA5D2 resistive touchscreen code?

Posted: Thu Jul 25, 2019 10:36 pm
by TimH
Was going to delete, but will leave in case it's useful to others. There are routines in the analog driver section of the softpack (adc.h) that setup the touchscreen and they work well.

Re: SAMA5D2 resistive touchscreen code?

Posted: Fri Jul 26, 2019 12:13 am
by blue_z
Beware that the SAMA5D2 has an ADC peripheral that is different from other SAM SoCs.
You could also look at the Linux driver.

Regards

Re: SAMA5D2 resistive touchscreen code?

Posted: Mon Jul 29, 2019 4:15 pm
by TimH
The Linux driver had some useful information - thanks for the link :)