33
LEDTS LED and Touch-Sense XMCmicrocontrollers September 2016

LEDTS LED and Touch-Sense - Infineon

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LEDTS LED and Touch-Sense - Infineon

LEDTSLED and Touch-SenseXMC™ microcontrollersSeptember 2016

Page 2: LEDTS LED and Touch-Sense - Infineon

Agenda

Functions enabling via hardware

Configurable LED brightness

Pad scheme

Flexible measurement time on touch pads

Extended frames

Multiple kernels synchronization

1

2

3

4

5

6

Copyright © Infineon Technologies AG 2016. All rights reserved. 2

Page 3: LEDTS LED and Touch-Sense - Infineon

Agenda

Functions enabling via hardware

Configurable LED brightness

Pad scheme

Flexible measurement time on touch pads

Extended frames

Multiple kernels synchronization

1

2

3

4

5

6

Copyright © Infineon Technologies AG 2016. All rights reserved. 3

Page 4: LEDTS LED and Touch-Sense - Infineon

LEDTSLED and Touch-Sense

Highlights

The LEDTS is especially designed toenable driving of LEDs (up to 64 LEDsin a LED matrix) and control capacitivetouch pads (up to 8 pads per kernel) atthe same time. The LEDTS controls theLEDs and touch pads in a time-multiplexed manner, thus allowingthem to share pins.

Customer benefitsKey feature

› Drive more LEDs with limited pins

› No additional hardware needed togenerate oscillations

› The number of pins needed for suchapplications is minimized

› LEDs are driven in a LED matrix

› Capacitive touch sensing viarelaxation oscillator topology

› LEDs and touch pads can sharepins

Copyright © Infineon Technologies AG 2016. All rights reserved.

LEDTS

Columncontrol

Linecontrol

Touch-Sensecontrol

Interruptcontrol

LEDsand/ortouchpads

MCLK

DAVE™ App

ISR

4

Page 5: LEDTS LED and Touch-Sense - Infineon

LEDTSLEDs are driven in a LED matrix (1/2)

› A LED matrix consists of many LEDs

arranged in lines and columns

› The columns are activated one after

another

› The line signals are automatically

synchronized to the column

activation

› Saves cost:

– Maximizes the number of LEDs

that can be driven with limited

number of pins

– Up to 64 LEDs without touch

pads, 56 LEDs with touch pads

› Flexible:

– the LEDs can be arranged in

various layouts

Copyright © Infineon Technologies AG 2016. All rights reserved.

Linecontrol

Columncontrol

COL ACOL 0COL 1COL 2COL 3COL 4COL 5COL 6

LINE 0LINE 1LINE 2LINE 3LINE 4LINE 5LINE 6LINE 7

Interruptcontrol

DAVE™ App

ISR

5

Page 6: LEDTS LED and Touch-Sense - Infineon

LEDTSLEDs are driven in an LED matrix (2/2)

› Time slice

– Smallest time period used inLEDTS

– Only one LED column can beactive in a time slice

› COMPARE value (CMP_LDx bitfield)

– Column active time within atime slice

– Determines brightness level

– 0xFF – brightest, 0x00 - off

› Time frame

– Time taken for all columns tohave been activated in around

– = Time slice * no. of LEDcolumns (with no touch pads)

Copyright © Infineon Technologies AG 2016. All rights reserved.

2 1 0 A

COL 2

COL 1

COL 0

COL A

frameslice

LINE0

LINE1

LINE2

LEDTS timer

CMP_LDx

Time slice

LEDs offLEDs on

6

Page 7: LEDTS LED and Touch-Sense - Infineon

LEDTSCapacitive touch via relaxation oscillator (1/2)

› What is capacitive touch sensing?

– Touch pad controller regularlymeasures the capacitance of touchpads

– When the pads are touched, theircapacitance increases

– Touch by a finger forms a parallelcapacitance (increase in overallcapacitance)

– Parallel-plate capacitor model ofthe extra capacitance: C = ε0εr *(A/d)

› Benefits:

– Flexible design

