SLAAEU1 August 2025 MSPM0L1306 , MSPM0L1306
The touch detection method is shown in Figure 5-1. When there is human touch, the detection method connects the resistive layers to the top and bottom.
For the X-axis detection, set PA17 to output high and PA15 to output low. Set other pins to be analog functions (Hiz mode). Then, enable the ADC channel at PA16 to do the measurement.
For the Y-axis detection, set PA16 and PA24 to output high and PA25 and PA21 to output low. Set other pins to be analog functions (Hiz mode). Then, enable the ADC channel at PA15 to do the measurement.
After getting the voltage, the ADC does an oversampling to reduce the noise and directly use the ADC result as the coordinate and output to UART communication.