CAP1188 8 Channel Capacitive Touch Sensor with 8 LED Drivers PRODUCT FEATURES Datasheet General Description Applications The CAP1188, which incorporates SMSC’s RightTouch® 1 technology, is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains eight (8) individual capacitive touch sensor inputs with pro grammable se nsitivity for use in touch sens or applications. Each sensor input automatically recalibrates to compensate for gradual environmental changes.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Ordering Information: ORDERING NUMBER CAP1188-1-CP-TR PACKAGE FEATURES 24-pin QFN 4mm x 4mm (Lead-free RoHS compliant) Eight capacitive touch sensor inputs, Eight LED drivers, Dedicated Wake, Reset, SMBus / BC-Link / SPI interfaces Reel size is 4,000 pieces This product meets the halogen maximum concentration values per IEC61249-2-21 For RoHS compliance and environmental information, please visit www.smsc.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table of Contents Chapter 1 Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Chapter 2 Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Chapter 3 Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 4.6 4.5.1 Sensing Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.2 Recalibrating Sensor Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.3 Proximity Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.4 Multiple Touch Pattern Detection . . . . . .
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.38 5.39 5.40 5.41 5.42 LED Off Delay Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sensor Input Calibration Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Product ID Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet List of Figures Figure 1.1 Figure 3.1 Figure 3.2 Figure 3.3 Figure 3.4 Figure 3.5 Figure 3.6 Figure 3.7 Figure 3.8 Figure 3.9 Figure 3.10 Figure 3.11 Figure 3.12 Figure 4.1 Figure 4.2 Figure 4.3 Figure 5.1 Figure 5.2 Figure 5.3 Figure 5.4 Figure 5.5 Figure 5.6 Figure 5.7 Figure 5.8 Figure 6.1 Figure 6.2 Figure 6.3 Figure 6.4 Figure 6.5 Figure 6.6 Figure 6.7 Figure 6.8 CAP1188 Pin Diagram (24-Pin QFN). . . . . . . . . . . . . . . . . . . . . .
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet List of Tables Table 1.1 Table 1.2 Table 2.1 Table 2.2 Table 3.1 Table 3.2 Table 3.3 Table 3.4 Table 3.5 Table 3.6 Table 3.7 Table 3.8 Table 5.1 Table 5.2 Table 5.3 Table 5.4 Table 5.5 Table 5.6 Table 5.7 Table 5.8 Table 5.9 Table 5.10 Table 5.11 Table 5.12 Table 5.13 Table 5.14 Table 5.15 Table 5.16 Table 5.17 Table 5.18 Table 5.19 Table 5.20 Table 5.21 Table 5.22 Table 5.23 Table 5.24 Table 5.25 Table 5.26 Table 5.27 Table 5.28 Table 5.
Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.41 Table 5.42 Table 5.43 Table 5.44 Table 5.45 Table 5.46 Table 5.47 Table 5.48 Table 5.49 Table 5.50 Table 5.51 Table 5.52 Table 5.53 Table 5.54 Table 5.55 Table 5.56 Table 5.57 Table 5.58 Table 5.59 Table 5.60 Table 5.61 Table 5.62 Table 5.63 Table 5.64 Table 5.65 Table 5.66 Table 5.67 Table 5.68 Table 5.69 Table A.1 Table 7.1 STBY_SENSE Bit Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet RESET VDD CS1 CS2 CS3 CS4 24 23 22 21 20 19 Chapter 1 Pin Description SPI_CS# 1 18 CS5 WAKE / SPI_MOSI 2 17 CS6 SMDATA / BC_DATA / SPI_MSIO / SPI_MISO 3 16 CS7 SMCLK / BC_CLK / SPI_CLK 4 15 CS8 LED1 5 14 ADDR_COMM LED2 6 13 ALERT# / BC_IRQ# 7 8 9 10 11 12 LED3 LED4 LED5 LED6 LED7 LED8 CAP1188 24 pin QFN GND Figure 1.1 CAP1188 Pin Diagram (24-Pin QFN) Table 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet APPLICATION NOTE: For the 5V tolerant pins that have a pull-up resistor, the pull-up voltage must not exceed 3.6V when the CAP1188 is unpowered. APPLICATION NOTE: The SPI_CS# pin should be grounded when SMBus, I2C, or BC-Link communications are used. The pin types are described in Table 1.2. All pins labeled with (5V) are 5V tolerant. Table 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Chapter 2 Electrical Specifications Table 2.1 Absolute Maximum Ratings Voltage on 5V tolerant pins (V5VT_PIN) -0.3 to 5.5 V Voltage on 5V tolerant pins (|V5VT_PIN - VDD|) Note 2.2 0 to 3.6 V Voltage on VDD pin -0.3 to 4 V Voltage on any other pin to GND -0.3 to VDD + 0.3 V Package Power Dissipation up to TA = 85°C for 24 pin QFN (see Note 2.3) 0.9 W Junction to Ambient ( JA) (see Note 2.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 2.2 Electrical Specifications (continued) VDD = 3V to 3.6V, TA = 0°C to 85°C, all Typical values at TA = 27°C unless otherwise noted.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 2.2 Electrical Specifications (continued) VDD = 3V to 3.6V, TA = 0°C to 85°C, all Typical values at TA = 27°C unless otherwise noted. CHARACTERISTIC Leakage Current SYMBOL MIN TYP MAX ILEAK UNIT CONDITIONS ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered 0.4 V ISINK_IO = 8mA ISOURCE_IO = 8mA I/O Pins Output Low Voltage VOL Output High Voltage VOH VDD 0.4 V Input High Voltage VIH 2.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 2.2 Electrical Specifications (continued) VDD = 3V to 3.6V, TA = 0°C to 85°C, all Typical values at TA = 27°C unless otherwise noted. CHARACTERISTIC SYMBOL MIN TYP MAX UNIT CONDITIONS BC-Link Timing Clock Period tCLK 250 ns Data Hold Time tHD:DAT 0 ns Data Setup Time tSU:DAT 30 ns Clock Duty Cycle Duty 40 50 60 Data must be valid before clock % SPI Timing Clock Period tP 250 ns Clock Low Period tLOW 0.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Chapter 3 Communications 3.1 Communications The CAP1188 communicates using the 2-wire SMBus or I2C bus, the 2-wire proprietary BC-Link, or the SPI bus. Regardless of communication mechanism, the device functionality remains unchanged. The communications mechanism as well as the SMBus (or I2C) slave address is determined by the resistor connected between the ADDR_COMM pin and ground as shown in Table 3.1. Table 3.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet See Section 3.8 for more information on the BC-Link Bus and protocols respectively. APPLICATION NOTE: Upon power up, the CAP1188 will not respond to any communications for up to 15ms. After this time, full functionality is available. 3.2 System Management Bus The CAP1188 communicates with a host controller, such as an SMSC SIO, through the SMBus.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 3.2.5 SMBus Stop Bit The SMBus Stop bit is defined as a transition of the SMBus Data line from a logic ‘0’ state to a logic ‘1’ state while the SMBus clock line is in a logic ‘1’ state. When the CAP1188 detects an SMBus Stop bit and it has been communicating with the SMBus protocol, it will reset its client interface and prepare to receive further communications. 3.2.6 SMBus Timeout The CAP1188 includes an SMBus timeout feature.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 3.3.1 SMBus Write Byte The Write Byte is used to write one byte of data to a specific register as shown in Table 3.3. Table 3.3 Write Byte Protocol START SLAVE ADDRESS WR ACK REGISTER ADDRESS ACK REGISTER DATA ACK STOP 1 ->0 YYYY_YYY 0 0 XXh 0 XXh 0 0 -> 1 3.3.2 SMBus Read Byte The Read Byte protocol is used to read one byte of data from the registers as shown in Table 3.4. Table 3.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 3.4 I2C Protocols The CAP1188 supports I2C Block Write and Block Read. The protocols listed below use the convention in Table 3.2. 3.4.1 Block Write The Block Write is used to write multiple data bytes to a group of contiguous registers as shown in Table 3.7. APPLICATION NOTE: When using the Block Write protocol, the internal address pointer will be automatically incremented after every data byte is received. It will wrap from FFh to 00h.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet tP tHIGH tLOW SPI_CLK tFALL tRISE tSU:DAT SPI_MSIO or SPI_MOSI or SPI_MISO tD:CLK tHD:DAT Figure 3.2 SPI Timing 3.5.1 SPI Normal Mode The SPI Bus can operate in two modes of operation, normal and bi-directional mode. In the normal mode of operation, there are dedicated input and output data lines. The host communicates by sending a command along the CAP1188 SPI_MOSI data line and reading data on the SPI_MISO data line.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 3.5.4 Address Pointer All data writes and reads are accessed from the current address pointer. In both Bi-directional mode and Full Duplex mode, the Address pointer is automatically incremented following every read command or every write command. The address pointer will return to 00h after reaching FFh. 3.5.5 SPI Timeout The CAP1188 does not detect any timeout conditions on the SPI bus. 3.
Revision 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet SPI_CS# SPI_CLK ‘0’ Master SPDOUT SPI_MOSI ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ Reset - 7Ah ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ Reset - 7Ah Invalid register data SPI_MISO ‘1’ 00h – Internal Data buffer empty Master Drives Slave Drives Figure 3.4 SPI Reset Interface Command - Normal Mode 3.6.2 Set Address Pointer The Set Address Pointer command sets the Address pointer for subsequent reads and writes of data.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet SPI_CS# SPI_CLK Master SPDOUT SPI_MOSI Write Command – 7Eh SPI_MISO Unknown, Invalid Data Data to Write Old Data at Current Address Pointer Master Drives Slave Drives 1. Data written at current address pointer 2. Address pointer incremented Figure 3.6 SPI Write Command - Normal Mode 3.6.4 Read Data The Read Data protocol is used to read data from the device.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 1. Register Read Address updated to Current SPI Read Address pointer. 2. Register Read Address incremented = current address pointer +1 – end result = register address pointer doesn’t change 1. Register Read Address incremented = current address pointer + 1 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet SPI_CS# SPI_CLK Master SPDOUT SPI_MSIO ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ Register Address ‘1’ Set Address Pointer – 7Dh Figure 3.10 SPI Set Address Pointer Command - Bi-directional Mode 3.7.3 Write Data Writes data value to the register address stored in the address pointer. Performs auto increment of address pointer after the data is loaded into the register.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 3.8 BC-Link Interface The BC-Link is a proprietary bus developed to allow communication between a host controller device to a companion device. This device uses this serial bus to read and write registers and for interrupt processing. The interface uses a data port concept, where the base interface has an address register, data register and a control register, defined in the SMSC’s 8051’s SFR space.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Chapter 4 General Description The CAP1188 is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains eight (8) individual capacitive touch sensor inputs with programmable sensitivity for use in touch sensor applications. Each sensor input automatically recalibrates to compensate for gradual environmental changes.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet LED1 Touch Button Touch Button Touch Button Touch Button SPI_CS# RESET WAKE / SPI_MOSI ALERT# / BC_IRQ# SMCLK / BC_CLK / SPI_CLK 3.3V – 5V SMDATA / BC_DATA / SPI_MSIO / SPI_MISO Embedded Controller VDD ADDR_COMM 3.3V – 5V CAP1188 LED8 CS1 CS8 LED2 LED7 CS2 CS7 LED3 LED6 CS3 CS6 LED4 LED5 CS4 CS5 Touch Button Touch Button Touch Button Touch Button Figure 4.1 System Diagram for CAP1188 4.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 1. Fully Active - The device is fully active. It is monitoring all active capacitive sensor inputs and driving all LED channels as defined. 2. Standby - The device is in a lower power state. It will measure a programmable number of channels using the Standby Configuration controls (see Section 5.20 through Section 5.22). Interrupts will still be generated based on the active channels.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 1. Direct - The LED is configured to be on or off when the corresponding input stimulus is on or off (or inverted). The brightness of the LED can be programmed from full off to full on (default). Additionally, the LED contains controls to individually configure ramping on, off, and turn-off delay. 2. Pulse 1 - The LED is configured to “Pulse” (transition ON-OFF-ON) a programmable number of times with programmable rate and min / max brightness.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Note: During this recalibration routine, the sensor inputs will not detect a press for up to 200ms and the Sensor Base Count Register values will be invalid. In addition, any press on the corresponding sensor pads will invalidate the recalibration. 4.5.2.2 Automatic Recalibration Each sensor input is regularly recalibrated at a programmable rate (see Section 5.17, "Recalibration Configuration Register").
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 4.5.6 RF Noise Detection Each sensor input contains an integrated RF noise detector. This block will detect injected RF noise on the CS pin. The detector threshold is dependent upon the noise frequency. If RF noise is detected on a CS line, that sample is removed and not compared against the threshold. 4.6 ALERT# Pin The ALERT# pin is an active low (or active high when configured) output that is driven when an interrupt event is detected.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Interrupt on Touch Polling Cycle (35ms) Interrupt on Release (optional) Touch Detected INT bit ALERT# pin (active low) Button Status Write to INT bit Figure 4.3 Sensor Interrupt Behavior - No Repeat Rate Enabled Revision 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Chapter 5 Register Description The registers shown in Table 5.1 are accessible through the communications protocol. An entry of ‘-’ indicates that the bit is not used and will always read ‘0’. Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 5 - STBY - Enables Standby. ‘0’ (default) - Sensor input scanning is active and LEDs are functional. ‘1’ - Capacitive touch sensor input scanning is limited to the sensor inputs set in the Standby Channel register (see Section 5.20). The status registers will not be cleared until read. LEDs that are linked to capacitive touch sensor inputs will remain linked and active.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 2 - MULT - Indicates that the device is blocking detected touches due to the Multiple Touch detection circuitry (see Section 5.14). This bit will not cause the INT bit to be set and hence will not cause an interrupt. Bit 1 - MTP - Indicates that the device has detected a number of sensor inputs that exceed the MTP threshold either via the pattern recognition or via the number of sensor inputs (see Section 5.15).
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 2 - LED3_DN - Indicates that LED3 has finished its behavior after being actuated by the host. Bit 1 - LED2_DN - Indicates that LED2 has finished its behavior after being actuated by the host. Bit 0 - LED1_DN - Indicates that LED1 has finished its behavior after being actuated by the host. 5.3 Noise Flag Status Registers Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.6 Sensor Input Delta Count Registers (continued) ADDR R/W REGISTER B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT 16h R Sensor Input 7 Delta Count Sign 64 32 16 8 4 2 1 00h 17h R Sensor Input 8 Delta Count Sign 64 32 16 8 4 2 1 00h The Sensor Input Delta Count registers store the delta count that is compared against the threshold used to determine if a touch has been detected.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.8 DELTA_SENSE Bit Decode (continued) DELTA_SENSE[2:0] 2 1 0 SENSITIVITY MULTIPLIER 0 0 1 64x 0 1 0 32x (default) 0 1 1 16x 1 0 0 8x 1 0 1 4x 1 1 0 2x 1 1 1 1x - (least sensitive) Bits 3 - 0 - BASE_SHIFT[3:0] - Controls the scaling and data presentation of the Base Count registers. The higher the value of these bits, the larger the range and the lower the resolution of the data presented.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.6 Configuration Registers Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.6.2 Configuration 2 - 44h Bit 7 - INV_LINK_TRAN - Determines the behavior of the Linked LED Transition controls (see Section 5.29). ‘0’ (default) - The Linked LED Transition controls set the min duty cycle equal to the max duty cycle. ‘1’ - The Linked LED Transition controls will invert the touch signal. For example, a touch signal will be inverted to a non-touched signal. Bit 6 - ALT_POL - Determines the ALERT# pin polarity and behavior.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.7 Sensor Input Enable Registers Table 5.11 Sensor Input Enable Registers ADDR R/W REGISTER B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT 21h R/W Sensor Input Enable CS8_EN CS7_EN CS6_EN CS5_EN CS4_EN CS3_EN CS2_EN CS1_EN FFh The Sensor Input Enable registers determine whether a capacitive touch sensor input is included in the sampling cycle. The length of the sampling cycle is not affected by the number of sensor inputs measured.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.14 RPT_RATE Bit Decode (continued) RPT_RATE[3:0] 3 2 1 0 INTERRUPT REPEAT RATE 1 0 1 0 385ms 1 0 1 1 420ms 1 1 0 0 455ms 1 1 0 1 490ms 1 1 1 0 525ms 1 1 1 1 560ms 5.9 Sensor Input Configuration 2 Register Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.16 M_PRESS Bit Decode (continued) M_PRESS[3:0] 3 2 1 0 M_PRESS SETTINGS 1 0 0 1 350ms 1 0 1 0 385ms 1 0 1 1 420ms 1 1 0 0 455ms 1 1 0 1 490ms 1 1 1 0 525ms 1 1 1 1 560ms 5.10 Averaging and Sampling Configuration Register Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.18 AVG Bit Decode (continued) AVG[2:0] 2 1 0 NUMBER OF SAMPLES TAKEN PER MEASUREMENT 1 0 1 32 1 1 0 64 1 1 1 128 Bits 3 - 2 - SAMP_TIME[1:0] - Determines the time to take a single sample as shown in Table 5.19. Table 5.19 SAMP_TIME Bit Decode SAMP_TIME[1:0] 1 0 SAMPLE TIME 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.11 Calibration Activate Register Table 5.21 Calibration Activate Register ADDR R/W REGISTER B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT 26h R/W Calibration Activate CS8_ CAL CS7_ CAL CS6_ CAL CS5_ CAL CS4_ CAL CS3_ CAL CS2_ CAL CS1_ CAL 00h The Calibration Activate register forces the respective sensor inputs to be re-calibrated affecting both the analog and digital blocks.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet ‘0’ - The interrupt pin will not be asserted if a touch is detected on CS8 (associated with the CS8 status bit). ‘1’ (default) - The interrupt pin will be asserted if a touch is detected on CS8 (associated with the CS8 status bit). Bit 6 - CS7_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS7 (associated with the CS7 status bit).
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.14 Multiple Touch Configuration Register Table 5.24 Multiple Touch Configuration ADDR R/W REGISTER B7 B6 B5 B4 2Ah R/W Multiple Touch Config MULT_ BLK_ EN - - - B3 B2 B_MULT_T[1:0] B1 B0 DEFAULT - - 80h The Multiple Touch Configuration register controls the settings for the multiple touch detection circuitry.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 1. The detection threshold is a percentage of the touch detection threshold as defined by the MTP_TH[1:0] bits whereas the multiple touch circuitry uses the touch detection threshold. 2.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.16 Multiple Touch Pattern Register Table 5.28 Multiple Touch Pattern Register ADDR R/W REGISTER B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT 2Dh R/W Multiple Touch Pattern CS8_ PTRN CS7_ PTRN CS6_ PTRN CS5_ PTRN CS4_ PTRN CS3_ PTRN CS2_ PTRN CS1_ PTRN FFh The Multiple Touch Pattern register acts as a pattern to identify an expected sensor input profile for diagnostics or other significant events.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 7 - BUT_LD_TH - Enables setting all Sensor Input Threshold registers by writing to the Sensor Input 1 Threshold register. ‘0’ - Each Sensor Input X Threshold register is updated individually. ‘1’ (default) - Writing the Sensor Input 1 Threshold register will automatically overwrite the Sensor Input Threshold registers for all sensor inputs (Sensor Input Threshold 1 through Sensor Input Threshold 8).
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.31 CAL_CFG Bit Decode (continued) CAL_CFG[2:0] 2 1 0 RECALIBRATION SAMPLES (SEE Note 5.1) 1 0 0 256 256 1 0 1 256 1024 1 1 0 256 2048 1 1 1 256 4096 5.18 UPDATE TIME (SEE Note 5.2) Note 5.1 Recalibration Samples refers to the number of samples that are measured and averaged before the Base Count is updated however does not control the base count update period. Note 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.19 Sensor Input Noise Threshold Register Table 5.33 Sensor Input Noise Threshold Register ADDR R/W REGISTER 38h R/W Sensor Input Noise Threshold B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT CS_BN_TH [1:0] 01h The Sensor Input Noise Threshold register controls the value of a secondary internal threshold to detect noise and improve the automatic recalibration routine.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 3 - CS4_STBY - Controls whether the CS4 channel is active in Standby. Bit 2 - CS3_STBY - Controls whether the CS3 channel is active in Standby. Bit 1 - CS2_STBY - Controls whether the CS2 channel is active in Standby. Bit 0 - CS1_STBY - Controls whether the CS1 channel is active in Standby. 5.21 Standby Configuration Register Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 3-2 - STBY SAMP_TIME[1:0] - Determines the time to take a single sample when the device is in Standby as shown in Table 5.38. Table 5.38 STBY_SAMP_TIME Bit Decode STBY_SAMP_TIME[1:0] 1 0 SAMPLING TIME 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms Bits 1 - 0 - STBY_CY_TIME[2:0] - Determines the overall cycle time for all measured channels during standby operation as shown in Table 5.39.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet more sensitive settings, touches are detected for a smaller delta C corresponding to a “lighter” touch. These settings are more sensitive to noise however and a noisy environment may flag more false touches than higher sensitivity levels. APPLICATION NOTE: A value of 128x is the most sensitive setting available.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.24 Sensor Input Base Count Registers Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 7 - LED8_OT - Determines the output type of the LED8 pin. ‘0’ (default) - The LED8 pin is an open-drain output with an external pull-up resistor. When the appropriate pin is set to the “active” state (logic ‘1’), the pin will be driven low. Conversely, when the pin is set to the “inactive” state (logic ‘0’), then the pin will be left in a High Z state and pulled high via an external pull-up resistor.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 2 - CS3_LED3 - Links the LED3 output to a detected touch on the CS3 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. Bit 1 - CS2_LED2 - Links the LED2 output to a detected touch on the CS2 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet ‘0’ (default) - The LED8 output is inverted. For example, a setting of ‘1’ in the LED Output Control register will cause the LED pin output to be driven to a logic ‘0’. ‘1’ - The LED8 output is non-inverted. For example, a setting of ‘1’ in the LED Output Control register will cause the LED pin output to be driven to a logic ‘1’ or left in the high-z state as determined by its output type.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.48 LED Polarity Behavior LED OUTPUT CONTROL REGISTER OR TOUCH POLARITY MAX DUTY MIN DUTY BRIGHTNESS LED APPEARANCE inverted (‘0’) not used minimum % of time that the LED is on (logic 0) maximum brightness at min duty cycle on at min duty cycle 1 inverted (‘0’) maximum % of time that the LED is on (logic 0) minimum % of time that the LED is on (logic 0) maximum brightness at max duty cycle.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet APPLICATION NOTE: If the LED behavior is not “Direct” and the INV_LINK_TRAN bit it ‘0’, the LED will not perform as expected when the LED8_LTRAN bit is set to ‘1’. Therefore, if breathe and pulse behaviors are used, set the INV_LINK_TRAN bit to ‘1’. Bit 6 - LED7_LTRAN - Determines the transition effect when LED7 is linked to CS7. Bit 5 - LED6_LTRAN - Determines the transition effect when LED6 is linked to CS6.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Bit 2 - LED3_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. Bit 1 - LED2_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. Bit 0 - LED1_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. 5.31 LED Behavior Registers Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet is changed so that it is unlinked, it will check the status of the corresponding LED Output Control bit. If that bit is ‘0’, then the LED will behave as if a release was detected. Likewise, if an unlinked LED was actuated by the LED Output Control register and the control is changed so that it is linked and no touch is detected, then the LED will behave as if a release was detected. 5.31.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet APPLICATION NOTE: The PWM frequency is determined based on the selected LED behavior, the programmed breathe period, and the programmed min and max duty cycles. For the Direct behavior mode, the PWM frequency is calculated based on the programmed Rise and Fall times. If these are set at 0, then the maximum PWM frequency will be used based on the programmed duty cycle settings. 5.32 LED Pulse 1 Period Register Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Touch Detected or Release Detected X pulses after touch or after release Pulse 1 Max Duty Cycle * Brightness LED Brightness Normal – untouched operation Normal – untouched operation Pulse 1 Min Duty Cycle * Brightness Pulse Period (P1_PER) Figure 5.2 Pulse 1 Behavior with Inverted Polarity Table 5.54 LED Pulse / Breathe Period Example 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 18h (24d) would represent a period of 768ms. The total range is from 32ms to 4.064 seconds (see Table 5.54) with a default of 640ms. APPLICATION NOTE: Due to constraints on the LED Drive PWM operation, any Breathe Period less than 160ms (05h) may not be achievable. The device will breathe at the minimum period possible as determined by the period and min / max duty cycle settings. The Pulse 2 Behavior is shown in Figure 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet The LED Breathe Period register determines the overall period of a breathe operation as determined by the LED_CTL registers (see Table 5.52 - setting 11b). The LSB represents 32ms so that a setting of 18h (24d) would represent a period of 768ms. The total range is from 32ms to 4.064 seconds (see Table 5.54) with a default of 2976ms.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.58 PULSEX_CNT Decode (continued) PULSEX_CNT[2:0] 2 1 0 NUMBER OF BREATHS 1 1 1 8 5.36 LED Duty Cycle Registers Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.60 LED Duty Cycle Decode (continued) X_MAX/MIN_DUTY [3:0] 3 2 1 0 MAXIMUM DUTY CYCLE MINIMUM DUTY CYCLE 0 1 0 1 20% 17% 0 1 1 0 23% 20% 0 1 1 1 26% 23% 1 0 0 0 30% 26% 1 0 0 1 35% 30% 1 0 1 0 40% 35% 1 0 1 1 46% 40% 1 1 0 0 53% 46% 1 1 0 1 63% 53% 1 1 1 0 77% 63% 1 1 1 1 100% 77% 5.37 LED Direct Ramp Rates Register Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.62 Rise / Fall Rate Decode (continued) RISE_RATE/ FALL_RATE/ BIT DECODE 2 1 0 RISE / FALL TIME (TRISE / TFALL)) 0 1 0 500ms 0 1 1 750ms 1 0 0 1s 1 0 1 1.25s 1 1 0 1.5s 1 1 1 2s 5.38 LED Off Delay Register Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet LED Actuated LED Unactuated 100% - Breathe Max Min Cycle * Brightness LED Brightness Breathe Period (BR_PER) 100% - Breathe Min Duty Cycle * Brightness Breathe Off Delay (BR_OFF_DLY) Figure 5.5 Breathe Behavior with Non-Inverted Polarity LED Actuated LED Unactuated Breathe Max Duty Cycle * Brightness LED Brightness Breathe Min Duty Cycle * Brightness Breathe Period (BR_PER) Breathe Off Delay (BR_OFF_DLY) Figure 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 5.64 Breathe Off Delay Settings BR_OFF_DLY [2:0] 2 1 0 OFF DELAY 0 0 0 0 (default) 0 0 1 0.25s 0 1 0 0.5s 0 1 1 0.75s 1 0 0 1.0s 1 0 1 1.25s 1 1 0 1.5s 1 1 1 2.0s Bits 3 - 0 - DIR_OFF_DLY[3:0] - Determines the turn-off delay, as shown in Table 5.65, for all LEDs that are configured to operate in Direct behavior mode.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Release Detected Touch Detected M ax Duty C ycle * Brightness LED Brightness Norm al – untouched operation Min Duty Cycle * Brightness Norm al – untouched operation RISE_RATE Setting (t RISE ) O ff D elay (t O FF_DLY ) FALL_RATE Setting (t FALL ) Figure 5.8 Direct Behavior for Inverted Polarity Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.39 Sensor Input Calibration Registers Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 5.41 Manufacturer ID Register Table 5.68 Vendor ID Register ADDR R/W REGISTER B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT FEh R Manufacturer ID 0 1 0 1 1 1 0 1 5Dh The Vendor ID register stores an 8-bit value that represents SMSC. 5.42 Revision Register Table 5.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Chapter 6 Package Information 6.1 CAP1188 Package Drawings Figure 6.1 CAP1188 Package Drawing - 24-Pin QFN 4mm x 4mm SMSC CAP1188 85 DATASHEET Revision 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Figure 6.2 CAP1188 Package Dimensions - 24-Pin QFN 4mm x 4mm Figure 6.3 CAP1188 PCB Land Pattern and Stencil - 24-Pin QFN 4mm x 4mm Revision 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Figure 6.4 CAP1188 PCB Detail A - 24-Pin QFN 4mm x 4mm Figure 6.5 CAP1188 PCB Detail B - 24-Pin QFN 4mm x 4mm SMSC CAP1188 87 DATASHEET Revision 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Figure 6.6 CAP1188 Land Dimensions - 24-Pin QFN 4mm x 4mm Figure 6.7 QFN Application Notes Revision 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet 6.2 Package Marking TOP 0.41 LINE: 1 – SMSC Logo without circled (R) symbol LINE: 2 – Device ID, Version LINE: 3 – Last 7 digits of Lot Number LINE: 4 – Revision and Country Code (RCC) 3x 0.56 C 1 1 8 8 - 1 1 2 3 4 5 6 a R CC e3 PB-FREE/GREEN SYMBOL (Matte Sn) PIN 1 LINES 1 to 3: CENTER HORIZONTAL ALIGNMENT LINE 4: LEFT HORIZONTAL ALIGNMENT BOTTOM BOTTOM MARKING NOT ALLOWED Figure 6.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Appendix A Device Delta A.1 Delta from CAP1088 to CAP1188 1. Updated circuitry to improve power supply rejection. 2. Updated LED driver duty cycle decode values to have more distribution at lower values - closer to a logarithmic curve. See Table 5.60, "LED Duty Cycle Decode". 3. Updated bug that breathe periods were not correct above 2.6s. This includes rise / fall time decodes above 1.5s. 4.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table A.1 Register Delta From CAP1088 to CAP1188 (continued) ADDRESS REGISTER DELTA DELTA DEFAULT 44h Page 47 New - Configuration 2 new register to control alert polarity, LED touch linking behavior, LED output behavior, and noise detection, and interrupt on release 40h 24h Page 52 Changed - Averaging Control updated register bits - moved SAMP_AVG[2:0] bits and added SAMP_TIME bit 1.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Chapter 7 Datasheet Revision History Table 7.1 Customer Revision History REVISION LEVEL & DATE Rev. 1.32 (01-05-12) SECTION/FIGURE/ENTRY CORRECTION Table 2.2, "Electrical Specifications" Added conditions for tHD:DAT. Section 3.2.7, "SMBus and I2C Compatibility" Renamed from “SMBus and I2C Compliance.” First paragraph, added last sentence: “For information on using the CAP1188 in an I2C system, refer to SMSC AN 14.
8 Channel Capacitive Touch Sensor with 8 LED Drivers Datasheet Table 7.1 Customer Revision History (continued) REVISION LEVEL & DATE SECTION/FIGURE/ENTRY Cover CORRECTION Added to General Description: “includes circuitry and support for enhanced sensor proximity detection.” Added the following Features: Calibrates for Parasitic Capacitance Analog Filtering for System Noise Sources Press and Hold feature for Volume-like Applications Rev. 1.0 (06-14-10) SMSC CAP1188 Table 2.
Adafruit CAP1188 Breakout Created by lady ada Last updated on 2014-05-14 12:00:10 PM EDT
Guide Contents Guide Contents 2 Overview 3 Pinouts 5 Power pins 5 I2C interface pins 5 SPI inteface pins 6 Other interfacing pins 6 Sensor input pins 6 Sensor output pins 6 Wiring 7 Wiring for use with I2C 7 Wiring for use with SPI 9 Using with Arduino 11 Download the library 11 Run Test Sketch 11 I2C with a different address 14 Using with SPI 15 Using the external IRQ Interrupt 16 Downloads 19 © Adafruit Industries https://learn.adafruit.
Overview Add lots of touch sensors to your next microcontroller project with this easy-to-use 8channel capacitive touch sensor breakout board, starring the CAP1188. This chip can handle up to 8 individual touch pads, and has a very nice feature that makes it stand out for us: it will light up the 8 onboard LEDs when the matching touch sensor fires to help you debug your sensor setup. The CAP1188 has support for both I2C and SPI, so it easy to use with any microcontroller.
few minutes, and if you are using another microcontroller, its easy to port our code. © Adafruit Industries https://learn.adafruit.
Pinouts The CAP1188 has a lot going on, so much so that we had to make the breakout doublesided! It fits nicely into a breadboard and has the sensors all in a row on one side and if you're using plain i2c you can connect to to the left side only Here's all the pins and what they do! Power pins VIN and GND are power in pins, you can use 3-5VDC so its great for any kind of microcontrollers.
SPI inteface pins If you want to use SPI instead, you'll be using the SCK, MOSI, MISO and CS pins Other interfacing pins The AD pin is used to select SPI or I2C interface, and if I2C what address to use. See the wiring page for more details The IRQ pin goes low when a pin is touched. We don't use it on our code examples, but if you want to have an interrupt pin used, connect it to this IRQ pin and use active-low triggering. The RST pin is used to reset the chip, either in I2C or SPI mode.
Wiring Wiring for use with I2C Chances are you'll use this board with the I2C interface pins. I2C is handy because you can have multiple sensors all connected on two I2C pins and share them nicely as long as each one has a unique address. I2C isn't particularly fast but that's fine for a sensor like this one (it's not good for video or audio type data) I2C is really fast to get started, so we suggest that. Connect the VIN pin to 5V and GND pin to ground.
any digital I/O pin. In the library example code you can set up that pin in the CAP1188 object creation. If you're using multiple sensors, or you just want to change the I2C address to something else, you can choose from 5 different options - 0x28, 0x29 (default), 0x2A, 0x2B, 0x2C and 0x2D The I2C address are selected by connecting a resistor to the AD pin in the lower right: different resistors set a different address. The easiest address to set is 0x28 which is just a wire from AD to the 3Vo pin.
If you want to set the I2C address to a different value you'll need to connect a resistor from AD to ground instead of a wire to 3V. The datasheet talks about different resistor values in table 3.1 - but since the breakout board already has a 150K resistor on it, you'll need to use different values so that the parallel resistance comes out right.
Either way, SPI is there for you. Connect Vin to 5V and GND to ground, then tie a wire from AD to ground as well. Now connect the SCK, MISO, MOSI, CS and RST pins to your microcontroller. If using an Arduino you can use either the hardware SPI pins which are fixed for each Arduino, or go with software SPI where you select any 5 digital I/O pins © Adafruit Industries https://learn.adafruit.
Using with Arduino Its super easy to use this sensor board with an Arduino thanks to the great Adafruit library. Once you've installed the library you can connect the sensor board via I2C or SPI to your Arduino, it will work with any kind or flavor. If you're using a different kind of microcontroller, the library is a good reference to help you port the code over. Download the library First up, we'll download the Arduino library from github.
Wire up the sensor as shown in the Wiring section, for I2C. Connect the GND pin to ground, VIN pin to 5V and connect SDA to your Arduino's SDA pin, SCL to SCL pin On UNO/Duemilanove/etc, SDA == Analog 4, SCL == Analog 5 On Leonardo/Micro, SDA == Digital 2, SCL == Digital 3 On Mega/ADK/Due, SDA == Digital 20, SCL == Digital 21 Upload the sketch and open up the serial console at 9600 baud.
© Adafruit Industries https://learn.adafruit.
I2C with a different address If you're using multiple sensors, or you just want to change the I2C address to something else, you can choose from 5 different options - 0x28, 0x29 (default), 0x2A, 0x2B, 0x2C and 0x2D The I2C address are selected by connecting a resistor to the AD pin in the lower right: different resistors set a different address. The easiest address to set is 0x28 which is just a wire from AD to the 3Vo pin. © Adafruit Industries https://learn.adafruit.
Now look in the test sketch for the lines if (!cap.begin()) { Serial.println("CAP1188 not found"); while (1); } And change the cap.begin() statement to cap.begin(0x28) to initialize it to use the 0x28 address. Don't forget to do a full power off of the Arduino & sensor, the sensor only detects the i2c address on power up so you can't change it on the fly! Using with SPI You can also use SPI if you wish.
To enable SPI, be sure to wire for SPI as shown in the Wiring section, and do a power reset of your board so that the chip 'wakes up' in SPI mode If you're using hardware SPI, check the SPI page for what pins you need to use, sometimes they are only on the ICSP header which makes them trickier to use. (http://adafru.
// CS pin is used for software or hardware SPI #define CAP1188_CS 10 // These are defined for software SPI, for hardware SPI, check your // board's SPI pins in the Arduino documentation #define CAP1188_MOSI 11 #define CAP1188_MISO 12 #define CAP1188_CLK 13 volatile byte interrupt = 0; // For I2C, connect SDA to your Arduino's SDA pin, SCL to SCL pin // On UNO/Duemilanove/etc, SDA == Analog 4, SCL == Analog 5 // On Leonardo/Micro, SDA == Digital 2, SCL == Digital 3 // On Mega/ADK/Due, SDA == Digital 20, SCL
// Turn off multitouch so only one button pressed at a time cap.writeRegister(0x2A, 0x80); // 0x2A default 0x80 use 0x41 — Set multiple touches back to off cap.writeRegister(0x41, 0x39); // 0x41 default 0x39 use 0x41 — Set "speed up" setting back to off cap.writeRegister(0x72, 0x00); // 0x72 default 0x00 — Sets LED links back to off (default) cap.writeRegister(0x44, 0x41); // 0x44 default 0x40 use 0x41 — Set interrupt on press but not release cap.
Downloads The CAP1188 Datasheet has lots of details about this chip (http://adafru.