– Can have protective overlay

– No wear and tear

Copyright © Infineon Technologies AG 2016. All rights reserved.

dCapacitorplates

Dielectric

A

e0 = permittivity of free spaceer = relative permittivity of dielectric materialA = area of the plates (~ finger touch area)d = distance between plates (~ cover thickness)

Overlay r

GND Touch button

LED

Cr

Cp

PCB

7

Page 8: LEDTS LED and Touch-Sense - Infineon

LEDTSCapacitive touch via relaxation oscillator (2/2)

› What is the relaxation oscillator topology?

– A simple circuit generates oscillations on the sensor pad

– The number of oscillations is monitored in an adjustable time window (called theoscillation window)

– The output frequency depends on the pad capacitance

– The higher the capacitance the lower the frequency and the lower the number of pulses -> if the pad is touched, the number of pulses becomes lower

› Benefits:

– HW needed for charging and discharging is already available in the pad

– No need for extra HW to be designed

Copyright © Infineon Technologies AG 2016. All rights reserved.

input

threshold

pad turn

enable

pulse

count

threshold

Vdd

fsys

fout

sensorpad S

1 2 3 4 5

8

Page 9: LEDTS LED and Touch-Sense - Infineon

LEDTSLEDs and touch pads can share pins (1/2)

› LEDs and touch pads can co-exist and share pins

› The LEDTS drives LEDs and controls touch pads in a time-multiplexed manner

› Benefit:

– The number of pins needed to drive multiple LEDs and touch pads can beminimized = cost saved

Copyright © Infineon Technologies AG 2016. All rights reserved.

2 line pins sharedbetween LEDs andtouch pads

Only 7 pins for 12LEDs and 2 touchpads

Line control

Columncontrol

Touch sensecontrol

Touchpads

9

Page 10: LEDTS LED and Touch-Sense - Infineon

LEDTSLEDs and touch pads can share pins (2/2)

› Time-multiplexing

– At any one time, only 1 LED column or the touch-sensefunction is active

– Touch pads are active during a touch-sense time block

– Only 1 touch pad is active in any touch-sense time block

– Touch pads are activated and serviced in a round-robinmanner

› Auto scan time period

– When all touch padshave been serviced

– = time frame * no. oftouch pads

Copyright © Infineon Technologies AG 2016. All rights reserved.

3 2 1 0

COL 3

COL 2

COL 1

COL 0

frameslice

LINE0

LINE1

LINE2

A 3 2 1 0 A

pad oscenable

Auto scan timeperiod

10

Page 11: LEDTS LED and Touch-Sense - Infineon

LEDTSSystem integration

› Target applications

– Human machine interface

– Touch sense

LEDTS is interconnected with severalmodules in the MCU system.

CCU4 – Input signal to CCU4 module(Not on XMC™4x00).

NVIC – To generate interrupt.

VADC – Input signal to VADC module.

PORTS - Pin oscillation control unit isintegrated with the standardPORTS pad. Eliminates the needfor additional hardware circuitry togenerate oscillations.

XMC™4100

● ● ●XMC™4200 XMC™4400 XMC™4500 XMC™4700

Copyright © Infineon Technologies AG 2016. All rights reserved.

XMC™1100

●XMC™1200 XMC™1300

LEDTS

VADC

PORTS

NVIC

CCU4

TSINEXTENDED

COLLINE

SR

FN

BGREQGTJGxREQGTJ

IN3L

11

Page 12: LEDTS LED and Touch-Sense - Infineon

Application exampleIR remote control

The IR remote control features acombination of capacitive touch control andIR communication. It comprises of two parts– the IR receiver and transceiver. User inputis captured and processed by the LEDTS.Infrared transmission and reception isrealized via the standard RC-5 protocol.

In Human-Machine Interface (HMI)applications such as the IR remote control, theLEDTS gives flexibility and a high-level ofcustomization to the design. The LEDTS too,with the use of capacitive touch technology,enables the detection of user input throughenclosure materials. The behavior of the touchinputs can be simply adjusted throughsoftware parameters, independent ofmechanical constraints.

