stmpe1218 STMicroelectronics, stmpe1218 Datasheet

no-image

stmpe1218

Manufacturer Part Number
stmpe1218
Description
12-channel Capacitive Touch Key Controller With 4-channel Pwm Controller
Manufacturer
STMicroelectronics
Datasheet
Features
Applications
Table 1.
May 2009
This is preliminary information on a new product now in development or undergoing evaluation. Details are subject to
change without notice.
12 capacitive sensor inputs
12-bit general purpose input/output (GPIO)
Configurable automatic impedance calibration
Operating voltage 2.7 V
4-channel PWM controller with programmable
blinking and fading
8 mA output on GPIO for LED driving
I
8 kV HBM ESD protection
50 fF sensitivity
128 steps capacitance measurement
(6.0 pf dynamic range)
Sleep mode for low power operation
Advanced data filtering (AFS)
Environment tracking calibration (ETC)
Individually adjustable touch variance (TVR)
setting for all channels
Adjustable environmental variance (EVR) for
optimal calibration
Portable media players
Game consoles
Mobile and smart phones
2
C interface (up to 400 kHz)
STMPE1218QTR
Order code
Device summary
5.5 V
12-channel capacitive touch key controller
Doc ID 15757 Rev 2
Package
QFN40
Description
The STMPE1218 is a GPIO 12-channel
capacitive sensor able to interface a main digital
ASIC via the two-line bidirectional bus (I
senses changes in capacitance using a fully
digital architecture, giving fast and accurate
results at very low power consumption.
Environment tracking calibration ensures that
changes in environment will never affect the
correct operation of the capacitive touch keys.
with 4-channel PWM controller
QFN40
STMPE1218
Tape and reel
Packing
Preliminary data
2
C). It
www.st.com
1/57
57

Related parts for stmpe1218

stmpe1218 Summary of contents

Page 1

