This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

tsc_fourWireModePolling

Overview

The fourWireModePolling example shows how to use TSC driver in 4-wire polling(auto-measure) modes: The touch screen controller needs to co-work with ADC and TSC analogue.

In this example , we make use of the available electrodes on board to show driver usage.

  1. Firstly, before TSC starts work, ADC driver configure ADC_HCx;

  2. Then, we configure TSC module to work in auto-measure mode.

  3. Then, we start screen detection and the TSC automatically measures coordinates after detect a touch;

  4. Then, we judge whether the measure data is valid in main function.

  5. Lastly, if measure data is valid, serial terminal prints x/y-coordinate information.

Running the demo

When running successfully, the log output in terminal shall be similar as below:

TSC fourWireModePolling Example Start! ADC_5HC_DoAutoCalibration() Done. Please touch screen. x = 3741, y = 1068 x = 3741, y = 572 x = 3746, y = 517 x = 3745, y = 518 x = 3751, y = 508 x = 3752, y = 512 x = 3750, y = 507 …

Supported Boards