On the IR transceiver, the LEDTS controls andprocesses the touch signals for two buttonsand a touch wheel, using only 5 pins of theXMC™xx00. These touch inputs are designedon a flexible PCB which is glued directly ontothe underside of the upper part of the remotecontrol housing.

On the IR receiver, the LEDTS drives the LEDsthat serve as indicators for the correspondingtouches on the IR transceiver.

Overview

In brief

Copyright © Infineon Technologies AG 2016. All rights reserved.

XMC™1x00

IR

LEDUSB

USB

UART

XMC™1x00IRRx

TXconnect

IR receiver with USB docking station

IR transceiver withtouch control

12

Page 13: LEDTS LED and Touch-Sense - Infineon

LEDTSFunctions enabling via hardware

› The LEDTS drives LEDs andcontrols touch pads in a time-multiplexed manner

› Taken care by hardware:

– Column enabling – whichcolumn is to be active now?

– Function enabling – LED ortouch-sensing is to be activenow?

– Touch pad enabling – which padto service now?

› Minimizes the amount of work tobe handled by software, such as:

– LED line pattern

– LED brightness level

– Touch-sense signal processing

› Even all these software work willbe taken care by the DAVETM App

Copyright © Infineon Technologies AG 2016. All rights reserved.

LEDTS

Line control

Column control

Touch-Sensecontrol

Interruptcontrol

DAVE™ App

ISR

MCLK

Touchpads

LEDs

13

Page 14: LEDTS LED and Touch-Sense - Infineon

Agenda

Functions enabling via hardware

Configurable LED brightness

Pad scheme

Flexible measurement time on touch pads

Extended frames

Multiple kernels synchronization

1

2

3

4

5

6

Copyright © Infineon Technologies AG 2016. All rights reserved. 14

Page 15: LEDTS LED and Touch-Sense - Infineon

LEDTSConfigurable LED brightness (1/3)

› Application may requiredifferent brightness level forLEDs connected to samemicrocontroller

› LEDTS allows customizedbrightness level

– On a column level

– LEDs on same column havesame brightness

– On an individual LED level

– Using some software tricks

Copyright © Infineon Technologies AG 2016. All rights reserved. 15

Page 16: LEDTS LED and Touch-Sense - Infineon

LEDTSConfigurable LED brightness (2/3) – column

› The brightness level of the LEDs in a particular column depends onthe time period within the column time slice, during which the LEDsare turned ON

› This “LED ON” time period can be adjusted via the respectiveCMP_LDx register bit fields

Copyright © Infineon Technologies AG 2016. All rights reserved. 16

Page 17: LEDTS LED and Touch-Sense - Infineon

LEDTSConfigurable LED brightness (3/3) - individual

› LEDs connected to the same column pin can have different brightness levels as well

› How? In every time slice, only 1 LED is switched on with its desired brightness level

Copyright © Infineon Technologies AG 2016. All rights reserved. 17

Page 18: LEDTS LED and Touch-Sense - Infineon

Agenda

Functions enabling via hardware

Configurable LED brightness

Pad scheme

Flexible measurement time on touch pads

Extended frames

Multiple kernels synchronization

1

2

3

4

5

6

Copyright © Infineon Technologies AG 2016. All rights reserved. 18

Page 19: LEDTS LED and Touch-Sense - Infineon

LEDTSPad scheme (1/4)

› Pad scheme: Pad configuration during charging and discharging of pad oscillators

› 2 schemes:

– Scheme A: Slow charge – fast discharge (more in later slide) – on XMC™4x00,XMC™1200

– Scheme B: Slow charge – slow discharge (more in later slide) – only on XMC™1200

› Offer a variation for pad oscillation behavior

› Coupled with pad hysteresis configuration

› More options to find better match for user application

Copyright © Infineon Technologies AG 2016. All rights reserved. 19

Page 20: LEDTS LED and Touch-Sense - Infineon

LEDTS: Pad Scheme A (2/4)(available on XMC™4x00, XMC™1200)

