EasyManua.ls Logo

Allwinner A20 - Page 205

Allwinner A20
812 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
A20 User Manual (Revision 1.2) Copyright © 2013 Allwinner Technology Co., Ltd. All Rights Reserved. Page 205 / 812
AVCC
R
IRQ
Y+
R
TOUCH
Y-
X+
X-
ADC
Example of Pen touch Interrupt via Pen Down IRQ
MEDIAN AND AVERAGING FILTER
As explained in the Touch Screen Principles section, touch screens are composed of two resistive
layers, normally placed over an LCD screen. Because these layers are in close proximity to the LCD
screen, noise can be coupled from the screen onto these resistive layers, causing errors in the touch
screen positional measurements. The controller contain a filtering block to process the data and
discard the spurious noise before sending the information to the host. The purpose of this block is not
only the suppression of noise; the on-chip filtering also greatly reduces the host processing loading.
The processing function consists of two filters that are applied to the converted results: the median
filter and the averaging filter. The median filter suppresses the isolated out-of-range noise and sets
the number of measurements to be taken. These measurements are arranged in a temporary array,
where the first value is the smallest measurement and the last value is the largest measurement.
Then the averaging filter size determines the number of values to average. There are four choises
which is configured by TP_CTRL3 register (bit 1 and bit 0) to filtrate the ADC sampling data. It is
showed in following table.
Median and averaging Filter Size (TP_CTRL3)
bit1
bit0
Averaging Filter Size
Median Filter Size
0
0
2
4
0
1
3
5
1
0
4
8
1
1
8
16
In this example, the TP_CTRL3 register bit 1 and bit 0 is configured as 2’b11. So the median filter has

Table of Contents