Software AN3301
14/35 Doc ID 18161 Rev 1
2.1.2 Data acquisition by ACQ command (ACQ_mode “01”)
In this acquisition mode, the STMPE812A merely informs the system host on detecting a
touch. As and when sampling is desired, host issues an “ACQ” command that sets
STMPE812A into a complete sampling cycle. Host may read the data after a period of time,
or poll the interrupt status bit for data availability.
Programming sequence:
1. Initialize touchscreen controller
2. Initialize interrupt (Pen Down mode)
3. Wait for interrupt
4. Upon interrupt, issue ACQ command
5. Poll ACQ bit for data available
6. Upon touch data available, read touch data
Figure 9. Data acquisition by ACQ command
2.1.3 Data acquisition by host read control (ACQ_mode “10”)
The data acquisition by the host read control is the most bandwidth efficient method for
touchscreen interfaces. For 100 Hz sampling with 12-bit X, 12-bit Y, 8-bit Z, only one I
2
C
transaction (5 bytes data read) is required for every 10 ms. Inclusive of overheads, this
translates to approximately 100 bit time.
At 400 kHz I
2
C speed, this is just 2.5% of total bandwidth.
A new sample is taken every time the host reads the previously sampled data. If host reads
the data late, the device simply stays longer in hibernation.
Note: It is necessary to counter check with the data valid bit for each data read.
AM004200V1
Sampling
Touched
No Touch
Initialization
Sampling
Sampling
STMPE812A sens touched interrupt to Host
Host issues ACQ command
Host read touch data when available
Initialization No Touch Touched No Touch
Sampling
Sampling
Sampling
Agenda:
Host polls ACQ bit or ISR for sampling completion