› Scheme A

– Pn_HWSEL = 01B

– Standard hysteresis:Pn_PHx=0XXB

› Options available:

– Large hysteresis: Pn_PHx=1XXB

– External pull-up (see next slide)

– Pin-low-level active extension(see next slide)

Copyright © Infineon Technologies AG 2016. All rights reserved.

Input highthreshold

Pinoscillation

Input lowthreshold

Sensorpad

Standard PORTS pad

TSIN[x]

Hysteresis control

Output low, open-drain enabled

during discharging

Pinoscillation

Largehysteresis

Input highthreshold

Input lowthreshold

20

Page 21: LEDTS LED and Touch-Sense - Infineon

LEDTS: Pad scheme A options (3/4)(available on XMC™4x00, XMC™1200)

› External pull-up

– Flexibility to adjust pinoscillation rate

› Pin-low-level active extension

– Option to delay the start ofcharging due to slowerdischarge e.g. series resistorbetween pin and touch pad

Copyright © Infineon Technologies AG 2016. All rights reserved.

Sensor pad

Standard PORTS pad

TSIN[x]

Hysteresis controlEnable externalpull-upCOLA

Input high

threshold

Pinoscillation

Input low

threshold

Pin oscillation rate

depends on resistorvalue

External pull-upactivated during

charging

Sensorpad

Standard PORTS pad

TSIN[x]

Hysteresis control

Active-

extend

Enable pin-low-levelextension

Input high

threshold

Pinoscillation

Input low

threshold

1 clock

(default)

4, 8 or 16

clocks

Extension enabled

Extension disabled

Pin-low-levelactive extensionenabled during

discharging

21

Page 22: LEDTS LED and Touch-Sense - Infineon

LEDTS: Pad scheme B (4/4)(available only on XMC™1200)

› Scheme B

– Pn_HWSEL = 10B

– Large hysteresis:Pn_PHx=1XXB

› Options available:

– Standard hysteresis:Pn_PHx=0XXB

Copyright © Infineon Technologies AG 2016. All rights reserved.

Input high

threshold

Pinoscillation

Input low

threshold

Sensor pad

Standard PORTS pad

TSIN[x]

Hysteresis control

Internal pull-upenabled during

discharging

Input highthreshold

Pinoscillation

Input low

threshold

Standardhysteresis

22

Page 23: LEDTS LED and Touch-Sense - Infineon

Agenda

Functions enabling via hardware

Configurable LED brightness

Pad scheme

Flexible measurement time on touch pads

Extended frames

Multiple kernels synchronization

1

2

3

4

5

6

Copyright © Infineon Technologies AG 2016. All rights reserved. 23

Page 24: LEDTS LED and Touch-Sense - Infineon

LEDTSFlexible measurement time on touch pads

› Touch inputs used inapplications may havedifferent sensitivity due todesign factors e.g. tracelength, parasitic capacitanceetc.

› As such, LEDTS enablesmeasurement time to becustomized for individual pads

– Oscillation window size –touch pad active period andmeasurement is made

– Customization via respectiveCMP_TSx bit fields

› Achieve consistentperformance across all touchinputs

Copyright © Infineon Technologies AG 2016. All rights reserved.

3 2 1 0

COL3

COL2

COL1

COL0

FrameSlice

LINE0

LINE1

LINE2

A 3 2 1 0 A

pad osc

enable

Autoscan time period

LEDTS timer

0xFF

0

CMP_TSx

Time slice

Oscillation window

Touchpad activeTouchpad

inactive

24

Page 25: LEDTS LED and Touch-Sense - Infineon

Agenda

Functions enabling via hardware

Configurable LED brightness

Pad scheme

Flexible measurement time on touch pads

Extended frames

Multiple kernels synchronization

1

2

3

4

5

6

Copyright © Infineon Technologies AG 2016. All rights reserved. 25

Page 26: LEDTS LED and Touch-Sense - Infineon

LEDTSExtended frames

› Application problem: Low resolution for no. of oscillation counts

– Hard to distinguish a touch

