sam9rl touch screen adc controller. arm-based products group 2 resistive touch panel technology is...

15
SAM9RL Touch Screen ADC Controller

Upload: quinn-seccombe

Post on 14-Dec-2015

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

SAM9RL Touch Screen ADC Controller

Page 2: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

2

ARM-Based Products Group

Resistive touch panel technology is the most common, due to its simplicity and low cost characteristics.

It can be found in PDAs, Mini Notebook, Phone, Medical Equipment, Office Automation, Consumer Products, POS, information servers, …

Analogue resistive technology can be separated into 4-wire, 5-wire, 6-wire, 7-wire, and 8-wire according to screen size.

The most popular are 4-wire and 5-wire systems

The SAM9RL64 TSADC is dedicated to 4-wire resistive touch panel ( >15’’ diagonal can be found)

Introduction to Resistive Touch panel

Page 3: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

3

ARM-Based Products Group

Based on a 10-Bit SAR ADC

ADVREF range from 2.6V to VDDANA.

Up to 6 analog lines with 4 touch screen channels (can be used as normal ADC)

4 power switches measuring both axis (X,Y) on resistive touch screen panel

Pen Detect and Pen Loss interrupt

Trigger Mode: External Trigger, Continuous, Periodic, Pen detect

Touch Screen ADC Controller: Block Diagram

6

Page 4: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

4

ARM-Based Products Group

Resistive Touch screen Principle

Polyester Film

Upper Resistive Circuit Layer

Conductive ITO(Transparent Metal Coating)

Lower Resistive Circuit Layer

Insulating Dots

Glass - Substrate

A press causes the Upper Resistive Circuit Layer to contact the Lower Resistive Circuit Layer, producing a circuit switch from the activated area.

Page 5: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

5

ARM-Based Products Group

The 4-Wire Resistive TS Structure

Voltage Measurement

GND = 0V

VDD = 3V

VY+ = 1.5V

X+

X-

Y+Y-

Glass

VDD

GND

PEN contact

The ratio of this measured voltage to the drive voltage applied is equal to the ratio of the x coordinate to the width of the touch screen.

=> x = ½ width of touch screen

X Position

Page 6: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

6

ARM-Based Products Group

To detect the position of a contact:

1. Supply voltage is applied between Xp and Xm

2. Voltage measured on Yp

3. Supply voltage is applied between Yp and Ym

4. Voltage measured on Xp

The position is defined by [ (VYp / VDD) , (VXp / VDD) ]

TSADCC: Position Measurement

Page 7: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

7

ARM-Based Products Group

The switches added to control the power supply are resistive:High voltage reference is not VDDANA Low Voltage reference is not GND

Compensation of switches loss is necessary : [ X , Y

][ (VYp – VXm) / (VXp – VXm) , (VXp – VYm) / (VYp – VYm) ]

TSADCC: Position Measurement

Page 8: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

8

ARM-Based Products Group

At each trigger, the touch screen inputs are converted with the

switches accordingly set and the results are processed and

stored in the corresponding data registers (6 ADC conversions):

(VXp – VXm) TSADCC_CDR0 register

(VYp – VXm) TSADCC_CDR1 register

(VYp – VYm) TSADCC_CDR2 register

(VXp – VYm) TSADCC_CDR3 register

The vertical position X

X = (VYp – VXm) / (VXp – VXm) = CDR1 / CDR0

The horizontal position Y

Y = (VXp – VYm) / (VYp – VYm) = CDR3 / CDR2

TSADCC: Position Measurement

Page 9: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

9

ARM-Based Products Group

No conversion necessary to detect a pen contact

No contact No current flow

When contact occurs, a current is flowing in the touch screen and

a schmitt trigger detects the voltage in the resistor.

TSADCC: Pen Detection

Page 10: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

10

ARM-Based Products Group

TSADCC: Conversion Events in Pen Detect Mode

time

Release

NOCNT

Release

NOCNT

Wrong value

Startup Time

SHTIMTS

Debounce Time

Conversion time

Priority to Conversion vs NOCNT

=> Last conversion may be corrupted

Press

PENCNT EOC

x6

EOC end of conversion

Page 11: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

11

ARM-Based Products Group

TSADCC: Conversion Events in Periodic Trigger Mode

Trigger period

EOC

Release

EOC

time

NOCNT

Press

PENCNT

x6 x6

Trigger period

Startup Time

SHTIMTS

Debounce Time

Conversion time

EOC end of conversion

Page 12: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

12

ARM-Based Products Group

Trigger period

EOC

Press

PENCNT EOC

x6 x6

Release

time

NOCNT can not be detected

To get the NOCNT status:

Ttrigger > 6 x (SHTIMTS + Tconv) + Tdebounce

EOC

x6

TSADCC: Conversion Events in Periodic Trigger Mode

Trigger period Trigger period

Startup Time

SHTIMTS

Debounce Time

Conversion time

EOC end of conversion

Page 13: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

13

ARM-Based Products Group

TSADCC: Touch Screen Connection

X+

X-

Y+Y-

Glass

SAM9RL

AD0 (Right)

AD1 (Left)

AD2 (Top)

AD3 (Bottom)

Page 14: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

SAM9RL Touch Screen ADC Controller

Page 15: SAM9RL Touch Screen ADC Controller. ARM-Based Products Group 2 Resistive touch panel technology is the most common, due to its simplicity and low cost

15

ARM-Based Products Group

6 ADC Conversions requirement

1. If SLEEP is set, wake up the ADC cell and wait for the Startup Time. 2. Close the switches on the inputs XP and XM during the Sample and Hold Time. 3. Convert Channel XM and store the result in TSADCC_CDR1. 4. Close the switches on the inputs XP and XM during the Sample and Hold Time. 5. Convert Channel XP, subtract TSADCC_CDR1 from the result and store the

subtraction result in both TSADCC_CDR0 and TSADCC_LCDR. 6. Close the switches on the inputs XP and XM during the Sample and Hold Time. 7. Convert Channel YP, subtract TSADCC_CDR1 from the result and store the

subtraction result in both TSADCC_CDR1 and TSADCC_LCDR. 8. Close the switches on the inputs YP and YM during the Sample and Hold Time. 9. Convert Channel YM and store the result in TSADCC_CDR3. 10. Close the switches on the inputs YP and YM during the Sample and Hold Time. 11. Convert Channel YP, subtract TSADCC_CDR3 from the result and store the

subtraction result in both TSADCC_CDR2 and TSADCC_LCDR. 12. Close the switches on the inputs YP and YM during the Sample and Hold Time. 13. Convert Channel XP, subtract TSADCC_CDR3 from the result and store the

subtraction result in both TSADCC_CDR3 and TSADCC_LCDR. 14. If Channel 4 to Channel 5 are enabled, convert the Channels and store result in the

corresponding TSADCC_CDRx and TSADCC_LCDR. 15. If SLEEP is set, sleep down the ADC cell.