... PWM controller Description The STMPE1218 is a GPIO 12-channel capacitive sensor able to interface a main digital ASIC via the two-line bidirectional bus (I senses changes in capacitance using a fully digital architecture, giving fast and accurate results at very low power consumption ...

Page 2

... Register map and function description . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 Clock and power manager module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7 Interrupt controller module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8 GPIO controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 9 Capacitive touch module registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 10 BEEP generation module registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 11 Basic PWM controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2/57 Noise filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Data filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 BEEP output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Doc ID 15757 Rev 2 STMPE1218 ...

Page 3

... STMPE1218 11.1 PWM function register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.2 Interrupt on basic PWM controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 12 Maximum rating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 12.1 Recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 13 Electrical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 13.1 Capacitive sensing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 14 Package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 15 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Doc ID 15757 Rev 2 Contents 3/57 ...

Page 4

... Pin configuration and function 1 Pin configuration and function Figure 1. STMPE1218 pin configuration S_IN_2 S_IN_1 S_IN_0 RESET_N ID_1 ID_0 GPIO_5 GPIO_4 GPIO_3 GPIO-2 Table 2. Pin assignments and description Pin number 4/57 STMPE1218 Pin name GPIO_1 General purpose I/O GPIO_0 ...

Page 5

... STMPE1218 Table 2. Pin assignments and description (continued) Pin number Pin name GPIO_8 General purpose I/O GPIO_7 General purpose I/O GPIO_6 General purpose I/O V33 2 5.5 V supply GND Ground S_REF External reference capacitance ...

Page 6

... Pin configuration and function Figure 2. STMPE1218 block diagram ID_0 ID_1 RESET G_INT T_INT SDAT SCLK Figure 3. Application diagram 6/57 Automatic Data filtering unit calibration unit Host interface unit PWM controller Regulator & Clock control unit power control TCLK REG RESET G_INT ...

Page 7

... Power management The STMPE1218 operates in 3 states. Figure 4. STMPE1218 states RESET Hibernate On reset, the STMPE1218 enters the active state immediately. Sleep mode is entered by writing ‘1’ to sleep_en bit in the sys_ctrl register. Pin configuration and function Active (6.5 MHz) Doc ID 15757 Rev 2 Sleep ...

Page 8

... Start/restart/stop The address is selected by the state of 2 pins. The state of the pins is read upon reset and then the pins can be configured for normal operation. The pins have a pull-up or down to set the address. The I registers in the STMPE1218. 2 Table addresses ID_1 ...

Page 9

... The slave device address 10-bit address, where the least significant 3 bits are programmable. These 3 bit values will be loaded in once upon reset and after that, these 3 pins are no longer be needed except during General Call STMPE1218 devices can be connected on a single bus ...

Page 10

... Refer to the memory map table for the address ranges that are auto and non-increment. An example of a non-increment address is Data port for initializing the PWM commands. Doc ID 15757 Rev 2 STMPE1218 ...

Page 11

... STMPE1218 Figure 5. Read and write modes (random and sequential) One byte Read More than one byte Read One byte Write More than one byte Read Reg Device Device Address Address Address Device Reg Device Address Address Address Data Device Reg to be ...

Page 12

... Power schemes 3 Power schemes The STMPE1218 can be powered 5.5 V supply through the internal voltage regulator. V33 powers all the GPIO directly, if LED driving is required on the GPIO, V33 should be at least 3.3 V. Figure 6. Power using the internal regulator 12/57 STMPE1218 V33 VREG V18 ...

Page 13

... Impedance sensor 4.1 Capacitive sensing The STMPE1218 senses a human touch by the additional capacitance introduced to the pad (with respect to ground). This capacitance causes a delay in a clock signal on the sensing pad, and the delay in the sensing pad is compared with a reference clock and the difference is a direct representation of the additional capacitance introduced by the proximity/touch of finger ...

Page 14

... Capacitive sensors 4.2 Capacitance compensation The STMPE1218 is capable to measure capacitance difference between the reference point (Zref) and the individual channels. In the case where the PCB connection between the sensor pads and the device is too long, the Reference delay register is able to shift the reference ...

Page 15

... Mode 3: all touch channels with strength > strength threshold are taken These modes are selected using the feature selector register. The final, filtered data is accessible through the “touch byte” register. 4.3.3 BEEP output The STMPE1218 is able to drive an external piezo buzzer directly with the built-in beep generator. Scenario touch no calibration ...

Page 16

... Register map and function description 5 Register map and function description This section lists and describes the registers of the STMPE1218 device, starting with a register map and then detailed descriptions of register types. Table 6. Register summary map table Address Module registers 0x00 CHIP_ID_0 0x01 ...

Page 17

... STMPE1218 Table 6. Register summary map table (continued) Address Module registers 0x30 - TVR 0x3B 0x40 EVR 0x50 - STRENGTH_THRES 0x5B 0x60 - STRENGTH 0x6B 0x70 - CAL_IMPEDANCE 0x7B 0x80 - IMPEDANCE 0x8B 0x90 TOUCH_BYTE_L 0x91 TOUCH_BYTE_H 0x92 INT_PENDING 0xA0 PWM_OFF_STATE 0xA1 MASTER_EN 0xB0 PWM_0_SET 0xB1 PWM_0_CTRL ...

Page 18

... CHIP_ID_1 Address: 0x01 Type: R Reset: 0x18 Description: 16-bit device identification. 18/57 Bit Type Reset 16 R 0x30 16 R 0x03 8 R/W 0x01 8 R/W 0x00 8 R/W 0x8F Doc ID 15757 Rev 2 STMPE1218 Function Device identification Device identification Revision number System control System control Device identification Device identification ...

Page 19

... STMPE1218 ID_VER Address: 0x02 Type: R/W Reset: 0x01 Description: 8-bit revision number SYS_CTRL_1 RESERVED Address: 0x03 Type: R/W Reset: 0x00 Description: The reset control register enables the system’s control functions. [7:4] Reserved [3] Sleep_en [2] Warm_reset: Write ‘1’ to initiate a warm reset [1] Soft_reset: Write ‘1’ to initiate a soft reset [0] Hibernate: Write ‘ ...

Page 20

... Sensor clock Divider [2:0] 1 000 2 001 4 010 8 011 16 1xx 1 000 2 001 4 010 8 011 16 1xx Doc ID 15757 Rev 2 STMPE1218 System control register PWM_CLOCK TOUCH_CLOCK_DI _DISABLE Active Calibration 12.8 KHz 100 KHz 6.4 KHz 50 KHz 3.2 KHz 25 KHz 1.6 KHz 12.5 KHz 800 Kz 6.25 KHz 400 Hz 3.2 KHz 200 Hz 1.6 KHz 100 Hz ...

Page 21

... STMPE1218 7 Interrupt controller module Two interrupt pins are available in the STMPE1218 device. The G_INT is activated by a number of system events, and cleared by clearing the corresponding interrupt. T_INT is activated by touch detection only and cleared by reading the touch byte. Figure 10. Interrupt controller module diagram ...

Page 22

... This controls both GINT and TINT [1] Type: 0: level trigger 1: edge trigger (pulse width is 200 μS) This controls both GINT and TINT [0] Int_en disable all interrupt 1: to enable all interrupt 22/ POLARITY Doc ID 15757 Rev 2 STMPE1218 Interrupt control register 1 0 TYPE INT_EN ...

Page 23

... STMPE1218 INT_EN RESERVED GPIO Address: 0x09 Type: R/W Reset: 0x00 Description: This register is used to enable the interruption from a system related interrupt source to the host. [7:6] Reserved [5] GPIO: One or more level transition in enabled GPIOs [4] PWM3: Completion of PWM sequence [3] PWM2: Completion of PWM sequence [2] PWM1: ...

Page 24

... One or more level transition in enabled GPIOs [4] PWM3: Completion of PWM sequence [3] PWM2: Completion of PWM sequence [2] PWM1: Completion of PWM sequence [1] PWM0: Completion of PWM sequence [0] Touch: One or more touch is sensed 24/ PWM3 PWM2 PWM1 Doc ID 15757 Rev 2 STMPE1218 Interrupt status register 1 0 PWM0 TOUCH ...

Page 25

... STMPE1218 GPIO_INT_EN_lsb Address: 0x0B Type: R/W Reset: 0x00 Description: The GPIO interrupt register (LSB) is used to enable the interruption from a particular interrupt source to the host. The IEG[x] bits are the interrupt enable mask bits corresponding to the GPIO[7:0] pins. [7:0] IEG[x]: Interrupt enable GPIO mask (where Writing a '1' to the IE[x] bit enables the interruption to the host ...

Page 26

... Interrupt status of the GPIO[x]. Reading the register will clear any bits that has been set to '1' Write: Writing to this register has no effects. 26/57 GPIO interrupt status register LSB ISG[x] GPIO interrupt status register MSB Doc ID 15757 Rev 2 STMPE1218 ISG[x] ...

Page 27

... STMPE1218 8 GPIO controller A total of 12 GPIOs are available in the STMPE1218. The GPIO controller contains the registers that allow the host system to configure each of the pins into either a GPIO, direct output of a TOUCH channel or a PWM output. Unused GPIOs should be configured as outputs to minimize the power consumption. ...

Page 28

... GPIO to function as GPIO, and '1' sets it to Touch Key Direct Output mode. For GPIO 0-3, if GPIO Function is set to Touch Key Direct Output mode and AF bits in the PWM Master Enable Register is enabled, the corresponding GPIO will function as PWM output. Doc ID 15757 Rev 2 STMPE1218 ...

Page 29

... STMPE1218 9 Capacitive touch module registers FEATURE_SELECT RESERVED Address: 0x20 Type: R/W Reset: 0x04 Description: Controls AFS (advanced filtering system and second level filtering feature [7:3] Reserved [2:1] AFS[1:0]: ‘11’: AFS mode 1 (only 1 key) ‘10’: AFS mode 2 (all keys) 11: AFS mode 3 (2 keys) ...

Page 30

... Range: 625 INTEGRATION TIME Address: 0x23 Type: R/W Reset: 0x0F Description: Integration time. [7:0] Integration time in AFS mode Total period of integration = sensor clock period * Integration Time [7:0] Range: 50 μs - 100 mS 30/ CAL_INTERVAL INTEGRATION_TIME[7:0] Doc ID 15757 Rev 2 STMPE1218 Calibration interval 1 0 Integration time 1 0 ...

Page 31

... STMPE1218 CTRL RESERVED Address: 0x25 Type: R/W Reset: 0x00 Description: Control. [7:4] Reserved [3] SENSOR-ACTIVE: This bit must be written ‘1’ for the correct operation of the capacitive sensor. [2] HDC_U: Write '1' to perform unconditional host driven calibration. Cleared to '0' when calibration is completed Only applicable HOLD is '1' [1] HDC_C: Write '1' to perform conditional host driven calibration ...

Page 32

... Writing '1' to this register clears the corresponding interrupt source in INT PENDING register. [7:4] Reserved [3] EOC: End of calibration. This interrupt occurs on both automatic and forced calibration [2] Reserved [1] Reserved [0] Touch: Touch module activity 32/ EOC RESERVED EOC RESERVED Doc ID 15757 Rev 2 STMPE1218 Interrupt mask 1 0 RESERVED TOUCH Interrupt clear 1 0 RESERVED TOUCH ...

Page 33

... STMPE1218 FILTER_PERIOD Address: 0X28 Type: R/W Reset: 0x00 Description: Filter period. [7:0] Filter_count: Additional filter to stabilize touch output in AFS mode. AFS touch output is monitored for Filter Count [7:0] times every integration time. For each time a "touch status" is detected, an internal "Filter Counter" is incremented once. This counter ...

Page 34

... EVR is used to detect "Non-Touch" condition STRENGTH_THRESHOLD Address: 0x50 - 0x5B Type: R/W Reset: 0x01 Description: Strength threshold. [7:0] Strength_threshold: Setting threshold to be used in AFS mode to determine valid touch 34/ TVR TVR STRENGTH_THRESHOLD Doc ID 15757 Rev 2 STMPE1218 Touch variance setting 1 0 Enviromental variance 1 0 Strength threshold 1 0 ...

Page 35

... STMPE1218 STRENGTH 7 6 Address: 0x60 - 0x6B Type: R Reset: 0x00 Description: The number of times where a sense capacitance exceeds the calibrated reference impedance [7:0] Strength: Read-only field Counts the number of times a sensed impedance exceeds calibrated reference impedance over and integration time. Maximum strength equals Integration Time [7:0] ...

Page 36

... RESERVED Address: 0x91 Type: R Reset: 0x00 Description: Touch sensing data output. [7:4] Reserved [3:0] Touch: Reads '1' if the corresponding capacitance sensing channel reads a valid TOUCH 36/ TOUCH Doc ID 15757 Rev 2 STMPE1218 Touch sensing data output Touch sensing data output TOUCH ...

Page 37

... STMPE1218 INT_PENDING 7 6 RESERVED Address: 0x92 Type: R/W Reset: 0x00 Description: Reflects the status of each interrupt source [7:4] Reserved [3] EOC: End of calibration [2] I2A: SLEEP to active transition [1] A21: Active to SLEEP transition [0] Touch: Touch detect EOC Doc ID 15757 Rev 2 Capacitive touch module registers Interrupt pending ...

Page 38

... Reset: 0x00 Description: Beep period [7:0] Beep_period: Period = Beep - Period [7:0] * System clock 2 System clock = 6.5 MHz (typ) Min period = 0.154 Max period = 0.154 38/ RESERVED BEEP_PERIOD [7: *255 = 2.55 S Doc ID 15757 Rev 2 STMPE1218 Beep enable generation 1 0 BEEP_EN Beep period 1 0 ...

Page 39

... STMPE1218 BEEP_FREQUENCY Address: 0xC2 Type: R/W Reset: 0x00 Description: Beep frequency [7:0] Beep_frequency: Frequency of beep = System Clock / (Beep Frequency [7:0] * 64) Min Freq = 6.5 MHz/(255*64) = 398 Hz Max Freq = 102 kHz BEEP generation module registers BEEP_FREQUENCY Doc ID 15757 Rev 2 Beep frequency 1 0 39/57 ...

Page 40

... Basic PWM controller The basic PWM controller allows simpler brightness control and basic blinking patterns. The STMPE1218 is fitted with a 4-channel basic PWM controller. The PWM controllers outputs are connected to the GPIO 0-3. In order to activate the PWM channels, the alternate function bits in the master enable register must be set to '1'. The PWM controllers are capable of generating the following brightness patterns: Figure 11 ...

Page 41

... STMPE1218 “On” period = period 0[1:0] * time unit [2:0] “Off” period = period 1[1:0] * time unit [2:0] Duty cycle during “on” period = brightness [7:4] Number of cycles = repetition [2:0] Ramp up rate is programmable. Figure 13. Fixed brightness output Duty cycle “On” period = period 0[1:0] * time unit [3:0] Off period = 0 Duty cycle during “on” period = brightness [7:4] ...

Page 42

... PWM_0 control PWM_0 ramp rate PWM_1 setup PWM_1 control PWM_1 ramp rate PWM_2 setup PWM_2 control PWM_2 ramp rate PWM_3 setup PWM_3 control PWM_3 ramp rate Doc ID 15757 Rev 2 STMPE1218 Auto-increment (during sequential R/W) Yes Yes Yes Yes Yes Yes Yes Yes Yes ...

Page 43

... STMPE1218 PWM_OFF_STATE 7 6 RESERVED Address: 0xA0 Type: R/W Reset: 0x00 Description: The PWM group control register determines the output state for the GPIO that is configured as PWM, when the PWM channels are in OFF state. [7:4] Reserved [3:0] OUT3:0: Default is '0' '1' - PWM channel outputs '1' when disabled ...

Page 44

... Doc ID 15757 Rev 2 STMPE1218 Ramp rate register n=0 RAMP_UP ...

Page 45

... STMPE1218 PWM_n_SET 7 6 BRIGHTNESS Address: 0xB0, 0xB4, 0xB8, 0xBC Type: R/W Reset: 0x00 Description: The PWM setup registers sets up the brigtheness and period of the PWM controller. [7:4] Brightness: This defines the duty cycle during the ON period of the PWM channel output which in turn determines the brightness level of the LED that the PWM output drives. ...

Page 46

... Execute 7 pairs. [0] FRAME ORDER: For PWM mode, this defines which frame, PERIOD0 or PERIOD1 comes first. 0: PERIOD 0 is outputted first then PERIOD 1. 1: PERIOD 1 is outputted first then PERIOD 0. 46/ PERIOD_1 Doc ID 15757 Rev 2 STMPE1218 PWM_n control registers n=0 REPETITION FRAME ORDER 0 ...

Page 47

... STMPE1218 11.2 Interrupt on basic PWM controller The basic PWM controller can be programmed to generate interrupts on completion of the blinking sequence. However, there are some limitations: a) Each basic PWM controller has its own bit in interrupt the enable/status registers enabled, the completion in any of the PWM controllers triggers interrupts. No interrupt is generated if infinite repetition is set ...

Page 48

... Recommended operating conditions Symbol V18 Power supply V33 Power supply V Digital input IN T Operating temperature J 48/57 Parameter Min -0.3 -40 -55 Parameter Min 1.65 2.7 -45 Doc ID 15757 Rev 2 STMPE1218 Value Typ Max − − 2.5 − − 6.0 − V18 +0.3 − 85 − 125 − − 8 Value Unit Typ Max 1.8 1.95 − ...

Page 49

... STMPE1218 13 Electrical specifications Table 14. DC electrical characteristics (GPIO, reset, ADDR, I Symbol Input voltage low state V IL (reset/I Input voltage high state V IH (reset/I Input voltage low state V IL (GPIO) Input voltage high state V IH (GPIO) Output voltage low state V OL (GPIO) ...

Page 50

... Capacitive Res measurement resolution DR Dynamic range L Linearity of sensor 50/57 Parameter Test condition Aref = not connected Aref = not connected Aref = not connected Maximum deviation calculated from full scale capacitance measurement data Doc ID 15757 Rev 2 STMPE1218 Value Unit Min Typ Max - ...

Page 51

... STMPE1218 14 Package mechanical data In order to meet environmental requirements, ST offers these devices in different grades of ® ECOPACK packages, depending on their level of environmental compliance. ECOPACK specifications, grade definitions and product status are available at: www.st.com. ® ECOPACK trademark. Doc ID 15757 Rev 2 Package mechanical data ® ...

Page 52

... Package mechanical data Figure 14. Package outline for QFN40 ( mm) - pitch 0.4 mm 52/57 Doc ID 15757 Rev 2 STMPE1218 ...

Page 53

... STMPE1218 Figure 15. QFN40 recommended footprint without ground pad VIA Figure 16. QFN40 recommended footprint with ground pad VIA 0.68 1.27 0.30 1.27 0.68 Via Doc ID 15757 Rev 2 Package mechanical data 53/57 ...

Page 54

... Package mechanical data Figure 17. Tape information for QFN40 ( mm) - pitch 0.4 mm 54/57 Doc ID 15757 Rev 2 STMPE1218 ...

Page 55

... STMPE1218 Figure 18. Reel information for QFN40 ( mm) - pitch 0.4 mm Doc ID 15757 Rev 2 Package mechanical data 55/57 ...

Page 56

... Revision history 15 Revision history Table 17. Document revision history Date 27-May-2009 29-May-2009 56/57 Revision 1 Initial release. 2 Minor text changes in the Features section. Doc ID 15757 Rev 2 STMPE1218 Changes ...

Page 57

... STMPE1218 Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST’s terms and conditions of sale. ...

Related keywords