– More susceptible to noise

› Solution: Accumulate the no. of oscillation counts over a few time frames

– A touch pad is serviced for a no. of consecutive time frames (defined byACCCNT bit field)

› Advantage: can be done by hardware, eases software

Copyright © Infineon Technologies AG 2016. All rights reserved. 26

Page 27: LEDTS LED and Touch-Sense - Infineon

Agenda

Functions enabling via hardware

Configurable LED brightness

Pad scheme

Flexible measurement time on touch pads

Extended frames

Multiple kernels synchronization

1

2

3

4

5

6

Copyright © Infineon Technologies AG 2016. All rights reserved. 27

Page 28: LEDTS LED and Touch-Sense - Infineon

LEDTS: Multiple kernels synchronization (1/2)(only on XMC™1200)

› 2 LEDTS kernels in XMC™1200

› Drive more LEDs and control more touch inputs

› Options for HW synchronization:

– Start of LEDTS counters

– Clock frequency determined by kernel 0’s clock pre-scaler

– Kernel 1 will take clock from kernel 0

– Auto scan time period synchronization (next slide)

Copyright © Infineon Technologies AG 2016. All rights reserved.

MCLK

Kernel1

CLK_PS

CMTR ENSYNC

Kernel0

CLK_PS

CMTR ENSYNC

Auto scantime period

LEDTS0_mclk

LEDTS 0 _ syncstart

LEDTS0_master_clk

LEDTS0_master_timeperiod

LEDTS0_timeperiod_sync

LEDTS 1_mclk

LEDTS1_syncstart

LEDTS-counter

Auto scantime period

LEDTS-counter

LEDTS1_master_clk

LEDTS1_master_timeperiod

LEDTS1_timeperiod_sync

28

Page 29: LEDTS LED and Touch-Sense - Infineon

LEDTS: Multiple kernels synchronization (2/2)Auto scan (only on XMC™1200)

› Auto scan time periodsynchronization

– When kernel 1 reaches its autoscan time period, its LEDTS-counter clock will be gated

– When kernel 0 reaches its autoscan time period, gating onkernel 1’s LEDTS-counter clockis removed

› Conditions:

– Touch-sense function isenabled on all kernels

– HW pad turn control on allkernels

– Kernel 0 is enabled and haslongest auto scan time period

– Start of LEDTS counterssynchronization is enabled

Copyright © Infineon Technologies AG 2016. All rights reserved. 29

Page 30: LEDTS LED and Touch-Sense - Infineon

General information

› For latest updates, please refer to:

http://www.infineon.com/xmc1000

http://www.infineon.com/xmc4000

› For support:

http://www.infineonforums.com/forums/8-XMC-Forum

Copyright © Infineon Technologies AG 2016. All rights reserved. 30

Page 31: LEDTS LED and Touch-Sense - Infineon

– Product Briefs

– Selection Guides

– Application Brochures

– Presentations

– Press Releases, Ads

– Application Notes

– Technical Articles

– Simulation Models

– Datasheets, MCDS Files

– PCB Design Data

– Technical Videos

– Product Information

Videos

– Forums

– Product Support

Support material

Collaterals and

Brochures

Technical Material

Videos

Contact

– www.infineon.com/XMC

– www.infineon.com/XMC

– Kits and Boards

– DAVETM

– Software and Tool Ecosystem

– Infineon Media Center

– XMC Mediathek

– Infineon Forums

– Technical Assistance Center (TAC)

Copyright © Infineon Technologies AG 2016. All rights reserved. 31

Page 32: LEDTS LED and Touch-Sense - Infineon

The information given in this training materials is given as a hint forthe implementation of the Infineon Technologies component only andshall not be regarded as any description or warranty of a certainfunctionality, condition or quality of the Infineon Technologiescomponent.

Infineon Technologies hereby disclaims any and all warranties andliabilities of any kind (including without limitation warranties of non-infringement of intellectual property rights of any third party) withrespect to any and all information given in this training material.

Disclaimer

Page 33: LEDTS LED and Touch-Sense - Infineon