Les cookies nous permettent de vous proposer nos services plus facilement. En utilisant nos services, vous nous donnez expressément votre accord pour exploiter ces cookies.En savoir plus OK
Microchip-CAP1133 3 Channel Capacitive Touch Sensor with 3 LED Drivers-Manuel
Au format texte :
2015 Microchip Technology Inc. DS00001625B-page 1 General Description The CAP1133, which incorporates RightTouch® technology, is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains three (3) 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. The CAP1133 also contains three (3) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. The CAP1133 includes Multiple Pattern Touch recognition that allows the user to select a specific set of buttons to be touched simultaneously. If this pattern is detected, then a status bit is set and an interrupt generated. Additionally, the CAP1133 includes circuitry and support for enhanced sensor proximity detection. The CAP1133 offers multiple power states operating at low quiescent currents. In the Standby state of operation, one or more capacitive touch sensor inputs are active and all LEDs may be used. Deep Sleep is the lowest power state available, drawing 5uA (typical) of current. In this state, no sensor inputs are active. Communications will wake the device. Applications • Desktop and Notebook PCs • LCD Monitors • Consumer Electronics • Appliances Features • Three (3) Capacitive Touch Sensor Inputs - Programmable sensitivity - Automatic recalibration - Individual thresholds for each button • Proximity Detection • Multiple Button Pattern Detection • Calibrates for Parasitic Capacitance • Analog Filtering for System Noise Sources • Press and Hold feature for Volume-like Applications • SMBus / I2C Compliant Communication Interface • Low Power Operation - 5uA quiescent current in Deep Sleep - 50uA quiescent current in Standby (1 sensor input monitored) - Samples one or more channels in Standby • Three (3) LED Driver Outputs - Open Drain or Push-Pull - Programmable blink, breathe, and dimness controls - Can be linked to Capacitive Touch Sensor inputs • Available in 10-pin 3mm x 3mm RoHS compliant DFN package CAP1133 3 Channel Capacitive Touch Sensor with 3 LED Drivers CAP1133 DS00001625B-page 2 2015 Microchip Technology Inc. TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com. We welcome your feedback. Most Current Data Sheet To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000000A is version A of document DS30000000). Errata An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: • Microchip’s Worldwide Web site; http://www.microchip.com • Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include -literature number) you are using. Customer Notification System Register on our web site at www.microchip.com to receive the most current information on all of our products. 2015 Microchip Technology Inc. DS00001625B-page 3 CAP1133 Table of Contents 1.0 Block Diagram ................................................................................................................................................................................. 4 2.0 Pin Description ................................................................................................................................................................................ 5 3.0 Electrical Specifications .................................................................................................................................................................. 9 4.0 Communications ........................................................................................................................................................................... 12 5.0 General Description ...................................................................................................................................................................... 23 6.0 Register Description ...................................................................................................................................................................... 29 7.0 Package Information ..................................................................................................................................................................... 67 Appendix A: Device Delta ................................................................................................................................................................... 72 Appendix B: Data Sheet Revision History ........................................................................................................................................... 74 The Microchip Web Site ...................................................................................................................................................................... 76 Customer Change Notification Service ............................................................................................................................................... 76 Customer Support ............................................................................................................................................................................... 76 Product Identification System ............................................................................................................................................................. 77 CAP1133 DS00001625B-page 4 2015 Microchip Technology Inc. 1.0 BLOCK DIAGRAM SMBus Slave Protocol SMCLK SMDATA VDD GND ALERT# Capacitive Touch Sensing Algorithm CS1 CS2 CS3 LED1 LED Driver, Breathe, and Dimness control LED2 LED3 2015 Microchip Technology Inc. DS00001625B-page 5 CAP1133 2.0 PIN DESCRIPTION FIGURE 2-1: CAP1133 Pin Diagram (10-Pin DFN) TABLE 2-1: PIN DESCRIPTION FOR CAP1133 Pin Number Pin Name Pin Function Pin Type Unused Connection 1 ALERT# Active low alert / interrupt output usable for SMBus alert OD (5V) Connect to Ground Active high alert / interrupt output usable for SMBus alert DO leave open 2 SMDATA Bi-directional, open-drain SMBus data - requires pull-up DIOD (5V) n/a 3 SMCLK SMBus clock input - requires pull-up resistor DI (5V) 4 VDD Positive Power supply Power n/a 5 LED1 Open drain LED 1 driver (default) OD (5V) Connect to Ground Push-pull LED 1 driver DO leave open or connect to Ground 6 LED2 Open drain LED 2 driver (default) OD (5V) Connect to Ground Push-pull LED 2 driver DO leave open or connect to Ground 7 LED3 Open drain LED 3 driver (default) OD (5V) Connect to Ground Push-pull LED 3 driver DO leave open or connect to Ground GND CS2 1 CS1 2 3 4 5 CS3 LED1 ALERT# SMDATA VDD SMCLK LED3 LED2 CAP1133 3mm x 3mm DFN 10 9 8 7 6 CAP1133 DS00001625B-page 6 2015 Microchip Technology Inc. APPLICATION NOTE: When the ALERT# pinis configured as an active low output, it will be open drain. When it is configured as an active high output, it will be push-pull. APPLICATION NOTE: For the 5V tolerant pins that have a pull-up resistor, the pull-up voltage must not exceed 3.6V when the CAP1133 is unpowered. The pin types are described in Table 2-2. All pins labeled with (5V) are 5V tolerant. 8 CS3 Capacitive Touch Sensor Input 3 AIO Connect to Ground 9 CS2 Capacitive Touch Sensor Input 2 AIO Connect to Ground 10 CS1 Capacitive Touch Sensor Input 1 AIO Connect to Ground Bottom Pad GND Ground Power n/a TABLE 2-2: PIN TYPES Pin Type Description Power This pin is used to supply power or ground to the device. DI Digital Input - This pin is used as a digital input. This pin is 5V tolerant. AIO Analog Input / Output -This pin is used as an I/O for analog signals. DIOD Digital Input / Open Drain Output - This pin is used as a digital I/O. When it is used as an output, it is open drain and requires a pull-up resistor. This pin is 5V tolerant. OD Open Drain Digital Output - This pin is used as a digital output. It is open drain and requires a pull-up resistor. This pin is 5V tolerant. DO Push-pull Digital Output - This pin is used as a digital output and can sink and source current. DIO Push-pull Digital Input / Output - This pin is used as an I/O for digital signals. TABLE 2-1: PIN DESCRIPTION FOR CAP1133 (CONTINUED) Pin Number Pin Name Pin Function Pin Type Unused Connection 2015 Microchip Technology Inc. DS00001625B-page 7 CAP1133 3.0 ELECTRICAL SPECIFICATIONS Note 3-1 Stresses above those listed could cause permanent damage to the device. This is a stress rating only and functional operation of the device at any other condition above those indicated in the operation sections of this specification is not implied. Note 3-2 For the 5V tolerant pins that have a pull-up resistor, the voltage difference between V5VT_PIN and VDD must never exceed 3.6V. Note 3-3 The Package Power Dissipation specification assumes a recommended thermal via design consisting of a 2x2 matrix of 0.3mm (12mil) vias at 1.0mm pitch connected to the ground plane with a 1.6 x 2.3mm thermal landing. TABLE 3-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 3-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 10 pin DFN (see Note 3-3) 0.7 W Junction to Ambient (θJA) 77.7 °C/W Operating Ambient Temperature Range -40 to 125 °C Storage Temperature Range -55 to 150 °C ESD Rating, All Pins, HBM 8000 V CAP1133 DS00001625B-page 8 2015 Microchip Technology Inc. TABLE 3-2: ELECTRICAL SPECIFICATIONS 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 DC Power Supply Voltage VDD 3.0 3.3 3.6 V Supply Current ISTBY 120 170 uA Standby state active 1 sensor input monitored No LEDs active Default conditions (8 avg, 70ms cycle time) ISTBY 50 uA Standby state active 1 sensor input monitored No LEDs active 1 avg, 140ms cycle time, IDSLEEP 5 15 uA Deep Sleep state active LEDs at 100% or 0% Duty Cycle No communications TA < 40°C 3.135 < VDD < 3.465V IDD 500 600 uA Capacitive Sensing Active No LEDs active Capacitive Touch Sensor Inputs Maximum Base Capacitance CBASE 50 pF Pad untouched Minimum Detectable Capacitive Shift ΔCTOUCH 20 fF Pad touched - default conditions (1 avg, 35ms cycle time, 1x sensitivity) Recommended Cap Shift ΔCTOUCH 0.1 2 pF Pad touched - Not tested Power Supply Rejection PSR ±3 ±10 counts / V Untouched Current Counts Base Capacitance 5pF - 50pF Maximum sensitivity Negative Delta Counts disabled All other parameters default Timing Time to communications ready tCOMM_DLY 15 ms Time to first conversion ready tCONV_DLY 170 200 ms LED Drivers Duty Cycle DUTYLED 0 100 % Programmable Drive Frequency fLED 2 kHz Sinking Current ISINK 24 mA VOL = 0.4 Sourcing Current ISOURCE 24 mA VOH = VDD - 0.4 Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered I/O Pins Output Low Voltage VOL 0.4 V ISINK_IO = 8mA Output High Voltage VOH VDD - 0.4 V ISOURCE_IO = 8mA Input High Voltage VIH 2.0 V 2015 Microchip Technology Inc. DS00001625B-page 9 CAP1133 Note 3-4 The ALERT pin will not glitch high or low at power up if connected to VDD or another voltage. Note 3-5 The SMCLK and SMDATA pins will not glitch low at power up if connected to VDD or another voltage. Input Low Voltage VIL 0.8 V Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered SMBus Timing Input Capacitance CIN 5 pF Clock Frequency fSMB 10 400 kHz Spike Suppression tSP 50 ns Bus Free Time Stop to Start tBUF 1.3 us Start Setup Time tSU:STA 0.6 us Start Hold Time tHD:STA 0.6 us Stop Setup Time tSU:STO 0.6 us Data Hold Time tHD:DAT 0 us When transmitting to the master Data Hold Time tHD:DAT 0.3 us When receiving from the master Data Setup Time tSU:DAT 0.6 us Clock Low Period tLOW 1.3 us Clock High Period tHIGH 0.6 us Clock / Data Fall Time tFALL 300 ns Min = 20+0.1CLOAD ns Clock / Data Rise Time tRISE 300 ns Min = 20+0.1CLOAD ns Capacitive Load CLOAD 400 pF per bus line TABLE 3-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 CAP1133 DS00001625B-page 10 2015 Microchip Technology Inc. 4.0 COMMUNICATIONS 4.1 Communications The CAP1133 communicates using the SMBus or I2C protocol. The supports the following protocols: Send Byte, Receive Byte, Read Byte, Write Byte, Read Block, and Write Block. In addition, the device supports I2C formatting for block read and block write protocols. 4.2 System Management Bus The CAP1133 communicates with a host controller, such as an SIO, through the SMBus. The SMBus is a two-wire serial communication protocol between a computer host and its peripheral devices. A detailed timing diagram is shown in Figure 4-1. Stretching of the SMCLK signal is supported; however, the CAP1133 will not stretch the clock signal. 4.2.1 SMBUS START BIT The SMBus Start bit is defined as a transition of the SMBus Data line from a logic ‘1’ state to a logic ‘0’ state while the SMBus Clock line is in a logic ‘1’ state. 4.2.2 SMBUS ADDRESS AND RD / WR BIT The SMBus Address Byte consists of the 7-bit slave address followed by the RD / WR indicator bit. If this RD / WR bit is a logic ‘0’, then the SMBus Host is writing data to the slave device. If this RD / WR bit is a logic ‘1’, then the SMBus Host is reading data from the slave device. The CAP1133 responds to SMBus address 0101_000(r/w). 4.2.3 SMBUS DATA BYTES All SMBus Data bytes are sent most significant bit first and composed of 8-bits of information. 4.2.4 SMBUS ACK AND NACK BITS The SMBus slave will acknowledge all data bytes that it receives. This is done by the slave device pulling the SMBus Data line low after the 8th bit of each byte that is transmitted. This applies to both the Write Byte and Block Write protocols. The Host will NACK (not acknowledge) the last data byte to be received from the slave by holding the SMBus data line high after the 8th data bit has been sent. For the Block Read protocol, the Host will ACK each data byte that it receives except the last data byte. FIGURE 4-1: SMBus Timing Diagram SMDATA SMCLK TLOW TRISE THIGH TFALL TBUF THD:STA P S S - Start Condition P - Stop Condition THD:DAT TSU:DAT TSU:STA THD:STA P TSU:STO S 2015 Microchip Technology Inc. DS00001625B-page 11 CAP1133 4.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 CAP1133 detects an SMBus Stop bit and it has been communicating with the SMBus protocol, it will reset its slave interface and prepare to receive further communications. 4.2.6 SMBUS TIMEOUT The CAP1133 includes an SMBus timeout feature. Following a 30ms period of inactivity on the SMBus where the SMCLK pin is held low, the device will timeout and reset the SMBus interface. The timeout function defaults to disabled. It can be enabled by setting the TIMEOUT bit in the Configuration register (see Section 6.6, "Configuration Registers"). 4.2.7 SMBUS AND I2C COMPATIBILITY The major differences between SMBus and I2C devices are highlighted here. For more information, refer to the SMBus 2.0 and I2C specifications. For information on using the CAP1133 in an I2C system, refer to AN 14.0 Dedicated Slave Devices in I2C Systems. 1. CAP1133 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. 2. Minimum frequency for SMBus communications is 10kHz. 3. The SMBus slave protocol will reset if the clock is held at a logic ‘0’ for longer than 30ms. This timeout functionality is disabled by default in the CAP1133 and can be enabled by writing to the TIMEOUT bit. I2C does not have a timeout. 4. The SMBus slave protocol will reset if both the clock and data lines are held at a logic ‘1’ for longer than 200µs (idle condition). This function is disabled by default in the CAP1133 and can be enabled by writing to the TIMEOUT bit. I2C does not have an idle condition. 5. I2C devices do not support the Alert Response Address functionality (which is optional for SMBus). 6. I2C devices support block read and write differently. I2C protocol allows for unlimited number of bytes to be sent in either direction. The SMBus protocol requires that an additional data byte indicating number of bytes to read / write is transmitted. The CAP1133 supports I2C formatting only. 4.3 SMBus Protocols The CAP1133 is SMBus 2.0 compatible and supports Write Byte, Read Byte, Send Byte, and Receive Byte as valid protocols as shown below. All of the below protocols use the convention in Table 4-1. 4.3.1 SMBUS WRITE BYTE The Write Byte is used to write one byte of data to a specific register as shown in Table 4-2. 4.3.2 SMBUS READ BYTE The Read Byte protocol is used to read one byte of data from the registers as shown in Table 4-3. TABLE 4-1: PROTOCOL FORMAT Data Sent to Device Data Sent to the HOst Data sent Data sent TABLE 4-2: WRITE BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Register Data ACK Stop 1 ->0 0101_000 0 0 XXh 0 XXh 0 0 -> 1 CAP1133 DS00001625B-page 12 2015 Microchip Technology Inc. 4.3.3 SMBUS SEND BYTE The Send Byte protocol is used to set the internal address register pointer to the correct address location. No data is transferred during the Send Byte protocol as shown in Table 4-4. APPLICATION NOTE: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). 4.3.4 SMBUS RECEIVE BYTE The Receive Byte protocol is used to read data from a register when the internal register address pointer is known to be at the right location (e.g., set via Send Byte). This is used for consecutive reads of the same register as shown in Table 4-5. APPLICATION NOTE: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). 4.4 I2C Protocols The CAP1133 supports I2C Block Write and Block Read. The protocols listed below use the convention in Table 4-1. 4.4.1 BLOCK WRITE The Block Write is used to write multiple data bytes to a group of contiguous registers as shown in Table 4-6. 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. 4.4.2 BLOCK READ The Block Read is used to read multiple data bytes from a group of contiguous registers as shown in Table 4-7. APPLICATION NOTE: When using the Block Read protocol, the internal address pointer will be automatically incremented after every data byte is received. It will wrap from FFh to 00h. TABLE 4-3: READ BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data NACK Stop 1->0 0101_000 0 0 XXh 0 1 ->0 0101_000 1 0 XXh 1 0 -> 1 TABLE 4-4: SEND BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Stop 1 -> 0 0101_000 0 0 XXh 0 0 -> 1 TABLE 4-5: RECEIVE BYTE PROTOCOL Start Slave Address RD ACK Register Data NACK Stop 1 -> 0 0101_000 1 0 XXh 1 0 -> 1 TABLE 4-6: BLOCK WRITE PROTOCOL Start Slave Address WR ACK Register Address ACK Register Data ACK 1 ->0 0101_000 0 0 XXh 0 XXh 0 Register Data ACK Register Data ACK . . . Register Data ACK Stop XXh 0 XXh 0 . . . XXh 0 0 -> 1 2015 Microchip Technology Inc. DS00001625B-page 13 CAP1133 TABLE 4-7: BLOCK READ PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data 1->0 0101_000 0 0 XXh 0 1 ->0 0101_000 1 0 XXh ACK Register Data ACK Register Data ACK Register Data ACK . . . Register Data NACK Stop 0 XXh 0 XXh 0 XXh 0 . . . XXh 1 0 -> 1 CAP1133 DS00001625B-page 14 2015 Microchip Technology Inc. 5.0 GENERAL DESCRIPTION The CAP1133 is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains three (3) 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. The CAP1133 also contains three (3) low side (or push-pull) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. The CAP1133 offers multiple power states. It operates at the lowest quiescent current during its Deep Sleep state. In the low power Standby state, it can monitor one or more channels and respond to communications normally. The device communicates with a host controller using SMBus / I2C. The host controller may poll the device for updated information at any time or it may configure the device to flag an interrupt whenever a touch is detected on any sensor pad. A typical system diagram is shown in Figure 5-1. 5.1 Power States The CAP1133 has three operating states depending on the status of the STBY and DSLEEP bits. When the device transitions between power states, previously detected touches (for inactive channels) are cleared and the status bits reset. 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 6.20 through Section 6.22). Interrupts will still be generated based on the active channels. The device will still respond to communications normally and can be returned to the Fully Active state of operation by clearing the STBY bit. FIGURE 5-1: System Diagram for CAP1133 CAP1133 LED3 SMDATA SMCLK Embedded Controller VDD ALERT# LED2 LED1 CS3 CS2 CS1 Touch Button Touch Button Touch Button 3.3V – 5V 2015 Microchip Technology Inc. DS00001625B-page 15 CAP1133 3. Deep Sleep - The device is in its lowest power state. It is not monitoring any capacitive sensor inputs and not driving any LEDs. All LEDs will be driven to their programmed non-actuated state and no PWM operations will be done. While in Deep Sleep, the device can be awakened by SMBus communications targeting the device. This will not cause the DSLEEP to be cleared so the device will return to Deep Sleep once all communications have stopped. APPLICATION NOTE: In the Deep Sleep state, the LED output will be either high or low and will not be PWM’d at the min or max duty cycle. 5.2 LED Drivers The CAP1133 contains three (3) LED drivers. Each LED driver can be linked to its respective capacitive touch sensor input or it can be controlled by the host. Each LED driver can be configured to operate in one of the following modes with either push-pull or open drain drive. 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. This behavior may be actuated when a press is detected or when a release is detected. 3. Pulse 2 - The LED is configured to “Pulse” while actuated and then “Pulse” a programmable number of times with programmable rate and min / max brightness when the sensor pad is released. 4. Breathe - The LED is configured to transition continuously ON-OFF-ON (i.e. to “Breathe”) with a programmable rate and min / max brightness. When an LED is not linked to a sensor and is actuated by the host, there’s an option to assert the ALERT# pin when the initiated LED behavior has completed. 5.2.1 LINKING LEDS TO CAPACITIVE TOUCH SENSOR INPUTS All LEDs can be linked to the corresponding capacitive touch sensor input so that when the sensor input detects a touch, the corresponding LED will be actuated at one of the programmed responses. 5.3 Capacitive Touch Sensing The CAP1133 contains three (3) independent capacitive touch sensor inputs. Each sensor input has dynamic range to detect a change of capacitance due to a touch. Additionally, each sensor input can be configured to be automatically and routinely re-calibrated. 5.3.1 SENSING CYCLE Each capacitive touch sensor input has controls to be activated and included in the sensing cycle. When the device is active, it automatically initiates a sensing cycle and repeats the cycle every time it finishes. The cycle polls through each active sensor input starting with CS1 and extending through CS3. As each capacitive touch sensor input is polled, its measurement is compared against a baseline “Not Touched” measurement. If the delta measurement is large enough, a touch is detected and an interrupt is generated. The sensing cycle time is programmable (see Section 6.10, "Averaging and Sampling Configuration Register"). 5.3.2 RECALIBRATING SENSOR INPUTS There are various options for recalibrating the capacitive touch sensor inputs. Recalibration re-sets the Base Count Registers (Section 6.24, "Sensor Input Base Count Registers") which contain the “not touched” values used for touch detection comparisons. APPLICATION NOTE: The device will recalibrate all sensor inputs that were disabled when it transitions from Standby. Likewise, the device will recalibrate all sensor inputs when waking out of Deep Sleep. CAP1133 DS00001625B-page 16 2015 Microchip Technology Inc. 5.3.2.1 Manual Recalibration The Calibration Activate Registers (Section 6.11, "Calibration Activate Register") force recalibration of selected sensor inputs. When a bit is set, the corresponding capacitive touch sensor input will be recalibrated (both analog and digital). The bit is automatically cleared once the recalibration routine has finished. 5.3.2.2 Automatic Recalibration Each sensor input is regularly recalibrated at a programmable rate (see Section 6.17, "Recalibration Configuration Register"). By default, the recalibration routine stores the average 64 previous measurements and periodically updates the base “not touched” setting for the capacitive touch sensor input. 5.3.2.3 Negative Delta Count Recalibration It is possible that the device loses sensitivity to a touch. This may happen as a result of a noisy environment, an accidental recalibration during a touch, or other environmental changes. When this occurs, the base untouched sensor input may generate negative delta count values. The NEG_DELTA_CNT bits (see Section 6.17, "Recalibration Configuration Register") can be set to force a recalibration after a specified number of consecutive negative delta readings. 5.3.2.4 Delayed Recalibration It is possible that a “stuck button” occurs when something is placed on a button which causes a touch to be detected for a long period. By setting the MAX_DUR_EN bit (see Section 6.6, "Configuration Registers"), a recalibration can be forced when a touch is held on a button for longer than the duration specified in the MAX_DUR bits (see Section 6.8, "Sensor Input Configuration Register"). 5.3.3 PROXIMITY DETECTION Each sensor input can be configured to detect changes in capacitance due to proximity of a touch. This circuitry detects the change of capacitance that is generated as an object approaches, but does not physically touch, the enabled sensor pad(s). When a sensor input is selected to perform proximity detection, it will be sampled from 1x to 128x per sampling cycle. The larger the number of samples that are taken, the greater the range of proximity detection is available at the cost of an increased overall sampling time. 5.3.4 MULTIPLE TOUCH PATTERN DETECTION The multiple touch pattern (MTP) detection circuitry can be used to detect lid closure or other similar events. An event can be flagged based on either a minimum number of sensor inputs or on specific sensor inputs simultaneously exceeding an MTP threshold or having their Noise Flag Status Register bits set. An interrupt can also be generated. During an MTP event, all touches are blocked (see Section 6.15, "Multiple Touch Pattern Configuration Register"). 5.3.5 LOW FREQUENCY NOISE DETECTION Each sensor input has an EMI noise detector that will sense if low frequency noise is injected onto the input with sufficient power to corrupt the readings. If this occurs, the device will reject the corrupted sample and set the corresponding bit in the Noise Status register to a logic ‘1’. 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. Note: Automatic recalibration only works when the delta count is below the active sensor input threshold. It is disabled when a touch is detected. Note: During this recalibration, the device will not respond to touches. Note: Delayed recalibration only works when the delta count is above the active sensor input threshold. If enabled, it is invoked when a sensor pad touch is held longer than the MAX_DUR bit setting. 2015 Microchip Technology Inc. DS00001625B-page 17 CAP1133 5.3.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. 5.4 ALERT# Pin The ALERT# pin is an active low (or active high when configured) output that is driven when an interrupt event is detected. Whenever an interrupt is generated, the INT bit (see Section 6.1, "Main Control Register") is set. The ALERT# pin is cleared when the INT bit is cleared by the user. Additionally, when the INT bit is cleared by the user, status bits are only cleared if no touch is detected. 5.4.1 SENSOR INTERRUPT BEHAVIOR The sensor interrupts are generated in one of two ways: 1. An interrupt is generated when a touch is detected and, as a user selectable option, when a release is detected (by default - see Section 6.6). See Figure 5-3. 2. If the repeat rate is enabled then, so long as the touch is held, another interrupt will be generated based on the programmed repeat rate (see Figure 5-2). When the repeat rate is enabled, the device uses an additional control called MPRESS that determines whether a touch is flagged as a simple “touch” or a “press and hold”. The MPRESS[3:0] bits set a minimum press timer. When the button is touched, the timer begins. If the sensor pad is released before the minimum press timer expires, it is flagged as a touch and an interrupt is generated upon release. If the sensor input detects a touch for longer than this timer value, it is flagged as a “press and hold” event. So long as the touch is held, interrupts will be generated at the programmed repeat rate and upon release (if enabled). APPLICATION NOTE: Figure 5-2 and Figure 5-3 show default operation which is to generate an interrupt upon sensor pad release and an active-low ALERT# pin. APPLICATION NOTE: The host may need to poll the device twice to determine that a release has been detected. FIGURE 5-2: Sensor Interrupt Behavior - Repeat Rate Enabled Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Min Press Setting (280ms) Interrupt on Touch Button Repeat Rate (175ms) Button Repeat Rate (175ms) Interrupt on Release (optional) ALERT# pin (active low) CAP1133 DS00001625B-page 18 2015 Microchip Technology Inc. FIGURE 5-3: Sensor Interrupt Behavior - No Repeat Rate Enabled Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Interrupt on Touch Interrupt on Release (optional) ALERT# pin (active low) 2015 Microchip Technology Inc. DS00001625B-page 19 CAP1133 6.0 REGISTER DESCRIPTION The registers shown in Table 6-1 are accessible through the communications protocol. An entry of ‘-’ indicates that the bit is not used and will always read ‘0’. TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER Register Address R/W Register Name Function Default Value Page 00h R/W Main Control Controls general power states and power dissipation 00h Page 21 02h R General Status Stores general status bits 00h Page 22 03h R Sensor Input Status Returns the state of the sampled capacitive touch sensor inputs 00h Page 22 04h R LED Status Stores status bits for LEDs 00h Page 22 0Ah R Noise Flag Status Stores the noise flags for sensor inputs 00h Page 23 10h R Sensor Input 1 Delta Count Stores the delta count for CS1 00h Page 23 11h R Sensor Input 2 Delta Count Stores the delta count for CS2 00h Page 23 12h R Sensor Input 3 Delta Count Stores the delta count for CS3 00h Page 23 1Fh R/W Sensitivity Control Controls the sensitivity of the threshold and delta counts and data scaling of the base counts 2Fh Page 24 20h R/W Configuration Controls general functionality 20h Page 25 21h R/W Sensor Input Enable Controls whether the capacitive touch sensor inputs are sampled 07h Page 26 22h R/W Sensor Input Configuration Controls max duration and auto-repeat delay for sensor inputs operating in the full power state A4h Page 27 23h R/W Sensor Input Configuration 2 Controls the MPRESS controls for all sensor inputs 07h Page 28 24h R/W Averaging and Sampling Config Controls averaging and sampling window 39h Page 28 26h R/W Calibration Activate Forces re-calibration for capacitive touch sensor inputs 00h Page 30 27h R/W Interrupt Enable Enables Interrupts associated with capacitive touch sensor inputs 07h Page 30 28h R/W Repeat Rate Enable Enables repeat rate for all sensor inputs 07h Page 30 2Ah R/W Multiple Touch Configuration Determines the number of simultaneous touches to flag a multiple touch condition 80h Page 31 2Bh R/W Multiple Touch Pattern Configuration Determines the multiple touch pattern (MTP) configuration 00h Page 31 2Dh R/W Multiple Touch Pattern Determines the pattern or number of sensor inputs used by the MTP circuitry 07h Page 32 2Fh R/W Recalibration Configuration Determines re-calibration timing and sampling window 8Ah Page 33 30h R/W Sensor Input 1 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 1 40h Page 34 CAP1133 DS00001625B-page 20 2015 Microchip Technology Inc. 31h R/W Sensor Input 2 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 2 40h Page 34 32h R/W Sensor Input 3 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 3 40h Page 34 38h R/W Sensor Input Noise Threshold Stores controls for selecting the noise threshold for all sensor inputs 01h Page 34 Standby Configuration Registers 40h R/W Standby Channel Controls which sensor inputs are enabled while in standby 00h Page 35 41h R/W Standby Configuration Controls averaging and cycle time while in standby 39h Page 35 42h R/W Standby Sensitivity Controls sensitivity settings used while in standby 02h Page 36 43h R/W Standby Threshold Stores the touch detection threshold for active sensor inputs in standby 40h Page 37 44h R/W Configuration 2 Stores additional configuration controls for the device 40h Page 25 Base Count Registers 50h R Sensor Input 1 Base Count Stores the reference count value for sensor input 1 C8h Page 37 51h R Sensor Input 2 Base Count Stores the reference count value for sensor input 2 C8h Page 37 52h R Sensor Input 3 Base Count Stores the reference count value for sensor input 3 C8h Page 37 LED Controls 71h R/W LED Output Type Controls the output type for the LED outputs 00h Page 38 72h R/W Sensor Input LED Linking Controls linking of sensor inputs to LED channels 00h Page 38 73h R/W LED Polarity Controls the output polarity of LEDs 00h Page 38 74h R/W LED Output Control Controls the output state of the LEDs 00h Page 39 77h R/W Linked LED Transition Control Controls the transition when LEDs are linked to CS channels 00h Page 40 79h R/W LED Mirror Control Controls the mirroring of duty cycles for the LEDs 00h Page 41 81h R/W LED Behavior 1 Controls the behavior and response of LEDs 1 - 3 00h Page 41 84h R/W LED Pulse 1 Period Controls the period of each breathe during a pulse 20h Page 43 85h R/W LED Pulse 2 Period Controls the period of the breathing during breathe and pulse operation 14h Page 45 86h R/W LED Breathe Period Controls the period of an LED breathe operation 5Dh Page 46 88h R/W LED Config Controls LED configuration 04h Page 46 90h R/W LED Pulse 1 Duty Cycle Determines the min and max duty cycle for the pulse operation F0h Page 47 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page 2015 Microchip Technology Inc. DS00001625B-page 21 CAP1133 During Power-On-Reset (POR), the default values are stored in the registers. A POR is initiated when power is first applied to the part and the voltage on the VDD supply surpasses the POR level as specified in the electrical characteristics. Any reads to undefined registers will return 00h. Writes to undefined registers will not have an effect. When a bit is “set”, this means that the user writes a logic ‘1’ to it. When a bit is “cleared”, this means that the user writes a logic ‘0’ to it. 6.1 Main Control Register The Main Control register controls the primary power state of the device. Bits 7 - 6 - GAIN[1:0] - Controls the gain used by the capacitive touch sensing circuitry. As the gain is increased, the effective sensitivity is likewise increased as a smaller delta capacitance is required to generate the same delta count values. The sensitivity settings may need to be adjusted along with the gain settings such that data overflow does not occur. APPLICATION NOTE: The gain settings apply to both Standby and Active states. 91h R/W LED Pulse 2 Duty Cycle Determines the min and max duty cycle for breathe and pulse operation F0h Page 47 92h R/W LED Breathe Duty Cycle Determines the min and max duty cycle for the breathe operation F0h Page 47 93h R/W LED Direct Duty Cycle Determines the min and max duty cycle for Direct mode LED operation F0h Page 47 94h R/W LED Direct Ramp Rates Determines the rising and falling edge ramp rates of the LEDs 00h Page 47 95h R/W LED Off Delay Determines the off delay for all LED behaviors 00h Page 48 B1h R Sensor Input 1 Calibration Stores the upper 8-bit calibration value for sensor input 1 00h Page 51 B2h R Sensor Input 2 Calibration Stores the upper 8-bit calibration value for sensor input 2 00h Page 51 B3h R Sensor Input 3 Calibration Stores the upper 8-bit calibration value for sensor input 3 00h Page 51 B9h R Sensor Input Calibration LSB 1 Stores the 2 LSBs of the calibration value for sensor inputs 1 - 3 00h Page 51 FDh R Product ID Stores a fixed value that identifies each product 54h Page 51 FEh R Manufacturer ID Stores a fixed value that identifies Microchip 5Dh Page 52 FFh R Revision Stores a fixed value that represents the revision number 83h Page 52 TABLE 6-2: MAIN CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 00h R/W Main Control GAIN[1:0] STBY DSLEEP - - - INT 00h TABLE 6-3: GAIN BIT DECODE GAIN[1:0] Capacitive Touch Sensor Gain 1 0 0 0 1 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page CAP1133 DS00001625B-page 22 2015 Microchip Technology Inc. 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 6.20). The status registers will not be cleared until read. LEDs that are linked to capacitive touch sensor inputs will remain linked and active. Sensor inputs that are no longer sampled will flag a release and then remain in a non-touched state. LEDs that are manually controlled will be unaffected. • Bit 4 - DSLEEP - Enables Deep Sleep by deactivating all functions. ‘0’ (default) - Sensor input scanning is active and LEDs are functional. • ‘1’ - All sensor input scanning is disabled. All LEDs are driven to their programmed non-actuated state and no PWM operations will be done. The status registers are automatically cleared and the INT bit is cleared. Bit 0 - INT - Indicates that there is an interrupt. When this bit is set, it asserts the ALERT# pin. If a channel detects a touch and its associated interrupt enable bit is not set to a logic ‘1’, no action is taken. This bit is cleared by writing a logic ‘0’ to it. When this bit is cleared, the ALERT# pin will be deasserted and all status registers will be cleared if the condition has been removed. • ‘0’ - No interrupt pending. • ‘1’ - A touch has been detected on one or more channels and the interrupt has been asserted. 6.2 Status Registers All status bits are cleared when the device enters the Deep Sleep (DSLEEP = ‘1’ - see Section 6.1). 6.2.1 GENERAL STATUS - 02H Bit 4 - LED - Indicates that one or more LEDs have finished their programmed activity. This bit is set if any bit in the LED Status register is set. Bit 2 - MULT - Indicates that the device is blocking detected touches due to the Multiple Touch detection circuitry (see Section 6.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 6.15). This bit will cause the INT bit to be set if the MTP_ALERT bit is also set. This bit will not be cleared until the condition that caused it to be set has been removed. Bit 0 - TOUCH - Indicates that a touch was detected. This bit is set if any bit in the Sensor Input Status register is set. 6.2.2 SENSOR INPUT STATUS - 03H The Sensor Input Status Register stores status bits that indicate a touch has been detected. A value of ‘0’ in any bit indicates that no touch has been detected. A value of ‘1’ in any bit indicates that a touch has been detected. 01 2 10 4 11 8 TABLE 6-4: STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 02h R General Status - - - LED - MULT MTP TOUCH 00h 03h R Sensor Input Status - - - - - CS3 CS2 CS1 00h 04h R LED Status - - - - - LED3_ DN LED2_ DN LED1_ DN 00h TABLE 6-3: GAIN BIT DECODE (CONTINUED) GAIN[1:0] Capacitive Touch Sensor Gain 1 0 2015 Microchip Technology Inc. DS00001625B-page 23 CAP1133 All bits are cleared when the INT bit is cleared and if a touch on the respective capacitive touch sensor input is no longer present. If a touch is still detected, the bits will not be cleared (but this will not cause the interrupt to be asserted - see Section 6.6). Bit 2 - CS3 - Indicates that a touch was detected on Sensor Input 3. This sensor input can be linked to LED3. Bit 1 - CS2 - Indicates that a touch was detected on Sensor Input 2. This sensor input can be linked to LED2. Bit 0 - CS1 - Indicates that a touch was detected on Sensor Input 1. This sensor input can be linked to LED1. 6.2.3 LED STATUS - 04H The LED Status Registers indicate when an LED has completed its configured behavior (see Section 6.31, "LED Behavior Register") after being actuated by the host (see Section 6.28, "LED Output Control Register"). These bits are ignored when the LED is linked to a capacitive sensor input. All LED Status bits are cleared when the INT bit is cleared. 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. 6.3 Noise Flag Status Registers The Noise Flag Status registers store status bits that are generated from the analog block if the detected noise is above the operating region of the analog detector or the RF noise detector. These bits indicate that the most recently received data from the sensor input is invalid and should not be used for touch detection. So long as the bit is set for a particular channel, the delta count value is reset to 00h and thus no touch is detected. These bits are not sticky and will be cleared automatically if the analog block does not report a noise error. APPLICATION NOTE: If the MTP detection circuitry is enabled, these bits count as sensor inputs above the MTP threshold (see Section 5.3.4, "Multiple Touch Pattern Detection") even if the corresponding delta count is not. If the corresponding delta count also exceeds the MTP threshold, it is not counted twice. APPLICATION NOTE: Regardless of the state of the Noise Status bits, if low frequency noise is detected on a sensor input, that sample will be discarded unless the DIS_ANA_NOISE bit is set. As well, if RF noise is detected on a sensor input, that sample will be discarded unless the DIS_RF_NOISE bit is set. 6.4 Sensor Input Delta Count Registers 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. The count value represents a change in input due to the capacitance associated with a touch on one of the sensor inputs and is referenced to a calibrated base “Not Touched” count value. The delta is an instantaneous change and is updated once per sensor input per sensing cycle (see Section 5.3.1, "Sensing Cycle"). TABLE 6-5: NOISE FLAG STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 0Ah R Noise Flag Status - - - CS3_ NOISE CS2_ NOISE CS1_ NOISE 00h TABLE 6-6: SENSOR INPUT DELTA COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 10h R Sensor Input 1 Delta Count Sign 64 32 16 8 4 2 1 00h 11h R Sensor Input 2 Delta Count Sign 64 32 16 8 4 2 1 00h 12h R Sensor Input 3 Delta Count Sign 64 32 16 8 4 2 1 00h CAP1133 DS00001625B-page 24 2015 Microchip Technology Inc. The value presented is a standard 2’s complement number. In addition, the value is capped at a value of 7Fh. A reading of 7Fh indicates that the sensitivity settings are too high and should be adjusted accordingly (see Section 6.5). The value is also capped at a negative value of 80h for negative delta counts which may result upon a release. 6.5 Sensitivity Control Register The Sensitivity Control register controls the sensitivity of a touch detection. Bits 6-4 DELTA_SENSE[2:0] - Controls the sensitivity of a touch detection. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the more sensitive settings, touches are detected for a smaller delta capacitance corresponding to a “lighter” touch. These settings are more sensitive to noise, however, and a noisy environment may flag more false touches with higher sensitivity levels. APPLICATION NOTE: A value of 128x is the most sensitive setting available. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely, a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 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. The scale factor represents the multiplier to the bit-weighting presented in these register descriptions. APPLICATION NOTE: The BASE_SHIFT[3:0] bits normally do not need to be updated. These settings will not affect touch detection or sensitivity. These bits are sometimes helpful in analyzing the Cap Sensing board performance and stability. TABLE 6-7: SENSITIVITY CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 1Fh R/W Sensitivity Control - DELTA_SENSE[2:0] BASE_SHIFT[3:0] 2Fh TABLE 6-8: DELTA_SENSE BIT DECODE DELTA_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-9: BASE_SHIFT BIT DECODE BASE_SHIFT[3:0] Data Scaling Factor 32 1 0 0 0 0 0 1x 0 0 0 1 2x 0 0 1 0 4x 0 0 1 1 8x 2015 Microchip Technology Inc. DS00001625B-page 25 CAP1133 6.6 Configuration Registers The Configuration registers control general global functionality that affects the entire device. 6.6.1 CONFIGURATION - 20H Bit 7 - TIMEOUT - Enables the timeout and idle functionality of the SMBus protocol. • ‘0’ (default for Functional Revision C) - The SMBus timeout and idle functionality are disabled. The SMBus interface will not time out if the clock line is held low. Likewise, it will not reset if both the data and clock lines are held high for longer than 200us. This is used for I2C compliance. • ‘1’ (default for Functional Revision B) - The SMBus timeout and idle functionality are enabled. The SMBus interface will time out if the clock line is held low for longer than 30ms. Likewise, it will reset if both the data and clock lines are held high for longer than 200us. Bit 5 - DIS_DIG_NOISE - Determines whether the digital noise threshold (see Section 6.19, "Sensor Input Noise Threshold Register") is used by the device. Setting this bit disables the feature. • ‘0’ - The digital noise threshold is used. If a delta count value exceeds the noise threshold but does not exceed the touch threshold, the sample is discarded and not used for the automatic re-calibration routine. • ‘1’ (default) - The noise threshold is disabled. Any delta count that is less than the touch threshold is used for the automatic re-calibration routine. Bit 4 - DIS_ANA_NOISE - Determines whether the analog noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If low frequency noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if low frequency noise is detected. Bit 3 - MAX_DUR_EN - Determines whether the maximum duration recalibration is enabled. • ‘0’ (default) - The maximum duration recalibration functionality is disabled. A touch may be held indefinitely and no re-calibration will be performed on any sensor input. • ‘1’ - The maximum duration recalibration functionality is enabled. If a touch is held for longer than the MAX_DUR bit settings, then the re-calibration routine will be restarted (see Section 6.8). 0 1 0 0 16x 0 1 0 1 32x 0 1 1 0 64x 0 1 1 1 128x 1 0 0 0 256x All others 256x (default = 1111b) TABLE 6-10: CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 20h R/W Configuration TIMEOUT - DIS_ DIG_ NOISE DIS_ ANA_ NOISE MAX_ DUR_EN - -- A0h (Rev B) 20h (rev C) 44h R/W Configuration 2 INV_LINK_ TRAN ALT_ POL BLK_PWR_ CTRL BLK_POL_ MIR SHOW_ RF_ NOISE DIS_ RF_ NOISE - INT_ REL_n 40h TABLE 6-9: BASE_SHIFT BIT DECODE (CONTINUED) BASE_SHIFT[3:0] Data Scaling Factor 32 1 0 CAP1133 DS00001625B-page 26 2015 Microchip Technology Inc. 6.6.2 CONFIGURATION 2 - 44H Bit 7 - INV_LINK_TRAN - Determines the behavior of the Linked LED Transition controls (see Section 6.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. • ‘0’ - The ALERT# pin is active high and push-pull. • ‘1’ (default) - The ALERT# pin is active low and open drain. Bit 5 - BLK_PWR_CTRL - Determines whether the device will reduce power consumption while waiting between conversion time completion and the end of the polling cycle. • ‘0’ (default) - The device will always power down as much as possible during the time between the end of the last conversion and the end of the polling cycle. • ‘1’ - The device will not power down the Cap Sensor during the time between the end of the last conversion and the end of the polling cycle. Bit 4 - BLK_POL_MIR - Determines whether the LED Mirror Control register bits are linked to the LED Polarity bits. Setting this bit blocks the normal behavior which is to automatically set and clear the LED Mirror Control bits when the LED Polarity bits are set or cleared. • ‘0’ (default) - When the LED Polarity controls are set, the corresponding LED Mirror control is automatically set. Likewise, when the LED Polarity controls are cleared, the corresponding LED Mirror control is also cleared. • ‘1’ - When the LED Polarity controls are set, the corresponding LED Mirror control is not automatically set. Bit 3 - SHOW_RF_NOISE - Determines whether the Noise Status bits will show RF Noise as the only input source. • ‘0’ (default) - The Noise Status registers will show both RF noise and low frequency EMI noise if either is detected on a capacitive touch sensor input. • ‘1’ - The Noise Status registers will only show RF noise if it is detected on a capacitive touch sensor input. EMI noise will still be detected and touches will be blocked normally; however, the status bits will not be updated. Bit 2 - DIS_RF_NOISE - Determines whether the RF noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If RF noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if RF noise is detected. Bit 0 - INT_REL_n - Controls the interrupt behavior when a release is detected on a button. • ‘0’ (default) - An interrupt is generated when a press is detected and again when a release is detected and at the repeat rate (if enabled - see Section 6.13). • ‘1’ - An interrupt is generated when a press is detected and at the repeat rate but not when a release is detected. 6.7 Sensor Input Enable Registers 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. Bit 2 - CS3_EN - Enables the CS3 input to be included during the sampling cycle. • ‘0’ - The CS3 input is not included in the sampling cycle. • ‘1’ (default) - The CS3 input is included in the sampling cycle. Bit 1 - CS2_EN - Enables the CS2 input to be included during the sampling cycle. Bit 0 - CS1_EN - Enables the CS1 input to be included during the sampling cycle. TABLE 6-11: SENSOR INPUT ENABLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 21h R/W Sensor Input Enable - - - - - CS3_EN CS2_EN CS1_EN 07h 2015 Microchip Technology Inc. DS00001625B-page 27 CAP1133 6.8 Sensor Input Configuration Register The Sensor Input Configuration Register controls timings associated with the Capacitive sensor inputs 1 - 3. Bits 7 - 4 - MAX_DUR[3:0] - (default 1010b) - Determines the maximum time that a sensor pad is allowed to be touched until the capacitive touch sensor input is recalibrated, as shown in Table 6-13. Bits 3 - 0 - RPT_RATE[3:0] - (default 0100b) Determines the time duration between interrupt assertions when auto repeat is enabled. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-14. TABLE 6-12: SENSOR INPUT CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 22h R/W Sensor Input Configuration MAX_DUR[3:0] RPT_RATE[3:0] A4h TABLE 6-13: MAX_DUR BIT DECODE MAX_DUR[3:0] Time Before Recalibration 32 1 0 0 0 0 0 560ms 0 0 0 1 840ms 0 0 1 0 1120ms 0 0 1 1 1400ms 0 1 0 0 1680ms 0 1 0 1 2240ms 0 1 1 0 2800ms 1 1 1 3360ms 1 0 0 0 3920ms 1 0 0 1 4480ms 1 0 1 0 5600ms (default) 1 0 1 1 6720ms 1 1 0 0 7840ms 1 1 0 1 8906ms 1 1 1 0 10080ms 1 1 1 1 11200ms TABLE 6-14: RPT_RATE BIT DECODE RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms (default) 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms 1 0 0 0 315ms 1 0 0 1 350ms 1 0 1 0 385ms CAP1133 DS00001625B-page 28 2015 Microchip Technology Inc. 6.9 Sensor Input Configuration 2 Register Bits 3 - 0 - M_PRESS[3:0] - (default 0111b) - Determines the minimum amount of time that sensor inputs configured to use auto repeat must detect a sensor pad touch to detect a “press and hold” event. If the sensor input detects a touch for longer than the M_PRESS[3:0] settings, a “press and hold” event is detected. If a sensor input detects a touch for less than or equal to the M_PRESS[3:0] settings, a touch event is detected. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-16. 6.10 Averaging and Sampling Configuration Register 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 TABLE 6-15: SENSOR INPUT CONFIGURATION 2 REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 23h R/W Sensor Input Configuration 2 - - - - M_PRESS[3:0] 07h TABLE 6-16: M_PRESS BIT DECODE M_PRESS[3:0] M_PRESS SETTINGS 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms (default) 1 0 0 0 315ms 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 TABLE 6-17: AVERAGING AND SAMPLING CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 24h R/W Averaging and Sampling Config AVG[2:0] SAMP_TIME[1:0] CYCLE_TIME [1:0] 39h TABLE 6-14: RPT_RATE BIT DECODE (CONTINUED) RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 2015 Microchip Technology Inc. DS00001625B-page 29 CAP1133 The Averaging and Sampling Configuration register controls the number of samples taken and the total sensor input cycle time for all active sensor inputs while the device is functioning in Active state. Bits 6 - 4 - AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-18. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. For example, if CS1, CS2, and CS3 are sampled during the sensor cycle, and the AVG[2:0] bits are set to take 4 samples per channel, then the full sensor cycle will be: CS1, CS1, CS1, CS1, CS2, CS2, CS2, CS2, CS3, CS3, CS3, CS3. Bits 3 - 2 - SAMP_TIME[1:0] - Determines the time to take a single sample as shown in Table 6-19. Bits 1 - 0 - CYCLE_TIME[1:0] - Determines the overall cycle time for all measured channels during normal operation as shown in Table 6-20. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, then the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. TABLE 6-18: AVG BIT DECODE AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-19: SAMP_TIME BIT DECODE SAMP_TIME[1:0] Sample Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-20: CYCLE_TIME BIT DECODE CYCLE_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms CAP1133 DS00001625B-page 30 2015 Microchip Technology Inc. 6.11 Calibration Activate Register The Calibration Activate register forces the respective sensor inputs to be re-calibrated affecting both the analog and digital blocks. During the re-calibration routine, the sensor inputs will not detect a press for up to 600ms and the Sensor Input Base Count register values will be invalid. During this time, any press on the corresponding sensor pads will invalidate the re-calibration. When finished, the CALX[9:0] bits will be updated (see Section 6.39). When the corresponding bit is set, the device will perform the calibration and the bit will be automatically cleared once the re-calibration routine has finished. Bit 2 - CS3_CAL - When set, the CS3 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 1 - CS2_CAL - When set, the CS2 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 0 - CS1_CAL - When set, the CS1 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. 6.12 Interrupt Enable Register The Interrupt Enable register determines whether a sensor pad touch or release (if enabled) causes the interrupt pin to be asserted. Bit 2 - CS3_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS3 (associated with the CS3 status bit). • ‘0’ - The interrupt pin will not be asserted if a touch is detected on CS3 (associated with the CS6 status bit). • ‘1’ (default) - The interrupt pin will be asserted if a touch is detected on CS3 (associated with the CS6 status bit). Bit 1 - CS2_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS2 (associated with the CS2 status bit). Bit 0 - CS1_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS1 (associated with the CS1 status bit). 6.13 Repeat Rate Enable Register The Repeat Rate Enable register enables the repeat rate of the sensor inputs as described in Section 5.4.1. Bit 2 - CS3_RPT_EN - Enables the repeat rate for capacitive touch sensor input 3. • ‘0’ - The repeat rate for CS3 is disabled. It will only generate an interrupt when a touch is detected and when a release is detected no matter how long the touch is held for. • ‘1’ (default) - The repeat rate for CS3 is enabled. In the case of a “touch” event, it will generate an interrupt when a touch is detected and a release is detected (as determined by the INT_REL_n bit - see Section 6.6). In the case of a “press and hold” event, it will generate an interrupt when a touch is detected and at the repeat rate so long as TABLE 6-21: CALIBRATION ACTIVATE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 26h R/W Calibration Activate --- CS3_ CAL CS2_ CAL CS1_ CAL 00h TABLE 6-22: INTERRUPT ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 27h R/W Interrupt Enable --- CS3_ INT_EN CS2_ INT_EN CS1_ INT_EN 07h TABLE 6-23: REPEAT RATE ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 28h R/W Repeat Rate Enable ---- - CS3_ RPT_EN CS2_ RPT_EN CS1_ RPT_EN 07h 2015 Microchip Technology Inc. DS00001625B-page 31 CAP1133 the touch is held d. Bit 1 - CS2_RPT_EN - Enables the repeat rate for capacitive touch sensor input 2. Bit 0 - CS1_RPT_EN - Enables the repeat rate for capacitive touch sensor input 1. 6.14 Multiple Touch Configuration Register The Multiple Touch Configuration register controls the settings for the multiple touch detection circuitry. These settings determine the number of simultaneous buttons that may be pressed before additional buttons are blocked and the MULT status bit is set. Bit 7 - MULT_BLK_EN - Enables the multiple button blocking circuitry. • ‘0’ - The multiple touch circuitry is disabled. The device will not block multiple touches. • ‘1’ (default) - The multiple touch circuitry is enabled. The device will flag the number of touches equal to programmed multiple touch threshold and block all others. It will remember which sensor inputs are valid and block all others until that sensor pad has been released. Once a sensor pad has been released, the N detected touches (determined via the cycle order of CS1 - CS3) will be flagged and all others blocked. Bits 3 - 2 - B_MULT_T[1:0] - Determines the number of simultaneous touches on all sensor pads before a Multiple Touch Event is detected and sensor inputs are blocked. The bit decode is given by Table 6-25. 6.15 Multiple Touch Pattern Configuration Register The Multiple Touch Pattern Configuration register controls the settings for the multiple touch pattern detection circuitry. This circuitry works like the multiple touch detection circuitry with the following differences: 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. The MTP detection circuitry either will detect a specific pattern of sensor inputs as determined by the Multiple Touch Pattern register settings or it will use the Multiple Touch Pattern register settings to determine a minimum number of sensor inputs that will cause the MTP circuitry to flag an event. When using pattern recognition mode, if all of the sensor inputs set by the Multiple Touch Pattern register have a delta count greater than the MTP threshold or have their corresponding Noise Flag Status bits set, the MTP bit will be set. When using the absolute number mode, if the number of sensor inputs with thresholds above the MTP threshold or with Noise Flag Status bits set is equal to or greater than this number, the MTP bit will be set. 3. When an MTP event occurs, all touches are blocked and an interrupt is generated. TABLE 6-24: MULTIPLE TOUCH CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Ah R/W Multiple Touch Config MULT_ BLK_ EN - - - B_MULT_T[1:0] - - 80h TABLE 6-25: B_MULT_T BIT DECODE B_MULT_T[1:0] Number of Simultaneous Touches 1 0 0 0 1 (default) 01 2 10 3 11 3 TABLE 6-26: MULTIPLE TOUCH PATTERN CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Bh R/W Multiple Touch Pattern Config MTP_ EN - - MTP_TH[1:0] COMP_ PTRN MTP_ ALERT 00h CAP1133 DS00001625B-page 32 2015 Microchip Technology Inc. 4. All sensor inputs will remain blocked so long as the requisite number of sensor inputs are above the MTP threshold or have Noise Flag Status bits set. Once this condition is removed, touch detection will be restored. Note that the MTP status bit is only cleared by writing a ‘0’ to the INT bit once the condition has been removed. Bit 7 - MTP_EN - Enables the multiple touch pattern detection circuitry. • ‘0’ (default) - The MTP detection circuitry is disabled. • ‘1’ - The MTP detection circuitry is enabled. Bits 3-2 - MTP_TH[1:0] - Determine the MTP threshold, as shown in Table 6-27. This threshold is a percentage of sensor input threshold (see Section 6.18, "Sensor Input Threshold Registers") when the device is in the Fully Active state or of the standby threshold (see Section 6.23, "Standby Threshold Register") when the device is in the Standby state. Bit 1 - COMP_PTRN - Determines whether the MTP detection circuitry will use the Multiple Touch Pattern register as a specific pattern of sensor inputs or as an absolute number of sensor inputs. • ‘0’ (default) - The MTP detection circuitry will use the Multiple Touch Pattern register bit settings as an absolute minimum number of sensor inputs that must be above the threshold or have Noise Flag Status bits set. The number will be equal to the number of bits set in the register. • ‘1’ - The MTP detection circuitry will use pattern recognition. Each bit set in the Multiple Touch Pattern register indicates a specific sensor input that must have a delta count greater than the MTP threshold or have a Noise Flag Status bit set. If the criteria are met, the MTP status bit will be set. Bit 0 - MTP_ALERT - Enables an interrupt if an MTP event occurs. In either condition, the MTP status bit will be set. • ‘0’ (default) - If an MTP event occurs, the ALERT# pin is not asserted. • ‘1’ - If an MTP event occurs, the ALERT# pin will be asserted. 6.16 Multiple Touch Pattern Register The Multiple Touch Pattern register acts as a pattern to identify an expected sensor input profile for diagnostics or other significant events. There are two methods for how the Multiple Touch Pattern register is used: as specific sensor inputs or number of sensor input that must exceed the MTP threshold or have Noise Flag Status bits set. Which method is used is based on the COMP_PTRN bit (see Section 6.15). The methods are described below. 1. Specific Sensor Inputs: If, during a single polling cycle, the specific sensor inputs above the MTP threshold or with Noise Flag Status bits set match those bits set in the Multiple Touch Pattern register, an MTP event is flagged. 2. Number of Sensor Inputs: If, during a single polling cycle, the number of sensor inputs with a delta count above the MTP threshold or with Noise Flag Status bits set is equal to or greater than the number of pattern bits set, an MTP event is flagged. Bit 2 - CS3_PTRN - Determines whether CS3 is considered as part of the Multiple Touch Pattern. • ‘0’ - CS3 is not considered a part of the pattern. • ‘1’ - CS3 is considered a part of the pattern or the absolute number of sensor inputs that must have a delta count greater than the MTP threshold or have the Noise Flag Status bit set is increased by 1. TABLE 6-27: MTP_TH BIT DECODE MTP_TH[1:0] Threshold Divide Setting 1 0 0 0 12.5% (default) 0 1 25% 1 0 37.5% 1 1 100% TABLE 6-28: MULTIPLE TOUCH PATTERN REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Dh R/W Multiple Touch Pattern --- CS3_ PTRN CS2_ PTRN CS1_ PTRN 07h 2015 Microchip Technology Inc. DS00001625B-page 33 CAP1133 Bit 1 - CS2_PTRN - Determines whether CS2 is considered as part of the Multiple Touch Pattern. Bit 0 - CS1_PTRN - Determines whether CS1 is considered as part of the Multiple Touch Pattern. 6.17 Recalibration Configuration Register The Recalibration Configuration register controls the automatic re-calibration routine settings as well as advanced controls to program the Sensor Input Threshold register settings. 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 3). The individual Sensor Input X Threshold registers (Sensor Input 2 Threshold and Sensor Input 3 Threshold) can be individually updated at any time. Bit 6 - NO_CLR_INTD - Controls whether the accumulation of intermediate data is cleared if the noise status bit is set. • ‘0’ (default) - The accumulation of intermediate data is cleared if the noise status bit is set. • ‘1’ - The accumulation of intermediate data is not cleared if the noise status bit is set. APPLICATION NOTE: Bits 5 and 6 should both be set to the same value. Either both should be set to ‘0’ or both should be set to ‘1’. Bit 5 - NO_CLR_NEG - Controls whether the consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘0’ (default) - The consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘1’ - The consecutive negative delta counts counter is not cleared if the noise status bit is set. Bits 4 - 3 - NEG_DELTA_CNT[1:0] - Determines the number of negative delta counts necessary to trigger a digital recalibration as shown in Table 6-30. Bits 2 - 0 - CAL_CFG[2:0] - Determines the update time and number of samples of the automatic re-calibration routine. The settings apply to all sensor inputs universally (though individual sensor inputs can be configured to support re-calibration - see Section 6.11). TABLE 6-29: RECALIBRATION CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Fh R/W Recalibration Configuration BUT_ LD_TH NO_ CLR_ INTD NO_ CLR_ NEG NEG_DELTA_ CNT[1:0] CAL_CFG[2:0] 8Ah TABLE 6-30: NEG_DELTA_CNT BIT DECODE NEG_DELTA_CNT[1:0] Number of Consecutive Negative Delta Count Values 1 0 00 8 0 1 16 (default) 1 0 32 1 1 None (disabled) TABLE 6-31: CAL_CFG BIT DECODE CAL_CFG[2:0] Recalibration Samples (see Note 6-1) Update Time (see Note 6-2) 210 0 0 0 16 16 0 0 1 32 32 CAP1133 DS00001625B-page 34 2015 Microchip Technology Inc. Note 6-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 6-2 Update Time refers to the amount of time (in polling cycle periods) that elapses before the Base Count is updated. The time will depend upon the number of channels active, the averaging setting, and the programmed cycle time. 6.18 Sensor Input Threshold Registers The Sensor Input Threshold registers store the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. When the BUT_LD_TH bit is set (see Section 6.17 - bit 7), writing data to the Sensor Input 1 Threshold register will update all of the sensor input threshold registers (31h - 32h inclusive). 6.19 Sensor Input Noise Threshold Register The Sensor Input Noise Threshold register controls the value of a secondary internal threshold to detect noise and improve the automatic recalibration routine. If a capacitive touch sensor input exceeds the Sensor Input Noise Threshold but does not exceed the sensor input threshold, it is determined to be caused by a noise spike. That sample is not used by the automatic re-calibration routine. This feature can be disabled by setting the DIS_DIG_NOISE bit. Bits 1-0 - CS1_BN_TH[1:0] - Controls the noise threshold for all capacitive touch sensor inputs, as shown in Table 6-34. The threshold is proportional to the threshold setting. 0 1 0 64 64 (default) 0 1 1 128 128 1 0 0 256 256 1 0 1 256 1024 1 1 0 256 2048 1 1 1 256 4096 TABLE 6-32: SENSOR INPUT THRESHOLD REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 30h R/W Sensor Input 1 Threshold - 64 32 16 8 4 2 1 40h 31h R/W Sensor Input 2 Threshold - 64 32 16 8 4 2 1 40h 32h R/W Sensor Input 3 Threshold - 64 32 16 8 4 2 1 40h TABLE 6-33: SENSOR INPUT NOISE THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 38h R/W Sensor Input Noise Threshold CS_BN_TH [1:0] 01h TABLE 6-31: CAL_CFG BIT DECODE (CONTINUED) CAL_CFG[2:0] Recalibration Samples (see Note 6-1) Update Time (see Note 6-2) 210 2015 Microchip Technology Inc. DS00001625B-page 35 CAP1133 6.20 Standby Channel Register The Standby Channel register controls which (if any) capacitive touch sensor inputs are active during Standby. Bit 2 - CS3_STBY - Controls whether the CS3 channel is active in Standby. • ‘0’ (default) - The CS3 channel not be sampled during Standby mode. • ‘1’ - The CS3 channel will be sampled during Standby Mode. It will use the Standby threshold setting, and the standby averaging and sensitivity settings. 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. 6.21 Standby Configuration Register The Standby Configuration register controls averaging and cycle time for those sensor inputs that are active in Standby. This register is useful for detecting proximity on a small number of sensor inputs as it allows the user to change averaging and sample times on a limited number of sensor inputs and still maintain normal functionality in the fully active state. Bit 7 - AVG_SUM - Determines whether the active sensor inputs will average the programmed number of samples or whether they will accumulate for the programmed number of samples. • ‘0’ - (default) - The active sensor input delta count values will be based on the average of the programmed number of samples when compared against the threshold. • ‘1’ - The active sensor input delta count values will be based on the summation of the programmed number of samples when compared against the threshold. This bit should only be set when performing proximity detection as a physical touch will overflow the delta count registers and may result in false readings. Bits 6 - 4 - STBY_AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-37. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. TABLE 6-34: CSX_BN_TH BIT DECODE CS_BN_TH[1:0] Percent Threshold Setting 1 0 0 0 25% 0 1 37.5% (default) 1 0 50% 1 1 62.5% TABLE 6-35: STANDBY CHANNEL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 40h R/W Standby Channel - - - - - CS3_ STBY CS2_ STBY CS1_ STBY 00h TABLE 6-36: STANDBY CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 41h R/W Standby Configuration AVG_ SUM STBY_AVG[2:0] STBY_SAMP_ TIME[1:0] STBY_CY_TIME [1:0] 39h TABLE 6-37: STBY_AVG BIT DECODE STBY_AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 CAP1133 DS00001625B-page 36 2015 Microchip Technology Inc. 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 6-38. Bits 1 - 0 - STBY_CY_TIME[2:0] - Determines the overall cycle time for all measured channels during standby operation as shown in Table 6-39. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The STBY_AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. 6.22 Standby Sensitivity Register The Standby Sensitivity register controls the sensitivity for sensor inputs that are active in Standby. 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-38: STBY_SAMP_TIME BIT DECODE STBY_SAMP_TIME[1:0] Sampling Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-39: STBY_CY_TIME BIT DECODE STBY_CY_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms TABLE 6-40: STANDBY SENSITIVITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 42h R/W Standby Sensitivity - - - - - STBY_SENSE[2:0] 02h TABLE 6-37: STBY_AVG BIT DECODE (CONTINUED) STBY_AVG[2:0] Number of Samples Taken per Measurement 2 10 2015 Microchip Technology Inc. DS00001625B-page 37 CAP1133 Bits 2 - 0 - STBY_SENSE[2:0] - Controls the sensitivity for sensor inputs that are active in Standby. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the 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. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 6.23 Standby Threshold Register The Standby Threshold register stores the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. 6.24 Sensor Input Base Count Registers The Sensor Input Base Count registers store the calibrated “Not Touched” input value from the capacitive touch sensor inputs. These registers are periodically updated by the re-calibration routine. The routine uses an internal adder to add the current count value for each reading to the sum of the previous readings until sample size has been reached. At this point, the upper 16 bits are taken and used as the Sensor Input Base Count. The internal adder is then reset and the re-calibration routine continues. TABLE 6-41: STBY_SENSE BIT DECODE STBY_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-42: STANDBY THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 43h R/W Standby Threshold - 64 32 16 8 4 2 1 40h TABLE 6-43: SENSOR INPUT BASE COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 50h R Sensor Input 1 Base Count 128 64 32 16 8 4 2 1 C8h 51h R Sensor Input 2 Base Count 128 64 32 16 8 4 2 1 C8h 52h R Sensor Input 3 Base Count 128 64 32 16 8 4 2 1 C8h CAP1133 DS00001625B-page 38 2015 Microchip Technology Inc. The data presented is determined by the BASE_SHIFT[3:0] bits (see Section 6.5). 6.25 LED Output Type Register The LED Output Type register controls the type of output for the LED pins. Each pin is controlled by a single bit. Refer to application note 21.4 CAP1133Family LED Configuration Options for more information about implementing LEDs. Bit 2 - LED3_OT - Determines the output type of the LED3 pin. • ‘0’ (default) - The LED3 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’), the pin will be left in a High Z state and pulled high via an external pull-up resistor. • ‘1’ - The LED3 pin is a push-pull output. When driving a logic ‘1’, the pin is driven high. When driving a logic ‘0’, the pin is driven low. Bit 1 - LED2_OT - Determines the output type of the LED2 pin. Bit 0 - LED1_OT - Determines the output type of the LED1 pin. 6.26 Sensor Input LED Linking Register The Sensor Input LED Linking register controls whether a capacitive touch sensor input is linked to an LED output. If the corresponding bit is set, then the appropriate LED output will change states defined by the LED Behavior controls (see Section 6.31) in response to the capacitive touch sensor input. 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. • ‘0’ (default) - The LED 3 output is not associated with the CS3 input. If a touch is detected on the CS3 input, the LED will not automatically be actuated. The LED is enabled and controlled via the LED Output Control register (see Section 6.28) and the LED Behavior registers (see Section 6.31). • ‘1’ - The LED 3 output is associated with the CS3 input. If a touch is detected on the CS3 input, the LED will be actuated and behave as defined in Table 6-52. 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. Bit 0 - CS1_LED1 - Links the LED1 output to a detected touch on the CS1 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. 6.27 LED Polarity Register TABLE 6-44: LED OUTPUT TYPE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 71h R/W LED Output Type ----- LED3_ OT LED2_ OT LED1_ OT 00h TABLE 6-45: SENSOR INPUT LED LINKING REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 72h R/W Sensor Input LED Linking - - - - - CS3_ LED3 CS2_ LED2 CS1_ LED1 00h TABLE 6-46: LED POLARITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 73h R/W LED Polarity - - - - - LED3_ POL LED2_ POL LED1_ POL 00h 2015 Microchip Technology Inc. DS00001625B-page 39 CAP1133 The LED Polarity register controls the logical polarity of the LED outputs. When these bits are set or cleared, the corresponding LED Mirror controls are also set or cleared (unless the BLK_POL_MIR bit is set - see Section 6.6, "Configuration Registers"). Table 6-48, "LED Polarity Behavior" shows the interaction between the polarity controls, output controls, and relative brightness. APPLICATION NOTE: The polarity controls determine the final LED pin drive. A touch on a linked capacitive touch sensor input is treated in the same way as the LED Output Control bit being set to a logic ‘1’. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’ then the LED will be on and that the CAP1133 LED pin is sinking the LED current. Conversely, if the LED pin is driven to a logic ‘1’, the LED will be off and there is no current flow. See Figure 5-1, "System Diagram for CAP1133". APPLICATION NOTE: This application note applies when the LED polarity is inverted (LEDx_POL = ‘0’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘0’ state in. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven low (i.e. maximum % of time that the LED is on) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven low (i.e. minimum % of time that the LED is on). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at the minimum duty cycle setting. Breathe operations will ramp the duty cycle from the minimum duty cycle to the maximum duty cycle. APPLICATION NOTE: This application note applies when the LED polarity is non-inverted (LEDx_POL = ‘1’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘1’ state. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven high (i.e. maximum % of time that the LED is off) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven high (i.e. minimum % of time that the LED is off). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at 100 minus the minimum duty cycle setting. Breathe operations will ramp the duty cycle from 100 minus the minimum duty cycle to 100 minus the maximum duty cycle. APPLICATION NOTE: The LED Mirror controls (see Section 6.30, "LED Mirror Control Register") work with the polarity controls with respect to LED brightness but will not have a direct effect on the output pin drive. Bit 2 - LED3_POL - Determines the polarity of the LED3 output. • ‘0’ (default) - The LED3 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 LED3 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 Bit 1 - LED2_POL - Determines the polarity of the LED2 output. Bit 0 - LED1_POL - Determines the polarity of the LED1 output. 6.28 LED Output Control Register The LED Output Control Register controls the output state of the LED pins that are not linked to sensor inputs. TABLE 6-47: LED OUTPUT CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 74h R/W LED Output Control ----- LED3_ DR LED2_ DR LED1_ DR 00h Note: If an LED is linked to a sensor input in the Sensor Input LED Linking Register (Section 6.26, "Sensor Input LED Linking Register"), the corresponding bit in the LED Output Control Register is ignored (i.e. a linked LED cannot be host controlled). CAP1133 DS00001625B-page 40 2015 Microchip Technology Inc. The LED Polarity Control Register will determine the non actuated state of the LED pins. The actuated LED behavior is determined by the LED behavior controls (see Section 6.31, "LED Behavior Register"). Table 6-48 shows the interaction between the polarity controls, output controls, and relative brightness. Bit 2 - LED3_DR - Determines whether LED3 output is driven high or low. • ‘0’ (default) - The LED3 output is driven at the minimum duty cycle or not actuated. • ‘1’ - The LED3 output is driven at the maximum duty cycle or is actuated. Bit 1 - LED2_DR - Determines whether LED2 output is driven high or low. Bit 0 - LED1_DR - Determines whether LED1 output is driven high or low. 6.29 Linked LED Transition Control Register The Linked LED Transition Control register controls the LED drive when the LED is linked to a capacitive touch sensor input. These controls work in conjunction with the INV_LINK_TRAN bit (see Section 6.6.2, "Configuration 2 - 44h") to create smooth transitions from host control to linked LEDs. Bit 2 - LED3_LTRAN - Determines the transition effect when LED3 is linked to CS3. • ‘0’ (default) - When the LED output control bit for LED3 is ‘1’, and then LED3 is linked to CS3 and no touch is detected, the LED will change states. • ‘1’ - If the INV_LINK_TRAN bit is ‘1’, when the LED output control bit for CS3 is ‘1’, and then CS3 is linked to LED3 and no touch is detected, the LED will not change states. In addition, the LED state will change when the sensor pad is touched. If the INV_LINK_TRAN bit is ‘0’, when the LED output control bit for CS3 is ‘1’, and then CS3 is linked to LED3 and no touch is detected, the LED will not change states. However, the LED state will not change TABLE 6-48: LED POLARITY BEHAVIOR LED Output Control Register or Touch Polarity Max Duty Min Duty Brightness LED Appearance 0 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. Brightness ramps from min duty cycle to max duty cycle according to LED behavior 0 non-inverted (‘1’) not used minimum % of time that the LED is off (logic 1) maximum brightness at 100 minus min duty cycle. on at 100 - min duty cycle 1 non-inverted (‘1’) maximum % of time that the LED is off (logic 1) minimum % of time that the LED is off (logic 1) For Direct behavior, maximum brightness is 100 minus max duty cycle. When breathing, max brightness is 100 minus min duty cycle. Brightness ramps from 100 - min duty cycle to 100 - max duty cycle. according to LED behavior TABLE 6-49: LINKED LED TRANSITION CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 77h R/W Linked LED Transition Control - ---- LED3_ LTRAN LED2_ LTRAN LED1_ LTRAN 00h 2015 Microchip Technology Inc. DS00001625B-page 41 CAP1133 when the sensor pad is touched. 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 LED3_LTRAN bit is set to ‘1’. Therefore, if breathe and pulse behaviors are used, set the INV_LINK_TRAN bit to ‘1’. Bit 1 - LED2_LTRAN - Determines the transition effect when LED2 is linked to CS2. Bit 0 - LED1_LTRAN - Determines the transition effect when LED1 is linked to CS1. 6.30 LED Mirror Control Register The LED Mirror Control Registers determine the meaning of duty cycle settings when polarity is non-inverted for each LED channel. When the polarity bit is set to ‘1’ (non-inverted), to obtain correct steps for LED ramping, pulse, and breathe behaviors, the min and max duty cycles need to be relative to 100%, rather than the default, which is relative to 0%. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’, the LED will be on and the CAP1133 LED pin is sinking the LED current. When the polarity bit is set to ‘1’, it is considered non-inverted. For systems using the opposite LED configuration, mirror controls would apply when the polarity bit is ‘0’. These bits are changed automatically if the corresponding LED Polarity bit is changed (unless the BLK_POL_MIR bit is set - see Section 6.6). Bit 2 - LED3_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. • ‘0’ (default) - The duty cycle settings are determined relative to 0% and are determined directly with the settings. • ‘1’ - The duty cycle settings are determined relative to 100%. 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. 6.31 LED Behavior Register The LED Behavior register controls the operation of LEDs. Each LED pin is controlled by a 2-bit field and the behavior is determined by whether the LED is linked to a capacitive touch sensor input or not. If the corresponding LED output is linked to a capacitive touch sensor input, the appropriate behavior will be enabled / disabled based on touches and releases. If the LED output is not associated with a capacitive touch sensor input, the appropriate behavior will be enabled / disabled by the LED Output Control register. If the respective LEDx_DR bit is set to a logic ‘1’, this will be associated as a “touch”, and if the LEDx_DR bit is set to a logic ‘0’, this will be associated as a “release”. Table 6-52, "LEDx_CTL Bit Decode" shows the behavior triggers. The defined behavior will activate when the Start Trigger is met and will stop when the Stop Trigger is met. Note the behavior of the Breathe Hold and Pulse Release option. The LED Polarity Control register will determine the non actuated state of the LED outputs (see Section 6.27, "LED Polarity Register"). APPLICATION NOTE: If an LED is not linked to a capacitive touch sensor input and is breathing (via the Breathe or Pulse behaviors), it must be unactuated and then re-actuated before changes to behavior TABLE 6-50: LED MIRROR CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 79h R/W LED Mirror Control ----- LED3_ MIR_ EN LED2_ MIR _ EN LED1_ MIR _ EN 00h TABLE 6-51: LED BEHAVIOR REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 81h R/W LED Behavior 1 - - LED3_CTL[1:0] LED2_CTL[1:0] LED1_CTL[1:0] 00h CAP1133 DS00001625B-page 42 2015 Microchip Technology Inc. are processed. For example, if the LED output is breathing and the Maximum duty cycle is changed, this change will not take effect until the LED output control register is set to ‘0’ and then re-set to ‘1’. APPLICATION NOTE: If an LED is not linked to the capacitive touch sensor input and configured to operate using Pulse 1 Behavior, then the circuitry will only be actuated when the corresponding output control bit is set. It will not check the bit condition until the Pulse 1 behavior is finished. The device will not remember if the bit was cleared and reset while it was actuated. APPLICATION NOTE: If an LED is actuated and not linked and the desired LED behavior is changed, this new behavior will take effect immediately; however, the first instance of the changed behavior may act incorrectly (e.g. if changed from Direct to Pulse 1, the LED output may ‘breathe’ 4 times and then end at minimum duty cycle). LED Behaviors will operate normally once the LED has been un-actuated and then re-actuated. APPLICATION NOTE: If an LED is actuated and it is switched from linked to a capacitive touch sensor input to unlinked (or vice versa), the LED will respond to the new command source immediately if the behavior was Direct or Breathe. For Pulse behaviors, it will complete the behavior already in progress. For example, if a linked LED was actuated by a touch and the control 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. Bits 5 - 4 - LED3_CTL[1:0] - Determines the behavior of LED3 as shown in Table 6-52. Bits 3 - 2 - LED2_CTL[1:0] - Determines the behavior of LED2 as shown in Table 6-52. Bits 1 - 0 - LED1_CTL[1:0] - Determines the behavior of LED1 as shown in Table 6-52. TABLE 6-52: LEDX_CTL BIT DECODE LEDx_CTL [1:0] Operation Description Start TRigger Stop Trigger 1 0 0 0 Direct The LED is driven to the programmed state (active or inactive). See Figure 6-7 Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 0 1 Pulse 1 The LED will “Pulse” a programmed number of times. During each “Pulse” the LED will breathe up to the maximum brightness and back down to the minimum brightness so that the total “Pulse” period matches the programmed value. Touch or Release Detected or LED Output Control bit set or cleared (see Section 6.32) n/a 1 0 Pulse 2 The LED will “Pulse” when the start trigger is detected. When the stop trigger is detected, it will “Pulse” a programmable number of times then return to its minimum brightness. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 2015 Microchip Technology Inc. DS00001625B-page 43 CAP1133 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. 6.32 LED Pulse 1 Period Register The LED Pulse Period 1 register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 01b). The LSB represents 32ms so that a setting of 18h (24d) would represent a period of 768ms (24 x 32ms = 768ms). The total range is from 32ms to 4.064 seconds as shown in Table 6-54 with the default being 1024ms. 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. Bit 7 - ST_TRIG - Determines the start trigger for the LED Pulse behavior. • ‘0’ (default) - The LED will Pulse when a touch is detected or the drive bit is set. • ‘1’ - The LED will Pulse when a release is detected or the drive bit is cleared. The Pulse 1 operation is shown in Figure 6-1 when the LED output is configured for non-inverted polarity (LEDx_POL = 1) and in Figure 6-2 for inverted polarity (LEDx_POL = 0). 1 1 Breathe The LED will breathe. It will be driven with a duty cycle that ramps up from the programmed minimum duty cycle (default 0%) to the programmed maximum duty cycle duty cycle (default 100%) and then back down. Each ramp takes up 50% of the programmed period. The total period of each “breath” is determined by the LED Breathe Period controls - see Section 6.34. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared TABLE 6-53: LED PULSE 1 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 84h R/W LED Pulse 1 Period ST_ TRIG P1_ PER6 P1_ PER5 P1_ PER4 P1_ PER3 P1_ PER2 P1_ PER1 P1_ PER0 20h TABLE 6-52: LEDX_CTL BIT DECODE (CONTINUED) LEDx_CTL [1:0] Operation Description Start TRigger Stop Trigger 1 0 CAP1133 DS00001625B-page 44 2015 Microchip Technology Inc. . FIGURE 6-1: Pulse 1 Behavior with Non-Inverted Polarity FIGURE 6-2: Pulse 1 Behavior with Inverted Polarity TABLE 6-54: LED PULSE / BREATHE PERIOD EXAMPLE Setting (HEX) Setting (Decimal) Total Breathe / Pulse Period (MS) 00h 0 32 01h 1 32 02h 2 64 03h 3 96 . . . . . . . . . 7Dh 125 4000 7Eh 126 4032 7Fh 127 4064 Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected (100% - Pulse 1 Max Duty Cycle) * Brightness X pulses after touch or after release Pulse 1 Period (P1_PER) (100% - Pulse 1 Min Duty Cycle) * Brightness LED Brightness Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected Pulse 1 Min Duty Cycle * Brightness X pulses after touch or after release Pulse Period (P1_PER) Pulse 1 Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001625B-page 45 CAP1133 6.33 LED Pulse 2 Period Register The LED Pulse 2 Period register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 10b). 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 6-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 6-3 for non-inverted polarity (LEDx_POL = 1) and in Figure 6-4 for inverted polarity (LEDx_POL = 0). TABLE 6-55: LED PULSE 2 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 85h R/W LED Pulse 2 Period - P2_ PER6 P2_ PER5 P2_ PER4 P2_ PER3 P2_ PER2 P2_ PER1 P2_ PER0 14h FIGURE 6-3: Pulse 2 Behavior with Non-Inverted Polarity FIGURE 6-4: Pulse 2 Behavior with Inverted Polarity . . . Normal – untouched operation Normal – untouched operation Touch Detected (100% - Pulse 2 Min Duty Cycle) * Brightness (100% - Pulse 2 Max Duty Cycle) * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness Normal – untouched operation Normal – untouched operation Touch Detected Pulse 2 Max Duty Cycle * Brightness Pulse 2 Min Duty Cycle * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness . . . CAP1133 DS00001625B-page 46 2015 Microchip Technology Inc. 6.34 LED Breathe Period Register The LED Breathe Period register determines the overall period of a breathe operation as determined by the LED_CTL registers (see Table 6-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 6-54) with a default of 2976ms. 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. 6.35 LED Configuration Register The LED Configuration register controls general LED behavior as well as the number of pulses that are sent for the PULSE LED output behavior. Bit 6 - RAMP_ALERT - Determines whether the device will assert the ALERT# pin when LEDs actuated by the LED Output Control register bits have finished their respective behaviors. Interrupts will only be generated if the LED activity is generated by writing the LED Output Control registers. Any LED activity associated with touch detection will not cause an interrupt to be generated when the LED behavior has been finished. • ‘0’ (default) - The ALERT# pin will not be asserted when LEDs actuated by the LED Output Control register have finished their programmed behaviors. • ‘1’ - The ALERT# pin will be asserted whenever any LED that is actuated by the LED Output Control register has finished its programmed behavior. Bits 5 - 3 - PULSE2_CNT[2:0] - Determines the number of pulses used for the Pulse 2 behavior as shown in Table 6-58. Bits 2 - 0 - PULSE1_CNT[2:0] - Determines the number of pulses used for the Pulse 1 behavior as shown in Table 6-58. TABLE 6-56: LED BREATHE PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 86h R/W LED Breathe Period - BR_ PER6 BR_ PER5 BR_ PER4 BR_ PER3 BR_ PER2 BR_ PER1 BR_ PER0 5Dh TABLE 6-57: LED CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 88h R/W LED Config - RAMP_ ALERT PULSE2_CNT[2:0] PULSE1_CNT[2:0] 04h TABLE 6-58: PULSEX_CNT DECODE PULSEX_CNT[2:0] Number of Breaths 21 0 0 0 0 1 (default - Pulse 2) 00 1 2 01 0 3 01 1 4 1 0 0 5 (default - Pulse 1) 10 1 6 11 0 7 11 1 8 2015 Microchip Technology Inc. DS00001625B-page 47 CAP1133 6.36 LED Duty Cycle Registers The LED Duty Cycle registers determine the minimum and maximum duty cycle settings used for the LED for each LED behavior. These settings affect the brightness of the LED when it is fully off and fully on. The LED driver duty cycle will ramp up from the minimum duty cycle to the maximum duty cycle and back down again. APPLICATION NOTE: When operating in Direct behavior mode, changes to the Duty Cycle settings will be applied immediately. When operating in Breathe, Pulse 1, or Pulse 2 modes, the LED must be unactuated and then re-actuated before changes to behavior are processed. Bits 7 - 4 - X_MAX_DUTY[3:0] - Determines the maximum PWM duty cycle for the LED drivers as shown in Table 6-60. Bits 3 - 0 - X_MIN_DUTY[3:0] - Determines the minimum PWM duty cycle for the LED drivers as shown in Table 6-60. 6.37 LED Direct Ramp Rates Register TABLE 6-59: LED DUTY CYCLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 90h R/W LED Pulse 1 Duty Cycle P1_MAX_DUTY[3:0] P1_MIN_DUTY[3:0] F0h 91h R/W LED Pulse 2 Duty Cycle P2_MAX_DUTY[3:0] P2_MIN_DUTY[3:0] F0h 92h R/W LED Breathe Duty Cycle BR_MAX_DUTY[3:0] BR_MIN_DUTY[3:0] F0h 93h R/W Direct Duty Cycle DR_MAX_DUTY[3:0] DR_MIN_DUTY[3:0] F0h TABLE 6-60: LED DUTY CYCLE DECODE x_MAX/MIN_Duty [3:0] Maximum Duty Cycle Minimum Duty Cycle 3 21 0 0 0 0 0 7% 0% 0 0 0 1 9% 7% 0 0 1 0 11% 9% 0 0 1 1 14% 11% 0 1 0 0 17% 14% 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% TABLE 6-61: LED DIRECT RAMP RATES REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 94h R/W LED Direct Ramp Rates - - RISE_RATE[2:0] FALL_RATE[2:0] 00h CAP1133 DS00001625B-page 48 2015 Microchip Technology Inc. The LED Direct Ramp Rates register control the rising and falling edge time of an LED that is configured to operate in Direct behavior mode. The rising edge time corresponds to the amount of time the LED takes to transition from its minimum duty cycle to its maximum duty cycle. Conversely, the falling edge time corresponds to the amount of time that the LED takes to transition from its maximum duty cycle to its minimum duty cycle. Bits 5 - 3 - RISE_RATE[2:0] - Determines the rising edge time of an LED when it transitions from its minimum drive state to its maximum drive state as shown in Table 6-62. Bits 2 - 0 - FALL_RATE[2:0] - Determines the falling edge time of an LED when it transitions from its maximum drive state to its minimum drive state as shown in Table 6-62. 6.38 LED Off Delay Register The LED Off Delay register determines the amount of time that an LED remains at its maximum duty cycle (or minimum as determined by the polarity controls) before it starts to ramp down. If the LED is operating in Breathe mode, this delay is applied at the top of each “breath”. If the LED is operating in the Direct mode, this delay is applied when the LED is unactuated. Bits 6 - 4 - BR_OFF_DLY[2:0] - Determines the Breathe behavior mode off delay, which is the amount of time an LED in Breathe behavior mode remains inactive after it finishes a breathe pulse (ramp on and ramp off), as shown in Figure 6- 5 (non-inverted polarity LEDx_POL = 1) and Figure 6-6 (inverted polarity LEDx_POL = 0). Available settings are shown in Table 6-64. TABLE 6-62: RISE / FALL RATE DECODE RISE_RATE/ FALL_RATE/ Bit Decode Rise / Fall Time (TRISE / TFALL) 21 0 00 0 0 0 0 1 250ms 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 TABLE 6-63: LED OFF DELAY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 95h R/W LED Off Delay Register - BR_OFF_DLY[2:0] DIR_OFF_DLY[3:0] 00h 2015 Microchip Technology Inc. DS00001625B-page 49 CAP1133 FIGURE 6-5: Breathe Behavior with Non-Inverted Polarity FIGURE 6-6: Breathe Behavior with Inverted Polarity TABLE 6-64: BREATHE OFF DELAY SETTINGS BR_OFF_DLY [2:0] OFF Delay 2 10 0 0 0 0 (default) 0 0 1 0.25s 0 1 0 0.5s 0 1 1 0.75s LED Actuated 100% - Breathe Max Min Cycle * Brightness 100% - Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) LED Actuated Breathe Max Duty Cycle * Brightness Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) CAP1133 DS00001625B-page 50 2015 Microchip Technology Inc. Bits 3 - 0 - DIR_OFF_DLY[3:0] - Determines the turn-off delay, as shown in Table 6-65, for all LEDs that are configured to operate in Direct behavior mode. The Direct behavior operation is determined by the combination of programmed Rise Time, Fall Time, Min and Max Duty cycles, Off Delay, and polarity. Figure 6-7 shows the behavior for non-inverted polarity (LEDx_POL = 1) while Figure 6- 8 shows the behavior for inverted polarity (LEDx_POL = 0). 1 0 0 1.0s 1 0 1 1.25s 1 1 0 1.5s 1 1 1 2.0s FIGURE 6-7: Direct Behavior for Non-Inverted Polarity FIGURE 6-8: Direct Behavior for Inverted Polarity TABLE 6-65: OFF DELAY DECODE OFF Delay[3:0] Bit Decode OFF Delay (tOFF_DLY) 32 1 0 00 0 0 0 0 0 0 1 250ms 0 0 1 0 500ms 0 0 1 1 750ms TABLE 6-64: BREATHE OFF DELAY SETTINGS (CONTINUED) BR_OFF_DLY [2:0] OFF Delay 2 10 Normal – untouched operation RISE_RATE Setting (tRISE) (100% - Max Duty Cycle) * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation (100% - Min Duty Cycle) * Brightness LED Brightness Normal – untouched operation RISE_RATE Setting (tRISE) Min Duty Cycle * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001625B-page 51 CAP1133 6.39 Sensor Input Calibration Registers The Sensor Input Calibration registers hold the 10-bit value that represents the last calibration value. 6.40 Product ID Register The Product ID register stores a unique 8-bit value that identifies the device. 6.41 Manufacturer ID Register The Vendor ID register stores an 8-bit value that represents Microchip. 0 1 0 0 1s 0 1 0 1 1.25s 0 1 1 0 1.5s 0 1 1 1 2s 1 0 0 0 2.5s 1 0 0 1 3.0s 1 0 1 0 3.5s 1 0 1 1 4.0s 1 1 0 0 4.5s All others 5.0s TABLE 6-66: SENSOR INPUT CALIBRATION REGISTERS ADDR Register R/W B7 B6 B5 B4 B3 B2 B1 B0 Default B1h Sensor Input 1 Calibration R CAL1_9 CAL1_8 CAL1_7 CAL1_6 CAL1_5 CAL1_4 CAL1_3 CAL1_2 00h B2h Sensor Input 2 Calibration R CAL2_9 CAL2_8 CAL2_7 CAL2_6 CAL2_5 CAL2_4 CAL2_3 CAL2_2 00h B3h Sensor Input 3 Calibration R CAL3_9 CAL3_8 CAL3_7 CAL3_6 CAL3_5 CAL3_4 CAL3_3 CAL3_2 00h B9h Sensor Input Calibration LSB 1 R - - CAL3_1 CAL3_0 CAL2_1 CAL2_0 CAL1_1 CAL1_0 00h TABLE 6-67: PRODUCT ID REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FDh R Product ID 0 1 0 1 0 1 0 0 54h TABLE 6-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 TABLE 6-65: OFF DELAY DECODE (CONTINUED) OFF Delay[3:0] Bit Decode OFF Delay (tOFF_DLY) 32 1 0 CAP1133 DS00001625B-page 52 2015 Microchip Technology Inc. 6.42 Revision Register The Revision register stores an 8-bit value that represents the part revision. TABLE 6-69: REVISION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FFh R Revision 1 0 0 0 0 0 1 1 83h 2015 Microchip Technology Inc. DS00001625B-page 53 CAP1133 7.0 PACKAGE INFORMATION 7.1 CAP1133 Package Drawings FIGURE 7-1: 10-Pin DFN 3mm x 3mm Package Drawings (1 of 2) Note: For the most current package drawings, see the Microchip Packaging Specification at http://www.microchip.com/packaging CAP1133 DS00001625B-page 54 2015 Microchip Technology Inc. FIGURE 7-2: 10-Pin DFN 3mm x 3mm Package Drawings (2 of 2) Note: For the most current package drawings, see the Microchip Packaging Specification at http://www.microchip.com/packaging 2015 Microchip Technology Inc. DS00001625B-page 55 CAP1133 7.2 Package Marking FIGURE 7-3: CAP1133 Package Marking 1 A W NNNA e4 TOP BOTTOM Bottom marking not allowed PB-FREE/GREEN SYMBOL PIN 1 (Ni/Pd PP-LF) Line 1 – Device Code, Week 2x 0.6 Line 2 – Alphanumeric Traceability Code W Lines 1-2: Line 3: Center Horizontal Alignment As Shown CAP1133 DS00001625B-page 56 2015 Microchip Technology Inc. APPENDIX A: DEVICE DELTA A.1 Delta from CAP1033 to CAP1133 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 6-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. Added 1 bit to the LED Off Delay register (see Section 6.38, "LED Off Delay Register") to extend times from 2s to 5s in 0.5s intervals. 5. Breathe behavior modified. A breathe off delay control was added to the LED Off Delay Register (see Section 6.38, "LED Off Delay Register") so the LEDs can be configured to remain inactive between breathes. 6. Added controls for the LED transition effects when linking LEDs to capacitive sensor inputs. See Section 6.29, "Linked LED Transition Control Register". 7. Added controls to “mirror” the LED duty cycle outputs so that when polarity changes, the LED brightness levels look right. These bits are automatically set when polarity is set. Added control to break this auto-set behavior. See Section 6.30, "LED Mirror Control Register". 8. Added Multiple Touch Pattern detection circuitry. See Section 6.15, "Multiple Touch Pattern Configuration Register". 9. Added General Status register to flag Multiple touches, Multiple Touch Pattern issues and general touch detections. See Section 6.2, "Status Registers". 10. Added bits 6 and 5 to the Recalibration Configuration register (2Fh - see Section 6.17, "Recalibration Configuration Register"). These bits control whether the accumulation of intermediate data and the consecutive negative delta counts counter are cleared when the noise status bit is set. 11. Added Configuration 2 register for LED linking controls, noise detection controls, and control to interrupt on press but not on release. Added control to change alert pin polarity. See Section 6.6, "Configuration Registers". 12. Updated Deep Sleep behavior so that device does not clear DSLEEP bit on received communications but will wake to communicate. 13. Changed PWM frequency for LED drivers. The PWM frequency was derived from the programmed breathe period and duty cycle settings and it ranged from ~4Hz to ~8000 Hz. The PWM frequency has been updated to be a fixed value of ~2000Hz. 14. Register delta: Table A.1 Register Delta From CAP1033 to CAP1133 Address Register Delta Delta Default 00h Page 21 Changed - Main Status / Control added bits 7-6 to control gain 00h 02h Page 22 New - General Status new register to store MTP, MULT, LED, and general TOUCH bits 00h 44h Page 25 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 28 Changed - Averaging Control updated register bits - moved SAMP_AVG[2:0] bits and added SAMP_- TIME bit 1. Default changed 39h 2Bh Page 31 New - Multiple Touch Pattern Configuration new register for Multiple Touch Pattern configuration - enable and threshold settings 80h 2Dh Page 32 New - Multiple Touch Pattern Register new register for Multiple Touch Pattern detection circuitry - pattern or number of sensor inputs 07h 2015 Microchip Technology Inc. DS00001625B-page 57 CAP1133 2Fh Page 33 Changed - Recalibration Configuration updated register - updated CAL_CFG bit decode to add a 128 averages setting and removed highest time setting. Default changed. Added bit 6 NO_CLR_INTD and bit 5 NO_CLR_NEG. 8Ah 38h Page 34 Changed - Sensor Input Noise Threshold updated register bits - removed bits 7 - 3 and consolidated all controls into bits 1 - 0. These bits will set the noise threshold for all channels. Default changed 01h 39h Removed - Noise Threshold Register 2 removed register n/a 41h Page 35 Changed - Standby Configuration updated register bits - moved STBY_AVG[2:0] bits and added STBY_- TIME bit 1. Default changed 39h 77h Page 40 New - Linked LED Transition Control new register to control transition effect when LED linked to sensor inputs 00h 79h Page 41 New - LED Mirror Control new register to control LED output mirroring for brightness control when polarity changed 00h 90h Page 47 Changed - LED Pulse 1 Duty Cycle changed bit decode to be more logarithmic F0h 91h Page 47 Changed - LED Pulse 2 Duty Cycle changed bit decode to be more logarithmic F0h 92h Page 47 Changed - LED Breathe Duty Cycle changed bit decode to be more logarithmic F0h 93h Page 47 Changed - LED Direct Duty Cycle changed bit decode to be more logarithmic F0h 95h Added controls - LED Off Delay Added bits 6-4 BR_OFF_DLY[2:0] Added bit 3 DIR_OFF_DLY[3] 00h FDh Page 51 Changed - Product ID Changed bit decode for CAP1133 54h Table A.1 Register Delta From CAP1033 to CAP1133 (continued) Address Register Delta Delta Default CAP1133 DS00001625B-page 58 2015 Microchip Technology Inc. APPENDIX B: DATA SHEET REVISION HISTORY Revision Section/Figure/Entry Correction DS00001625B (02-09-15) Features, Table 2-2, Table 2- 2, "Pin Types", Section 5.0, "General Description" References to BC-Link Interface, BC_DATA, BC_- CLK, BC-IRQ#, BC-Link bus have been removed Application Note under Table 2-6 [BC-Link] hidden in data sheet Table 3-2, "Electrical Specifications" BC-Link Timing Section hidden in data sheet Table 4-1 Protocol Used for 68K Pull Down Resistor changed from “BC-Link Communications” to “Reserved” Section 4.2.2, "SMBus Address and RD / WR Bit" Replaced “client address” with “slave address” in this section. Section 4.2.4, SMBus ACK and NACK Bits, Section 4.2.5, SMBus Stop Bit,Section 4.2.7, SMBus and I2C Compatibility Replaced “client” with “slave” in these sections. Table 4-3, "Read Byte Protocol" Heading changed from “Client Address” to “Slave Address” Table 6-1 Register Name for Register Address 77h changed from “LED Linked Transition Control” to “Linked LED Transition Control” Section 6.30 changed CS3 to LED3 Section 7.7 Package Marking Updated package drawing Appendix A: Device Delta changed 2Dh to 2Fh in item #12 Product Identification System Removed BC-Link references REV A REV A replaces previous SMSC version Rev. 1.32 (01-05-12) Rev. 1.32 (01-05-12) Table 3-2, "Electrical Specifications" Added conditions for tHD:DAT. Section 4.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.0 SMSC Dedicated Slave Devices in I 2C Systems.” Added: CAP1188 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. Section 6.4, "Sensor Input Delta Count Registers" Changed negative value cap from FFh to 80h. Rev. 1.31 (08-18-11) Section 4.3.3, "SMBus Send Byte" Added an application note: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Section 4.3.4, "SMBus Receive Byte" Added an application note: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Section 6.2, "Status Registers" Removed RESET as bit 3 in register 02h. Rev. 1.3 (05-18-11) Section 6.42, "Revision Register" Updated revision ID from 82h to 83h. Section 6.2, "Status Registers" Added RESET as bit 3 in register 02h. 2015 Microchip Technology Inc. DS00001625B-page 59 CAP1133 Rev. 1.2 (02-10-11) Section A.8, "Delta from Rev B (Mask B0) to Rev C (Mask B1)" Added. Table 3-2, "Electrical Specifications" PSR improvements made in functional revision B. Changed PSR spec from ±100 typ and ±200 max counts / V to ±3 and ±10 counts / V. Conditions updated. Section 5.3.2, "Recalibrating Sensor Inputs" Added more detail with subheadings for each type of recalibration. Section 6.6, "Configuration Registers" Added bit 5 BLK_PWR_CTRL to the Configuration 2 Register 44h. The TIMEOUT bit is set to ‘1’ by default for functional revision B and is set to ‘0’ by default for functional revision C. Section 6.42, "Revision Register" Updated revision ID in register FFh from 81h to 82h. Rev. 1.1 (11-17-10) Document Updated for functional revision B. See Section A.7, "Delta from Rev A (Mask A0) to Rev B (Mask B0)". Cover 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 Table 3-2, "Electrical Specifications" Conditions for Power Supply Rejection modified adding the following: Sampling time = 2.56ms Averaging = 1 Negative Delta Counts = Disabled All other parameters default Section 6.11, "Calibration Activate Register" Updated register description to indicate which re-calibration routine is used. Section 6.14, "Multiple Touch Configuration Register" Updated register description to indicate what will happen. Table 6-34, "CSx_BN_TH Bit Decode" Table heading changed from “Threshold Divide Setting” to “Percent Threshold Setting”. Rev. 1.0 (06-14-10) Initial release Revision Section/Figure/Entry Correction CAP1133 DS00001625B-page 60 2015 Microchip Technology Inc. THE MICROCHIP WEB SITE Microchip provides online support via our WWW site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQ), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com. Under “Support”, click on “Customer Change Notification” and follow the registration instructions. CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office • Field Application Engineer (FAE) • Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://www.microchip.com/support 2015 Microchip Technology Inc. DS00001625B-page 61 CAP1133 PRODUCT IDENTIFICATION SYSTEM To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PART NO. [X] - [X] - XXX - [X](1) l l l l l Device Temperature Addressing Package Tape and Reel Range Option Option Example: Note 1: Tape and Reel identifier only appears in the catalog part number description. This identifier is used for ordering purposes and is not printed on the device package. Check with your Microchip Sales Office for package availability with the Tape and Reel option. Device: CAP1133 Temperature Range: Blank = 0°C to +85°C (Extended Commercial) Package: AIA = DFN Tape and Reel Option: TR = Tape and Reel(1) CAP1133-1-AIA-TR 10-pin DFN 3mm x 3mm (RoHS compliant) Three capacitive touch sensor inputs, Three LED drivers, SMBus interface Reel size is 4,000 pieces CAP1133 DS00001625B-page 62 2015 Microchip Technology Inc. Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 978632770356 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == 2015 Microchip Technology Inc. DS00001625B-page 63 AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Austin, TX Tel: 512-257-3370 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 ASIA/PACIFIC Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2943-5100 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 China - Dongguan Tel: 86-769-8702-9880 China - Hangzhou Tel: 86-571-8792-8115 Fax: 86-571-8792-8116 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 ASIA/PACIFIC China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 Taiwan - Kaohsiung Tel: 886-7-213-7828 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Dusseldorf Tel: 49-2129-3766400 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Germany - Pforzheim Tel: 49-7231-424750 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Poland - Warsaw Tel: 48-22-3325737 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Worldwide Sales and Service 01/27/15 2015 Microchip Technology Inc. DS00001624B-page 1 General Description The CAP1106, which incorporates RightTouch® technology, is a multiple channel Capacitive Touch sensor. The CAP1106 contains six (6) individual capacitive touch sensor inputs. The device offers programmable sensitivity for use in touch sensor applications. Each sensor input automatically recalibrates to compensate for gradual environmental changes. The CAP1106 includes Multiple Pattern Touch recognition that allows the user to select a specific set of buttons to be touched simultaneously. If this pattern is detected, then a status bit is set and an interrupt generated. Additionally, the CAP1106 includes circuitry and support for enhanced sensor proximity detection. The CAP1106 offers multiple power states operating at low quiescent currents. In the Standby state of operation, one or more capacitive touch sensor inputs are active. Deep Sleep is the lowest power state available, drawing 5uA (typical) of current. In this state, no sensor inputs are active. Communications will wake the device. Applications • Desktop and Notebook PCs • LCD Monitors • Consumer Electronics • Appliances Features • Six (6) Capacitive Touch Sensor Inputs - CAP1106 - Programmable sensitivity - Automatic recalibration - Individual thresholds for each button • Proximity Detection • Multiple Button Pattern Detection • Calibrates for Parasitic Capacitance • Analog Filtering for System Noise Sources • Press and Hold feature for Volume-like Applications • Multiple Communication Interfaces - SMBus / I2C compliant interface • Low Power Operation - 5uA quiescent current in Deep Sleep - 50uA quiescent current in Standby (1 sensor input monitored) - Samples one or more channels in Standby • Available in 10-pin 3mm x 3mm RoHS compliant DFN package CAP1106 6 Channel Capacitive Touch Sensor CAP1106 DS00001624B-page 2 2015 Microchip Technology Inc. TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com. We welcome your feedback. Most Current Data Sheet To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000000A is version A of document DS30000000). Errata An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: • Microchip’s Worldwide Web site; http://www.microchip.com • Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include -literature number) you are using. Customer Notification System Register on our web site at www.microchip.com to receive the most current information on all of our products. 2015 Microchip Technology Inc. DS00001624B-page 3 CAP1106 Table of Contents 1.0 Block Diagram ................................................................................................................................................................................. 4 2.0 Pin Description ................................................................................................................................................................................ 5 3.0 Electrical Specifications .................................................................................................................................................................. 9 4.0 Communications ........................................................................................................................................................................... 12 5.0 General Description ...................................................................................................................................................................... 23 6.0 Register Description ...................................................................................................................................................................... 29 7.0 Package Information ..................................................................................................................................................................... 67 Appendix A: Device Delta ................................................................................................................................................................... 72 Appendix B: Data Sheet Revision History ........................................................................................................................................... 74 The Microchip Web Site ...................................................................................................................................................................... 76 Customer Change Notification Service ............................................................................................................................................... 76 Customer Support ............................................................................................................................................................................... 76 Product Identification System ............................................................................................................................................................. 77 CAP1106 DS00001624B-page 4 2015 Microchip Technology Inc. 1.0 BLOCK DIAGRAM SMBus / BC-Link Protocol VDD GND Capacitive Touch Sensing Algorithm CS1 CS2 CS3 CS4 CS5 SMCLK1 / BC_CLK2 SMDATA1 / BC_DATA2 ALERT#1 / BC_IRQ#2 1 = CAP1106-1 2 = CAP1106-2 CS6 2015 Microchip Technology Inc. DS00001624B-page 5 CAP1106 2.0 PIN DESCRIPTION FIGURE 2-1: CAP1106 Pin Diagram (10-Pin DFN) TABLE 2-1: PIN DESCRIPTION FOR CAP1106 Pin Number Pin Name Pin Function Pin Type Unused Connection 1 CS1 Capacitive Touch Sensor Input 1 AIO Connect to Ground 2 ALERT# ALERT# - Active low alert / interrupt output for SMBus alert OD (5V) Connect to Ground ALERT# - Active high alert / interrupt output for SMBus alert DO leave open 3 SMDATA SMDATA - Bi-directional, open-drain SMBus data - requires pull-up resistor DIOD (5V) n/a 4 SMCLK SMCLK - SMBus clock input - requires pull-up resistor DI (5V) n/a 5 VDD Positive Power supply Power n/a 6 CS6 Capacitive Touch Sensor Input 6 AIO Connect to Ground 7 CS5 Capacitive Touch Sensor Input 5 AIO Connect to Ground 8 CS4 Capacitive Touch Sensor Input 4 AIO Connect to Ground 9 CS3 Capacitive Touch Sensor Input 3 AIO Connect to Ground GND CS3 1 CS2 2 3 4 5 CS4 CS1 ALERT# / BC_IRQ# SMDATA / BC_DATA VDD SMCLK / BC_CLK CS5 CS6 CAP1106 3mm x 3mm DFN 10 9 8 7 6 CAP1106 DS00001624B-page 6 2015 Microchip Technology Inc. APPLICATION NOTE: When the ALERT# pin is configured as an active low output, it will be open drain. When it is configured as an active high output, it will be push-pull. APPLICATION NOTE: For the 5V tolerant pins that have a pull-up resistor, the pull-up voltage must not exceed 3.6V when the CAP1106 is unpowered. The pin types are described in Table 2-2. All pins labeled with (5V) are 5V tolerant. 10 CS2 Capacitive Touch Sensor Input 2 AIO Connect to Ground Bottom Pad GND Ground Power n/a TABLE 2-2: PIN TYPES Pin Type Description Power This pin is used to supply power or ground to the device. DI Digital Input - This pin is used as a digital input. This pin is 5V tolerant. AIO Analog Input / Output -This pin is used as an I/O for analog signals. DIOD Digital Input / Open Drain Output - This pin is used as a digital I/O. When it is used as an output, it is open drain and requires a pull-up resistor. This pin is 5V tolerant. OD Open Drain Digital Output - This pin is used as a digital output. It is open drain and requires a pull-up resistor. This pin is 5V tolerant. DO Push-pull Digital Output - This pin is used as a digital output and can sink and source current. DIO Push-pull Digital Input / Output - This pin is used as an I/O for digital signals. TABLE 2-1: PIN DESCRIPTION FOR CAP1106 (CONTINUED) Pin Number Pin Name Pin Function Pin Type Unused Connection 2015 Microchip Technology Inc. DS00001624B-page 7 CAP1106 3.0 ELECTRICAL SPECIFICATIONS Note 3-1 Stresses above those listed could cause permanent damage to the device. This is a stress rating only and functional operation of the device at any other condition above those indicated in the operation sections of this specification is not implied. Note 3-2 For the 5V tolerant pins that have a pull-up resistor, the voltage difference between V5VT_PIN and VDD must never exceed 3.6V. Note 3-3 The Package Power Dissipation specification assumes a recommended thermal via design consisting of a 2x2 matrix of 0.3mm (12mil) vias at 1.0mm pitch connected to the ground plane with a 1.6 x 2.3mm thermal landing. TABLE 3-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 3-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 10 pin DFN (see Note 3-3) 0.7 W Junction to Ambient (θJA) 77.7 °C/W Operating Ambient Temperature Range -40 to 125 °C Storage Temperature Range -55 to 150 °C ESD Rating, All Pins, HBM 8000 V CAP1106 DS00001624B-page 8 2015 Microchip Technology Inc. TABLE 3-2: ELECTRICAL SPECIFICATIONS 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 DC Power Supply Voltage VDD 3.0 3.3 3.6 V Supply Current ISTBY 120 170 uA Standby state active 1 sensor input monitored Default conditions (8 avg, 70ms cycle time) ISTBY 50 uA Standby state active 1 sensor input monitored 1 avg, 140ms cycle time, IDSLEEP 5 15 uA Deep Sleep state active No communications TA < 40°C 3.135 < VDD < 3.465V IDD 500 600 uA Capacitive Sensing Active Capacitive Touch Sensor Inputs Maximum Base Capacitance CBASE 50 pF Pad untouched Minimum Detectable Capacitive Shift ΔCTOUCH 20 fF Pad touched - default conditions (1 avg, 35ms cycle time, 1x sensitivity) Recommended Cap Shift ΔCTOUCH 0.1 2 pF Pad touched - Not tested Power Supply Rejection PSR ±3 ±10 counts / V Untouched Current Counts Base Capacitance 5pF - 50pF Maximum sensitivity Negative Delta Counts disabled All other parameters default Timing Time to communications ready tCOMM_DLY 15 ms Time to first conversion ready tCONV_DLY 170 200 ms I/O Pins Output Low Voltage VOL 0.4 V ISINK_IO = 8mA Output High Voltage VOH VDD - 0.4 V ISOURCE_IO = 8mA Input High Voltage VIH 2.0 V Input Low Voltage VIL 0.8 V Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered SMBus Timing Input Capacitance CIN 5 pF Clock Frequency fSMB 10 400 kHz Spike Suppression tSP 50 ns Bus Free Time Stop to Start tBUF 1.3 us Start Setup Time tSU:STA 0.6 us 2015 Microchip Technology Inc. DS00001624B-page 9 CAP1106 Note 3-4 The ALERT pin will not glitch high or low at power up if connected to VDD or another voltage. Note 3-5 The SMCLK and SMDATA pins will not glitch low at power up if connected to VDD or another voltage. Start Hold Time tHD:STA 0.6 us Stop Setup Time tSU:STO 0.6 us Data Hold Time tHD:DAT 0 us When transmitting to the master Data Hold Time tHD:DAT 0.3 us When receiving from the master Data Setup Time tSU:DAT 0.6 us Clock Low Period tLOW 1.3 us Clock High Period tHIGH 0.6 us Clock / Data Fall Time tFALL 300 ns Min = 20+0.1CLOAD ns Clock / Data Rise Time tRISE 300 ns Min = 20+0.1CLOAD ns Capacitive Load CLOAD 400 pF per bus line TABLE 3-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 CAP1106 DS00001624B-page 10 2015 Microchip Technology Inc. 4.0 COMMUNICATIONS 4.1 Communications The CAP1106 communicates using the SMBus or I2C protocol. If the proprietary BC-Link protocol is required for your application, please contact your Microchip representative for ordering instructions. Regardless of the communications mechanism, the device functionality remains unchanged. 4.1.1 SMBUS (I2C) COMMUNICATIONS The supports the following protocols: Send Byte, Receive Byte, Read Byte, Write Byte, Read Block, and Write Block. In addition, the device supports I2C formatting for block read and block write protocols. See Section 4.2 and Section 4.3 for more information on the SMBus bus and protocols respectively. APPLICATION NOTE: Upon power up, the CAP1106 will not respond to any communications for up to 15ms. After this time, full functionality is available. 4.2 System Management Bus The CAP1106 communicates with a host controller, such as an SIO, through the SMBus. The SMBus is a two-wire serial communication protocol between a computer host and its peripheral devices. A detailed timing diagram is shown in Figure 4-1. Stretching of the SMCLK signal is supported; however, the CAP1106 will not stretch the clock signal. 4.2.1 SMBUS START BIT The SMBus Start bit is defined as a transition of the SMBus Data line from a logic ‘1’ state to a logic ‘0’ state while the SMBus Clock line is in a logic ‘1’ state. 4.2.2 SMBUS ADDRESS AND RD / WR BIT The SMBus Address Byte consists of the 7-bit slave address followed by the RD / WR indicator bit. If this RD / WR bit is a logic ‘0’, then the SMBus Host is writing data to the slave device. If this RD / WR bit is a logic ‘1’, then the SMBus Host is reading data from the slave device. The CAP1106 responds to SMBus address 0101_000(r/w). 4.2.3 SMBUS DATA BYTES All SMBus Data bytes are sent most significant bit first and composed of 8-bits of information. 4.2.4 SMBUS ACK AND NACK BITS The SMBus slave will acknowledge all data bytes that it receives. This is done by the slave device pulling the SMBus Data line low after the 8th bit of each byte that is transmitted. This applies to both the Write Byte and Block Write protocols. FIGURE 4-1: SMBus Timing Diagram SMDATA SMCLK TLOW TRISE THIGH TFALL TBUF THD:STA P S S - Start Condition P - Stop Condition THD:DAT TSU:DAT TSU:STA THD:STA P TSU:STO S 2015 Microchip Technology Inc. DS00001624B-page 11 CAP1106 The Host will NACK (not acknowledge) the last data byte to be received from the slave by holding the SMBus data line high after the 8th data bit has been sent. For the Block Read protocol, the Host will ACK each data byte that it receives except the last data byte. 4.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 CAP1106 detects an SMBus Stop bit and it has been communicating with the SMBus protocol, it will reset its slave interface and prepare to receive further communications. 4.2.6 SMBUS TIMEOUT The CAP1106 includes an SMBus timeout feature. Following a 30ms period of inactivity on the SMBus where the SMCLK pin is held low, the device will timeout and reset the SMBus interface. The timeout function defaults to disabled. It can be enabled by setting the TIMEOUT bit in the Configuration register (see Section 6.6, "Configuration Registers"). 4.2.7 SMBUS AND I2C COMPATIBILITY The major differences between SMBus and I2C devices are highlighted here. For more information, refer to the SMBus 2.0 and I2C specifications. For information on using the CAP1106 in an I2C system, refer to AN 14.0 Dedicated Slave Devices in I2C Systems. 1. CAP1106 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. 2. Minimum frequency for SMBus communications is 10kHz. 3. The SMBus slave protocol will reset if the clock is held at a logic ‘0’ for longer than 30ms. This timeout functionality is disabled by default in the CAP1106 and can be enabled by writing to the TIMEOUT bit. I2C does not have a timeout. 4. The SMBus slave protocol will reset if both the clock and data lines are held at a logic ‘1’ for longer than 200µs (idle condition). This function is disabled by default in the CAP1106 and can be enabled by writing to the TIMEOUT bit. I2C does not have an idle condition. 5. I2C devices do not support the Alert Response Address functionality (which is optional for SMBus). 6. I2C devices support block read and write differently. I2C protocol allows for unlimited number of bytes to be sent in either direction. The SMBus protocol requires that an additional data byte indicating number of bytes to read / write is transmitted. The CAP1106 supports I2C formatting only. 4.3 SMBus Protocols The CAP1106 is SMBus 2.0 compatible and supports Write Byte, Read Byte, Send Byte, and Receive Byte as valid protocols as shown below. All of the below protocols use the convention in Table 4-1. 4.3.1 SMBUS WRITE BYTE The Write Byte is used to write one byte of data to a specific register as shown in Table 4-2. 4.3.2 SMBUS READ BYTE The Read Byte protocol is used to read one byte of data from the registers as shown in Table 4-3. TABLE 4-1: PROTOCOL FORMAT Data Sent to Device Data Sent to the HOst Data sent Data sent TABLE 4-2: WRITE BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Register Data ACK Stop 1 ->0 0101_000 0 0 XXh 0 XXh 0 0 -> 1 CAP1106 DS00001624B-page 12 2015 Microchip Technology Inc. 4.3.3 SMBUS SEND BYTE The Send Byte protocol is used to set the internal address register pointer to the correct address location. No data is transferred during the Send Byte protocol as shown in Table 4-4. APPLICATION NOTE: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). 4.3.4 SMBUS RECEIVE BYTE The Receive Byte protocol is used to read data from a register when the internal register address pointer is known to be at the right location (e.g., set via Send Byte). This is used for consecutive reads of the same register as shown in Table 4-5. APPLICATION NOTE: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). 4.4 I2C Protocols The CAP1106 supports I2C Block Write and Block Read. The protocols listed below use the convention in Table 4-1. 4.4.1 BLOCK WRITE The Block Write is used to write multiple data bytes to a group of contiguous registers as shown in Table 4-6. 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. 4.4.2 BLOCK READ The Block Read is used to read multiple data bytes from a group of contiguous registers as shown in Table 4-7. APPLICATION NOTE: When using the Block Read protocol, the internal address pointer will be automatically incremented after every data byte is received. It will wrap from FFh to 00h. TABLE 4-3: READ BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data NACK Stop 1->0 0101_000 0 0 XXh 0 1 ->0 0101_000 1 0 XXh 1 0 -> 1 TABLE 4-4: SEND BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Stop 1 -> 0 0101_000 0 0 XXh 0 0 -> 1 TABLE 4-5: RECEIVE BYTE PROTOCOL Start Slave Address RD ACK Register Data NACK Stop 1 -> 0 0101_000 1 0 XXh 1 0 -> 1 TABLE 4-6: BLOCK WRITE PROTOCOL Start Slave Address WR ACK Register Address ACK Register Data ACK 1 ->0 0101_000 0 0 XXh 0 XXh 0 Register Data ACK Register Data ACK . . . Register Data ACK Stop XXh 0 XXh 0 . . . XXh 0 0 -> 1 2015 Microchip Technology Inc. DS00001624B-page 13 CAP1106 4.5 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 8051’s SFR space. Refer to documentation for the BC-Link compatible host controller for details on how to access the CAP1106-2 via the BC-Link Interface. TABLE 4-7: BLOCK READ PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data 1->0 0101_000 0 0 XXh 0 1 ->0 0101_000 1 0 XXh ACK Register Data ACK Register Data ACK Register Data ACK . . . Register Data NACK Stop 0 XXh 0 XXh 0 XXh 0 . . . XXh 1 0 -> 1 CAP1106 DS00001624B-page 14 2015 Microchip Technology Inc. 5.0 GENERAL DESCRIPTION The CAP1106 is a multiple channel Capacitive Touch sensor. The CAP1106 contains six (6) individual capacitive touch sensor inputs. The device offers programmable sensitivity for use in touch sensor applications. Each sensor input automatically recalibrates to compensate for gradual environmental changes. The CAP1106 offers multiple power states. It operates at the lowest quiescent current during its Deep Sleep state. In the low power Standby state, it can monitor one or more channels and respond to communications normally. The device communicates with a host controller using or via SMBus / I2C. The host controller may poll the device for updated information at any time or it may configure the device to flag an interrupt whenever a touch is detected on any sensor pad. A typical system diagram for the CAP1106 is shown in Figure 5-1. FIGURE 5-1: System Diagram for CAP1106 CAP1106 CS6 SMDATA1 / BC_DATA2 SMCLK1 / BC_CLK2 VDD Embedded Controller ALERT#1 / BC_IRQ#2 CS4 CS2 CS5 CS3 CS1 Touch Button Touch Button Touch Button Touch Button Touch Button Touch Button 1 = CAP1106-1 2 = CAP1106-2 2015 Microchip Technology Inc. DS00001624B-page 15 CAP1106 5.1 Power States The CAP1106 has three operating states depending on the status of the STBY and DSLEEP bits. When the device transitions between power states, previously detected touches (for inactive channels) are cleared and the status bits reset. 1. Fully Active - The device is fully active. It is monitoring all active capacitive sensor inputs. 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 6.20 through Section 6.22). Interrupts will still be generated based on the active channels. The device will still respond to communications normally and can be returned to the Fully Active state of operation by clearing the STBY bit. 3. Deep Sleep - The device is in its lowest power state. It is not monitoring any capacitive sensor inputs. While in Deep Sleep, the device can be awakened by SMBus or SPI communications targeting the device. This will not cause the DSLEEP to be cleared so the device will return to Deep Sleep once all communications have stopped. 5.2 Capacitive Touch Sensing The CAP1106 contains six (6) independent capacitive touch sensor inputs. Each sensor input has dynamic range to detect a change of capacitance due to a touch. Additionally, each sensor input can be configured to be automatically and routinely re-calibrated. 5.2.1 SENSING CYCLE Each capacitive touch sensor input has controls to be activated and included in the sensing cycle. When the device is active, it automatically initiates a sensing cycle and repeats the cycle every time it finishes. The cycle polls through each active sensor input starting with CS1 and extending through CS6. As each capacitive touch sensor input is polled, its measurement is compared against a baseline “Not Touched” measurement. If the delta measurement is large enough, a touch is detected and an interrupt is generated. The sensing cycle time is programmable (see Section 6.10, "Averaging and Sampling Configuration Register"). 5.2.2 RECALIBRATING SENSOR INPUTS There are various options for recalibrating the capacitive touch sensor inputs. Recalibration re-sets the Base Count Registers (Section 6.24, "Sensor Input Base Count Registers") which contain the “not touched” values used for touch detection comparisons. APPLICATION NOTE: The device will recalibrate all sensor inputs that were disabled when it transitions from Standby. Likewise, the device will recalibrate all sensor inputs when waking out of Deep Sleep. 5.2.2.1 Manual Recalibration The Calibration Activate Registers (Section 6.11, "Calibration Activate Register") force recalibration of selected sensor inputs. When a bit is set, the corresponding capacitive touch sensor input will be recalibrated (both analog and digital). The bit is automatically cleared once the recalibration routine has finished. 5.2.2.2 Automatic Recalibration Each sensor input is regularly recalibrated at a programmable rate (see Section 6.17, "Recalibration Configuration Register"). By default, the recalibration routine stores the average 64 previous measurements and periodically updates the base “not touched” setting for the capacitive touch sensor input. 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. Note: Automatic recalibration only works when the delta count is below the active sensor input threshold. It is disabled when a touch is detected. CAP1106 DS00001624B-page 16 2015 Microchip Technology Inc. 5.2.2.3 Negative Delta Count Recalibration It is possible that the device loses sensitivity to a touch. This may happen as a result of a noisy environment, an accidental recalibration during a touch, or other environmental changes. When this occurs, the base untouched sensor input may generate negative delta count values. The NEG_DELTA_CNT bits (see Section 6.17, "Recalibration Configuration Register") can be set to force a recalibration after a specified number of consecutive negative delta readings. 5.2.2.4 Delayed Recalibration It is possible that a “stuck button” occurs when something is placed on a button which causes a touch to be detected for a long period. By setting the MAX_DUR_EN bit (see Section 6.6, "Configuration Registers"), a recalibration can be forced when a touch is held on a button for longer than the duration specified in the MAX_DUR bits (see Section 6.8, "Sensor Input Configuration Register"). 5.2.3 PROXIMITY DETECTION Each sensor input can be configured to detect changes in capacitance due to proximity of a touch. This circuitry detects the change of capacitance that is generated as an object approaches, but does not physically touch, the enabled sensor pad(s). When a sensor input is selected to perform proximity detection, it will be sampled from 1x to 128x per sampling cycle. The larger the number of samples that are taken, the greater the range of proximity detection is available at the cost of an increased overall sampling time. 5.2.4 MULTIPLE TOUCH PATTERN DETECTION The multiple touch pattern (MTP) detection circuitry can be used to detect lid closure or other similar events. An event can be flagged based on either a minimum number of sensor inputs or on specific sensor inputs simultaneously exceeding an MTP threshold or having their Noise Flag Status Register bits set. An interrupt can also be generated. During an MTP event, all touches are blocked (see Section 6.15, "Multiple Touch Pattern Configuration Register"). 5.2.5 LOW FREQUENCY NOISE DETECTION Each sensor input has an EMI noise detector that will sense if low frequency noise is injected onto the input with sufficient power to corrupt the readings. If this occurs, the device will reject the corrupted sample and set the corresponding bit in the Noise Status register to a logic ‘1’. 5.2.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. 5.3 ALERT# Pin The ALERT# pin is an active low (or active high when configured) output that is driven when an interrupt event is detected. Whenever an interrupt is generated, the INT bit (see Section 6.1, "Main Control Register") is set. The ALERT# pin is cleared when the INT bit is cleared by the user. Additionally, when the INT bit is cleared by the user, status bits are only cleared if no touch is detected. 5.3.1 SENSOR INTERRUPT BEHAVIOR The sensor interrupts are generated in one of two ways: 1. An interrupt is generated when a touch is detected and, as a user selectable option, when a release is detected (by default - see Section 6.6). See Figure 5-3. 2. If the repeat rate is enabled then, so long as the touch is held, another interrupt will be generated based on the programmed repeat rate (see Figure 5-2). Note: During this recalibration, the device will not respond to touches. Note: Delayed recalibration only works when the delta count is above the active sensor input threshold. If enabled, it is invoked when a sensor pad touch is held longer than the MAX_DUR bit setting. 2015 Microchip Technology Inc. DS00001624B-page 17 CAP1106 When the repeat rate is enabled, the device uses an additional control called MPRESS that determines whether a touch is flagged as a simple “touch” or a “press and hold”. The MPRESS[3:0] bits set a minimum press timer. When the button is touched, the timer begins. If the sensor pad is released before the minimum press timer expires, it is flagged as a touch and an interrupt is generated upon release. If the sensor input detects a touch for longer than this timer value, it is flagged as a “press and hold” event. So long as the touch is held, interrupts will be generated at the programmed repeat rate and upon release (if enabled). APPLICATION NOTE: Figure 5-2 and Figure 5-3 show default operation which is to generate an interrupt upon sensor pad release and an active-low ALERT# pin. APPLICATION NOTE: The host may need to poll the device twice to determine that a release has been detected. FIGURE 5-2: Sensor Interrupt Behavior - Repeat Rate Enabled FIGURE 5-3: Sensor Interrupt Behavior - No Repeat Rate Enabled Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Min Press Setting (280ms) Interrupt on Touch Button Repeat Rate (175ms) Button Repeat Rate (175ms) Interrupt on Release (optional) ALERT# pin (active low) Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Interrupt on Touch Interrupt on Release (optional) ALERT# pin (active low) CAP1106 DS00001624B-page 18 2015 Microchip Technology Inc. 6.0 REGISTER DESCRIPTION The registers shown in Table 6-1 are accessible through the communications protocol. An entry of ‘-’ indicates that the bit is not used and will always read ‘0’. TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER Register Address R/W Register Name Function Default Value Page 00h R/W Main Control Controls general power states and power dissipation 00h Page 20 02h R General Status Stores general status bits 00h Page 21 03h R Sensor Input Status Returns the state of the sampled capacitive touch sensor inputs 00h Page 21 0Ah R Noise Flag Status Stores the noise flags for sensor inputs 00h Page 22 10h R Sensor Input 1 Delta Count Stores the delta count for CS1 00h Page 22 11h R Sensor Input 2 Delta Count Stores the delta count for CS2 00h Page 22 12h R Sensor Input 3 Delta Count Stores the delta count for CS3 00h Page 22 13h R Sensor Input 4 Delta Count Stores the delta count for CS4 00h Page 22 14h R Sensor Input 5 Delta Count Stores the delta count for CS5 00h Page 22 15h R Sensor Input 6 Delta Count Stores the delta count for CS6 00h Page 22 1Fh R/W Sensitivity Control Controls the sensitivity of the threshold and delta counts and data scaling of the base counts 2Fh Page 22 20h R/W Configuration Controls general functionality 20h Page 24 21h R/W Sensor Input Enable Controls whether the capacitive touch sensor inputs are sampled 3Fh Page 25 22h R/W Sensor Input Configuration Controls max duration and auto-repeat delay for sensor inputs operating in the full power state A4h Page 25 23h R/W Sensor Input Configuration 2 Controls the MPRESS controls for all sensor inputs 07h Page 26 24h R/W Averaging and Sampling Config Controls averaging and sampling window 39h Page 27 26h R/W Calibration Activate Forces re-calibration for capacitive touch sensor inputs 00h Page 28 27h R/W Interrupt Enable Enables Interrupts associated with capacitive touch sensor inputs 3Fh Page 29 28h R/W Repeat Rate Enable Enables repeat rate for all sensor inputs 3Fh Page 29 2Ah R/W Multiple Touch Configuration Determines the number of simultaneous touches to flag a multiple touch condition 80h Page 30 2Bh R/W Multiple Touch Pattern Configuration Determines the multiple touch pattern (MTP) configuration 00h Page 30 2Dh R/W Multiple Touch Pattern Determines the pattern or number of sensor inputs used by the MTP circuitry 3Fh Page 31 2015 Microchip Technology Inc. DS00001624B-page 19 CAP1106 2Fh R/W Recalibration Configuration Determines re-calibration timing and sampling window 8Ah Page 32 30h R/W Sensor Input 1 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 1 40h Page 33 31h R/W Sensor Input 2 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 2 40h Page 33 32h R/W Sensor Input 3 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 3 40h Page 33 33h R/W Sensor Input 4 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 4 40h Page 33 34h R/W Sensor Input 5 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 5 40h Page 33 35h R/W Sensor Input 6 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 6 40h Page 33 38h R/W Sensor Input Noise Threshold Stores controls for selecting the noise threshold for all sensor inputs 01h Page 33 Standby Configuration Registers 40h R/W Standby Channel Controls which sensor inputs are enabled while in standby 00h Page 34 41h R/W Standby Configuration Controls averaging and cycle time while in standby 39h Page 34 42h R/W Standby Sensitivity Controls sensitivity settings used while in standby 02h Page 35 43h R/W Standby Threshold Stores the touch detection threshold for active sensor inputs in standby 40h Page 36 44h R/W Configuration 2 Stores additional configuration controls for the device 40h Page 24 Base Count Registers 50h R Sensor Input 1 Base Count Stores the reference count value for sensor input 1 C8h Page 36 51h R Sensor Input 2 Base Count Stores the reference count value for sensor input 2 C8h Page 36 52h R Sensor Input 3 Base Count Stores the reference count value for sensor input 3 C8h Page 36 53h R Sensor Input 4 Base Count Stores the reference count value for sensor input 4 C8h Page 36 54h R Sensor Input 5 Base Count Stores the reference count value for sensor input 5 C8h Page 36 55h R Sensor Input 6 Base Count Stores the reference count value for sensor input 6 C8h Page 36 B1h R Sensor Input 1 Calibration Stores the upper 8-bit calibration value for sensor input 1 00h Page 37 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page CAP1106 DS00001624B-page 20 2015 Microchip Technology Inc. During Power-On-Reset (POR), the default values are stored in the registers. A POR is initiated when power is first applied to the part and the voltage on the VDD supply surpasses the POR level as specified in the electrical characteristics. Any reads to undefined registers will return 00h. Writes to undefined registers will not have an effect. When a bit is “set”, this means that the user writes a logic ‘1’ to it. When a bit is “cleared”, this means that the user writes a logic ‘0’ to it. 6.1 Main Control Register The Main Control register controls the primary power state of the device. Bits 7 - 6 - GAIN[1:0] - Controls the gain used by the capacitive touch sensing circuitry. As the gain is increased, the effective sensitivity is likewise increased as a smaller delta capacitance is required to generate the same delta count values. The sensitivity settings may need to be adjusted along with the gain settings such that data overflow does not occur. APPLICATION NOTE: The gain settings apply to both Standby and Active states. B2h R Sensor Input 2 Calibration Stores the upper 8-bit calibration value for sensor input 2 00h Page 37 B3h R Sensor Input 3 Calibration Stores the upper 8-bit calibration value for sensor input 3 00h Page 37 B4h R Sensor Input 4 Calibration Stores the upper 8-bit calibration value for sensor input 4 00h Page 37 B5h R Sensor Input 5 Calibration Stores the upper 8-bit calibration value for sensor input 5 00h Page 37 B6h R Sensor Input 6 Calibration Stores the upper 8-bit calibration value for sensor input 6 00h Page 37 B9h R Sensor Input Calibration LSB 1 Stores the 2 LSBs of the calibration value for sensor inputs 1 - 4 00h Page 37 BAh R Sensor Input Calibration LSB 2 Stores the 2 LSBs of the calibration value for sensor inputs 5- 6 00h Page 37 FDh R Product ID CAP1106 Stores a fixed value that identifies each product 55h Page 37 FEh R Manufacturer ID Stores a fixed value that identifies Microchip 5Dh Page 38 FFh R Revision Stores a fixed value that represents the revision number 83h Page 38 TABLE 6-2: MAIN CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 00h R/W Main Control GAIN[1:0] STBY DSLEEP - - - INT 00h TABLE 6-3: GAIN BIT DECODE GAIN[1:0] Capacitive Touch Sensor Gain 1 0 0 0 1 01 2 10 4 11 8 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page 2015 Microchip Technology Inc. DS00001624B-page 21 CAP1106 Bit 5 - STBY - Enables Standby. • ‘0’ (default) - Sensor input scanning is active. • ‘1’ - Capacitive touch sensor input scanning is limited to the sensor inputs set in the Standby Channel register (see Section 6.20). The status registers will not be cleared until read. Sensor inputs that are no longer sampled will flag a release and then remain in a non-touched state. • Bit 4 - DSLEEP - Enables Deep Sleep by deactivating all functions. ‘0’ (default) - Sensor input scanning is active. • ‘1’ - All sensor input scanning is disabled.. The status registers are automatically cleared and the INT bit is cleared. Bit 0 - INT - Indicates that there is an interrupt. When this bit is set, it asserts the ALERT# pin. If a channel detects a touch and its associated interrupt enable bit is not set to a logic ‘1’, no action is taken. This bit is cleared by writing a logic ‘0’ to it. When this bit is cleared, the ALERT# pin will be deasserted and all status registers will be cleared if the condition has been removed. • ‘0’ - No interrupt pending. • ‘1’ - A touch has been detected on one or more channels and the interrupt has been asserted. 6.2 Status Registers All status bits are cleared when the device enters the Deep Sleep (DSLEEP = ‘1’ - see Section 6.1). 6.2.1 GENERAL STATUS - 02H Bit 2 - MULT - Indicates that the device is blocking detected touches due to the Multiple Touch detection circuitry (see Section 6.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 6.15). This bit will cause the INT bit to be set if the MTP_ALERT bit is also set. This bit will not be cleared until the condition that caused it to be set has been removed. Bit 0 - TOUCH - Indicates that a touch was detected. This bit is set if any bit in the Sensor Input Status register is set. 6.2.2 SENSOR INPUT STATUS - 03H The Sensor Input Status Register stores status bits that indicate a touch has been detected. A value of ‘0’ in any bit indicates that no touch has been detected. A value of ‘1’ in any bit indicates that a touch has been detected. All bits are cleared when the INT bit is cleared and if a touch on the respective capacitive touch sensor input is no longer present. If a touch is still detected, the bits will not be cleared (but this will not cause the interrupt to be asserted - see Section 6.6). Bit 5 - CS6 - Indicates that a touch was detected on Sensor Input 6. Bit 4 - CS5 - Indicates that a touch was detected on Sensor Input 5. Bit 3 - CS4 - Indicates that a touch was detected on Sensor Input 4. Bit 2 - CS3 - Indicates that a touch was detected on Sensor Input 3. Bit 1 - CS2 - Indicates that a touch was detected on Sensor Input 2. Bit 0 - CS1 - Indicates that a touch was detected on Sensor Input 1. TABLE 6-4: STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 02h R General Status - - - - - MULT MTP TOUCH 00h 03h R Sensor Input Status - - CS6 CS5 CS4 CS3 CS2 CS1 00h CAP1106 DS00001624B-page 22 2015 Microchip Technology Inc. 6.3 Noise Flag Status Registers The Noise Flag Status registers store status bits that are generated from the analog block if the detected noise is above the operating region of the analog detector or the RF noise detector. These bits indicate that the most recently received data from the sensor input is invalid and should not be used for touch detection. So long as the bit is set for a particular channel, the delta count value is reset to 00h and thus no touch is detected. These bits are not sticky and will be cleared automatically if the analog block does not report a noise error. APPLICATION NOTE: If the MTP detection circuitry is enabled, these bits count as sensor inputs above the MTP threshold (see Section 5.2.4, "Multiple Touch Pattern Detection") even if the corresponding delta count is not. If the corresponding delta count also exceeds the MTP threshold, it is not counted twice. APPLICATION NOTE: Regardless of the state of the Noise Status bits, if low frequency noise is detected on a sensor input, that sample will be discarded unless the DIS_ANA_NOISE bit is set. As well, if RF noise is detected on a sensor input, that sample will be discarded unless the DIS_RF_NOISE bit is set. 6.4 Sensor Input Delta Count Registers 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. The count value represents a change in input due to the capacitance associated with a touch on one of the sensor inputs and is referenced to a calibrated base “Not Touched” count value. The delta is an instantaneous change and is updated once per sensor input per sensing cycle (see Section 5.2.1, "Sensing Cycle"). The value presented is a standard 2’s complement number. In addition, the value is capped at a value of 7Fh. A reading of 7Fh indicates that the sensitivity settings are too high and should be adjusted accordingly (see Section 6.5). The value is also capped at a negative value of 80h for negative delta counts which may result upon a release. 6.5 Sensitivity Control Register TABLE 6-5: NOISE FLAG STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 0Ah R Noise Flag Status - - CS6_ NOISE CS5_ NOISE CS4_ NOISE CS3_ NOISE CS2_ NOISE CS1_ NOISE 00h TABLE 6-6: SENSOR INPUT DELTA COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 10h R Sensor Input 1 Delta Count Sign 64 32 16 8 4 2 1 00h 11h R Sensor Input 2 Delta Count Sign 64 32 16 8 4 2 1 00h 12h R Sensor Input 3 Delta Count Sign 64 32 16 8 4 2 1 00h 13h R Sensor Input 4 Delta Count Sign 64 32 16 8 4 2 1 00h 14h R Sensor Input 5 Delta Count Sign 64 32 16 8 4 2 1 00h 15h R Sensor Input 6 Delta Count Sign 64 32 16 8 4 2 1 00h TABLE 6-7: SENSITIVITY CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 1Fh R/W Sensitivity Control - DELTA_SENSE[2:0] BASE_SHIFT[3:0] 2Fh 2015 Microchip Technology Inc. DS00001624B-page 23 CAP1106 The Sensitivity Control register controls the sensitivity of a touch detection. Bits 6-4 DELTA_SENSE[2:0] - Controls the sensitivity of a touch detection. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the more sensitive settings, touches are detected for a smaller delta capacitance corresponding to a “lighter” touch. These settings are more sensitive to noise, however, and a noisy environment may flag more false touches with higher sensitivity levels. APPLICATION NOTE: A value of 128x is the most sensitive setting available. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely, a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 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. The scale factor represents the multiplier to the bit-weighting presented in these register descriptions. APPLICATION NOTE: The BASE_SHIFT[3:0] bits normally do not need to be updated. These settings will not affect touch detection or sensitivity. These bits are sometimes helpful in analyzing the Cap Sensing board performance and stability. TABLE 6-8: DELTA_SENSE BIT DECODE DELTA_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-9: BASE_SHIFT BIT DECODE BASE_SHIFT[3:0] Data Scaling Factor 32 1 0 0 0 0 0 1x 0 0 0 1 2x 0 0 1 0 4x 0 0 1 1 8x 0 1 0 0 16x 0 1 0 1 32x 0 1 1 0 64x 0 1 1 1 128x 1 0 0 0 256x All others 256x (default = 1111b) CAP1106 DS00001624B-page 24 2015 Microchip Technology Inc. 6.6 Configuration Registers The Configuration registers control general global functionality that affects the entire device. 6.6.1 CONFIGURATION - 20H Bit 7 - TIMEOUT - Enables the timeout and idle functionality of the SMBus protocol. • ‘0’ (default for Functional Revision C) - The SMBus timeout and idle functionality are disabled. The SMBus interface will not time out if the clock line is held low. Likewise, it will not reset if both the data and clock lines are held high for longer than 200us. This is used for I2C compliance. • ‘1’ (default for Functional Revision B) - The SMBus timeout and idle functionality are enabled. The SMBus interface will time out if the clock line is held low for longer than 30ms. Likewise, it will reset if both the data and clock lines are held high for longer than 200us. Bit 5 - DIS_DIG_NOISE - Determines whether the digital noise threshold (see Section 6.19, "Sensor Input Noise Threshold Register") is used by the device. Setting this bit disables the feature. • ‘0’ - The digital noise threshold is used. If a delta count value exceeds the noise threshold but does not exceed the touch threshold, the sample is discarded and not used for the automatic re-calibration routine. • ‘1’ (default) - The noise threshold is disabled. Any delta count that is less than the touch threshold is used for the automatic re-calibration routine. Bit 4 - DIS_ANA_NOISE - Determines whether the analog noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If low frequency noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if low frequency noise is detected. Bit 3 - MAX_DUR_EN - Determines whether the maximum duration recalibration is enabled. • ‘0’ (default) - The maximum duration recalibration functionality is disabled. A touch may be held indefinitely and no re-calibration will be performed on any sensor input. • ‘1’ - The maximum duration recalibration functionality is enabled. If a touch is held for longer than the MAX_DUR bit settings, then the re-calibration routine will be restarted (see Section 6.8). 6.6.2 CONFIGURATION 2 - 44H Bit 6 - ALT_POL - Determines the ALERT# pin polarity and behavior. • ‘0’ - The ALERT# pin is active high and push-pull. • ‘1’ (default) - The ALERT# pin is active low and open drain. Bit 5 - BLK_PWR_CTRL - Determines whether the device will reduce power consumption while waiting between conversion time completion and the end of the polling cycle. • ‘0’ (default) - The device will always power down as much as possible during the time between the end of the last conversion and the end of the polling cycle. • ‘1’ - The device will not power down the Cap Sensor during the time between the end of the last conversion and the end of the polling cycle. Bit 3 - SHOW_RF_NOISE - Determines whether the Noise Status bits will show RF Noise as the only input source. • ‘0’ (default) - The Noise Status registers will show both RF noise and low frequency EMI noise if either is detected on a capacitive touch sensor input. • ‘1’ - The Noise Status registers will only show RF noise if it is detected on a capacitive touch sensor input. EMI TABLE 6-10: CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 20h R/W Configuration TIMEOUT - DIS_ DIG_ NOISE DIS_ ANA_ NOISE MAX_ DUR_EN - -- A0h (Rev B) 20h (rev C) 44h R/W Configuration 2 - ALT_ POL BLK_PWR_ CTRL - SHOW_ RF_ NOISE DIS_ RF_ NOISE - INT_ REL_n 40h 2015 Microchip Technology Inc. DS00001624B-page 25 CAP1106 noise will still be detected and touches will be blocked normally; however, the status bits will not be updated. Bit 2 - DIS_RF_NOISE - Determines whether the RF noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If RF noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if RF noise is detected. Bit 0 - INT_REL_n - Controls the interrupt behavior when a release is detected on a button. • ‘0’ (default) - An interrupt is generated when a press is detected and again when a release is detected and at the repeat rate (if enabled - see Section 6.13). • ‘1’ - An interrupt is generated when a press is detected and at the repeat rate but not when a release is detected. 6.7 Sensor Input Enable Registers 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. Bit 5 - CS6_EN - Enables the CS6 input to be included during the sampling cycle. • ‘0’ - The CS6 input is not included in the sampling cycle. • ‘1’ (default) - The CS6 input is included in the sampling cycle. Bit 4 - CS5_EN - Enables the CS5 input to be included during the sampling cycle. Bit 3 - CS4_EN - Enables the CS4 input to be included during the sampling cycle. Bit 2 - CS3_EN - Enables the CS3 input to be included during the sampling cycle. Bit 1 - CS2_EN - Enables the CS2 input to be included during the sampling cycle. Bit 0 - CS1_EN - Enables the CS1 input to be included during the sampling cycle. 6.8 Sensor Input Configuration Register The Sensor Input Configuration Register controls timings associated with the Capacitive sensor inputs 1 - 6. Bits 7 - 4 - MAX_DUR[3:0] - (default 1010b) - Determines the maximum time that a sensor pad is allowed to be touched until the capacitive touch sensor input is recalibrated, as shown in Table 6-13. TABLE 6-11: SENSOR INPUT ENABLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 21h R/W Sensor Input Enable - - CS6_EN CS5_EN CS4_EN CS3_EN CS2_EN CS1_EN 3Fh TABLE 6-12: SENSOR INPUT CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 22h R/W Sensor Input Configuration MAX_DUR[3:0] RPT_RATE[3:0] A4h TABLE 6-13: MAX_DUR BIT DECODE MAX_DUR[3:0] Time Before Recalibration 32 1 0 0 0 0 0 560ms 0 0 0 1 840ms 0 0 1 0 1120ms 0 0 1 1 1400ms 0 1 0 0 1680ms 0 1 0 1 2240ms 0 1 1 0 2800ms CAP1106 DS00001624B-page 26 2015 Microchip Technology Inc. Bits 3 - 0 - RPT_RATE[3:0] - (default 0100b) Determines the time duration between interrupt assertions when auto repeat is enabled. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-14. 6.9 Sensor Input Configuration 2 Register Bits 3 - 0 - M_PRESS[3:0] - (default 0111b) - Determines the minimum amount of time that sensor inputs configured to use auto repeat must detect a sensor pad touch to detect a “press and hold” event. If the sensor input detects a touch for longer than the M_PRESS[3:0] settings, a “press and hold” event is detected. If a sensor input detects a touch for less than or equal to the M_PRESS[3:0] settings, a touch event is detected. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-16. 1 1 1 3360ms 1 0 0 0 3920ms 1 0 0 1 4480ms 1 0 1 0 5600ms (default) 1 0 1 1 6720ms 1 1 0 0 7840ms 1 1 0 1 8906ms 1 1 1 0 10080ms 1 1 1 1 11200ms TABLE 6-14: RPT_RATE BIT DECODE RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms (default) 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms 1 0 0 0 315ms 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 TABLE 6-15: SENSOR INPUT CONFIGURATION 2 REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 23h R/W Sensor Input Configuration 2 - - - - M_PRESS[3:0] 07h TABLE 6-13: MAX_DUR BIT DECODE (CONTINUED) MAX_DUR[3:0] Time Before Recalibration 32 1 0 2015 Microchip Technology Inc. DS00001624B-page 27 CAP1106 6.10 Averaging and Sampling Configuration Register The Averaging and Sampling Configuration register controls the number of samples taken and the total sensor input cycle time for all active sensor inputs while the device is functioning in Active state. Bits 6 - 4 - AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-18. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. For example, if CS1, CS2, and CS3 are sampled during the sensor cycle, and the AVG[2:0] bits are set to take 4 samples per channel, then the full sensor cycle will be: CS1, CS1, CS1, CS1, CS2, CS2, CS2, CS2, CS3, CS3, CS3, CS3. Bits 3 - 2 - SAMP_TIME[1:0] - Determines the time to take a single sample as shown in Table 6-19. TABLE 6-16: M_PRESS BIT DECODE M_PRESS[3:0] M_PRESS SETTINGS 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms (default) 1 0 0 0 315ms 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 TABLE 6-17: AVERAGING AND SAMPLING CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 24h R/W Averaging and Sampling Config AVG[2:0] SAMP_TIME[1:0] CYCLE_TIME [1:0] 39h TABLE 6-18: AVG BIT DECODE AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 CAP1106 DS00001624B-page 28 2015 Microchip Technology Inc. Bits 1 - 0 - CYCLE_TIME[1:0] - Determines the overall cycle time for all measured channels during normal operation as shown in Table 6-20. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, then the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. 6.11 Calibration Activate Register The Calibration Activate register forces the respective sensor inputs to be re-calibrated affecting both the analog and digital blocks. During the re-calibration routine, the sensor inputs will not detect a press for up to 600ms and the Sensor Input Base Count register values will be invalid. During this time, any press on the corresponding sensor pads will invalidate the re-calibration. When finished, the CALX[9:0] bits will be updated (see Section 6.25). When the corresponding bit is set, the device will perform the calibration and the bit will be automatically cleared once the re-calibration routine has finished. Bit 5 - CS6_CAL - When set, the CS6 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 4 - CS5_CAL - When set, the CS5 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 3 - CS4_CAL - When set, the CS4 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 2 - CS3_CAL - When set, the CS3 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 1 - CS2_CAL - When set, the CS2 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 0 - CS1_CAL - When set, the CS1 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. TABLE 6-19: SAMP_TIME BIT DECODE SAMP_TIME[1:0] Sample Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-20: CYCLE_TIME BIT DECODE CYCLE_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms TABLE 6-21: CALIBRATION ACTIVATE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 26h R/W Calibration Activate - - CS6_ CAL CS5_ CAL CS4_ CAL CS3_ CAL CS2_ CAL CS1_ CAL 00h 2015 Microchip Technology Inc. DS00001624B-page 29 CAP1106 6.12 Interrupt Enable Register The Interrupt Enable register determines whether a sensor pad touch or release (if enabled) causes the interrupt pin to be asserted. Bit 5 - CS6_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS6 (associated with the CS6 status bit). • ‘0’ - The interrupt pin will not be asserted if a touch is detected on CS6 (associated with the CS6 status bit). • ‘1’ (default) - The interrupt pin will be asserted if a touch is detected on CS6 (associated with the CS6 status bit). Bit 4 - CS5_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS5 (associated with the CS5 status bit). Bit 3 - CS4_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS4 (associated with the CS4 status bit). Bit 2 - CS3_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS3 (associated with the CS3 status bit). Bit 1 - CS2_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS2 (associated with the CS2 status bit). Bit 0 - CS1_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS1 (associated with the CS1 status bit). 6.13 Repeat Rate Enable Register The Repeat Rate Enable register enables the repeat rate of the sensor inputs as described in Section 5.3.1. Bit 5 - CS6_RPT_EN - Enables the repeat rate for capacitive touch sensor input 6. • ‘0’ - The repeat rate for CS6 is disabled. It will only generate an interrupt when a touch is detected and when a release is detected no matter how long the touch is held for. • ‘1’ (default) - The repeat rate for CS6 is enabled. In the case of a “touch” event, it will generate an interrupt when a touch is detected and a release is detected (as determined by the INT_REL_n bit - see Section 6.6). In the case of a “press and hold” event, it will generate an interrupt when a touch is detected and at the repeat rate so long as the touch is held. Bit 4 - CS5_RPT_EN - Enables the repeat rate for capacitive touch sensor input 5. Bit 3 - CS4_RPT_EN - Enables the repeat rate for capacitive touch sensor input 4. Bit 2 - CS3_RPT_EN - Enables the repeat rate for capacitive touch sensor input 3. Bit 1 - CS2_RPT_EN - Enables the repeat rate for capacitive touch sensor input 2. Bit 0 - CS1_RPT_EN - Enables the repeat rate for capacitive touch sensor input 1. TABLE 6-22: INTERRUPT ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 27h R/W Interrupt Enable - - CS6_ INT_EN CS5_ INT_EN CS4_ INT_EN CS3_ INT_EN CS2_ INT_EN CS1_ INT_EN 3Fh TABLE 6-23: REPEAT RATE ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 28h R/W Repeat Rate Enable - - CS6_ RPT_EN CS5_ RPT_EN CS4_ RPT_EN CS3_ RPT_EN CS2_ RPT_EN CS1_ RPT_EN 3Fh CAP1106 DS00001624B-page 30 2015 Microchip Technology Inc. 6.14 Multiple Touch Configuration Register The Multiple Touch Configuration register controls the settings for the multiple touch detection circuitry. These settings determine the number of simultaneous buttons that may be pressed before additional buttons are blocked and the MULT status bit is set. Bit 7 - MULT_BLK_EN - Enables the multiple button blocking circuitry. • ‘0’ - The multiple touch circuitry is disabled. The device will not block multiple touches. • ‘1’ (default) - The multiple touch circuitry is enabled. The device will flag the number of touches equal to programmed multiple touch threshold and block all others. It will remember which sensor inputs are valid and block all others until that sensor pad has been released. Once a sensor pad has been released, the N detected touches (determined via the cycle order of CS1 - CS6) will be flagged and all others blocked. Bits 3 - 2 - B_MULT_T[1:0] - Determines the number of simultaneous touches on all sensor pads before a Multiple Touch Event is detected and sensor inputs are blocked. The bit decode is given by Table 6-25. 6.15 Multiple Touch Pattern Configuration Register The Multiple Touch Pattern Configuration register controls the settings for the multiple touch pattern detection circuitry. This circuitry works like the multiple touch detection circuitry with the following differences: 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. The MTP detection circuitry either will detect a specific pattern of sensor inputs as determined by the Multiple Touch Pattern register settings or it will use the Multiple Touch Pattern register settings to determine a minimum number of sensor inputs that will cause the MTP circuitry to flag an event. When using pattern recognition mode, if all of the sensor inputs set by the Multiple Touch Pattern register have a delta count greater than the MTP threshold or have their corresponding Noise Flag Status bits set, the MTP bit will be set. When using the absolute number mode, if the number of sensor inputs with thresholds above the MTP threshold or with Noise Flag Status bits set is equal to or greater than this number, the MTP bit will be set. 3. When an MTP event occurs, all touches are blocked and an interrupt is generated. 4. All sensor inputs will remain blocked so long as the requisite number of sensor inputs are above the MTP threshold or have Noise Flag Status bits set. Once this condition is removed, touch detection will be restored. Note that the MTP status bit is only cleared by writing a ‘0’ to the INT bit once the condition has been removed. TABLE 6-24: MULTIPLE TOUCH CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Ah R/W Multiple Touch Config MULT_ BLK_ EN - - - B_MULT_T[1:0] - - 80h TABLE 6-25: B_MULT_T BIT DECODE B_MULT_T[1:0] Number of Simultaneous Touches 1 0 0 0 1 (default) 01 2 10 3 11 4 TABLE 6-26: MULTIPLE TOUCH PATTERN CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Bh R/W Multiple Touch Pattern Config MTP_ EN - - MTP_TH[1:0] COMP_ PTRN MTP_ ALERT 00h 2015 Microchip Technology Inc. DS00001624B-page 31 CAP1106 Bit 7 - MTP_EN - Enables the multiple touch pattern detection circuitry. • ‘0’ (default) - The MTP detection circuitry is disabled. • ‘1’ - The MTP detection circuitry is enabled. Bits 3-2 - MTP_TH[1:0] - Determine the MTP threshold, as shown in Table 6-27. This threshold is a percentage of sensor input threshold (see Section 6.18, "Sensor Input Threshold Registers") when the device is in the Fully Active state or of the standby threshold (see Section 6.23, "Standby Threshold Register") when the device is in the Standby state. Bit 1 - COMP_PTRN - Determines whether the MTP detection circuitry will use the Multiple Touch Pattern register as a specific pattern of sensor inputs or as an absolute number of sensor inputs. • ‘0’ (default) - The MTP detection circuitry will use the Multiple Touch Pattern register bit settings as an absolute minimum number of sensor inputs that must be above the threshold or have Noise Flag Status bits set. The number will be equal to the number of bits set in the register. • ‘1’ - The MTP detection circuitry will use pattern recognition. Each bit set in the Multiple Touch Pattern register indicates a specific sensor input that must have a delta count greater than the MTP threshold or have a Noise Flag Status bit set. If the criteria are met, the MTP status bit will be set. Bit 0 - MTP_ALERT - Enables an interrupt if an MTP event occurs. In either condition, the MTP status bit will be set. • ‘0’ (default) - If an MTP event occurs, the ALERT# pin is not asserted. • ‘1’ - If an MTP event occurs, the ALERT# pin will be asserted. 6.16 Multiple Touch Pattern Register The Multiple Touch Pattern register acts as a pattern to identify an expected sensor input profile for diagnostics or other significant events. There are two methods for how the Multiple Touch Pattern register is used: as specific sensor inputs or number of sensor input that must exceed the MTP threshold or have Noise Flag Status bits set. Which method is used is based on the COMP_PTRN bit (see Section 6.15). The methods are described below. 1. Specific Sensor Inputs: If, during a single polling cycle, the specific sensor inputs above the MTP threshold or with Noise Flag Status bits set match those bits set in the Multiple Touch Pattern register, an MTP event is flagged. 2. Number of Sensor Inputs: If, during a single polling cycle, the number of sensor inputs with a delta count above the MTP threshold or with Noise Flag Status bits set is equal to or greater than the number of pattern bits set, an MTP event is flagged. Bit 5 - CS6_PTRN - Determines whether CS6 is considered as part of the Multiple Touch Pattern. • ‘0’ - CS6 is not considered a part of the pattern. • ‘1’ - CS6 is considered a part of the pattern or the absolute number of sensor inputs that must have a delta count greater than the MTP threshold or have the Noise Flag Status bit set is increased by 1. Bit 4 - CS5_PTRN - Determines whether CS5 is considered as part of the Multiple Touch Pattern. Bit 3 - CS4_PTRN - Determines whether CS4 is considered as part of the Multiple Touch Pattern. Bit 2 - CS3_PTRN - Determines whether CS3 is considered as part of the Multiple Touch Pattern. TABLE 6-27: MTP_TH BIT DECODE MTP_TH[1:0] Threshold Divide Setting 1 0 0 0 12.5% (default) 0 1 25% 1 0 37.5% 1 1 100% TABLE 6-28: MULTIPLE TOUCH PATTERN REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Dh R/W Multiple Touch Pattern - - CS6_ PTRN CS5_ PTRN CS4_ PTRN CS3_ PTRN CS2_ PTRN CS1_ PTRN 3Fh CAP1106 DS00001624B-page 32 2015 Microchip Technology Inc. Bit 1 - CS2_PTRN - Determines whether CS2 is considered as part of the Multiple Touch Pattern. Bit 0 - CS1_PTRN - Determines whether CS1 is considered as part of the Multiple Touch Pattern. 6.17 Recalibration Configuration Register The Recalibration Configuration register controls the automatic re-calibration routine settings as well as advanced controls to program the Sensor Input Threshold register settings. 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 6). The individual Sensor Input X Threshold registers (Sensor Input 2 Threshold through Sensor Input 6 Threshold) can be individually updated at any time. Bit 6 - NO_CLR_INTD - Controls whether the accumulation of intermediate data is cleared if the noise status bit is set. • ‘0’ (default) - The accumulation of intermediate data is cleared if the noise status bit is set. • ‘1’ - The accumulation of intermediate data is not cleared if the noise status bit is set. APPLICATION NOTE: Bits 5 and 6 should both be set to the same value. Either both should be set to ‘0’ or both should be set to ‘1’. Bit 5 - NO_CLR_NEG - Controls whether the consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘0’ (default) - The consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘1’ - The consecutive negative delta counts counter is not cleared if the noise status bit is set. Bits 4 - 3 - NEG_DELTA_CNT[1:0] - Determines the number of negative delta counts necessary to trigger a digital recalibration as shown in Table 6-30. Bits 2 - 0 - CAL_CFG[2:0] - Determines the update time and number of samples of the automatic re-calibration routine. The settings apply to all sensor inputs universally (though individual sensor inputs can be configured to support re-calibration - see Section 6.11). TABLE 6-29: RECALIBRATION CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Fh R/W Recalibration Configuration BUT_ LD_TH NO_ CLR_ INTD NO_ CLR_ NEG NEG_DELTA_ CNT[1:0] CAL_CFG[2:0] 8Ah TABLE 6-30: NEG_DELTA_CNT BIT DECODE NEG_DELTA_CNT[1:0] Number of Consecutive Negative Delta Count Values 1 0 00 8 0 1 16 (default) 1 0 32 1 1 None (disabled) TABLE 6-31: CAL_CFG BIT DECODE CAL_CFG[2:0] Recalibration Samples (see Note 6-1) Update Time (see Note 6-2) 210 0 0 0 16 16 0 0 1 32 32 2015 Microchip Technology Inc. DS00001624B-page 33 CAP1106 Note 6-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 6-2 Update Time refers to the amount of time (in polling cycle periods) that elapses before the Base Count is updated. The time will depend upon the number of channels active, the averaging setting, and the programmed cycle time. 6.18 Sensor Input Threshold Registers The Sensor Input Threshold registers store the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. When the BUT_LD_TH bit is set (see Section 6.17 - bit 7), writing data to the Sensor Input 1 Threshold register will update all of the sensor input threshold registers (31h - 35h inclusive). 6.19 Sensor Input Noise Threshold Register The Sensor Input Noise Threshold register controls the value of a secondary internal threshold to detect noise and improve the automatic recalibration routine. If a capacitive touch sensor input exceeds the Sensor Input Noise Threshold but does not exceed the sensor input threshold, it is determined to be caused by a noise spike. That sample is not used by the automatic re-calibration routine. This feature can be disabled by setting the DIS_DIG_NOISE bit. 0 1 0 64 64 (default) 0 1 1 128 128 1 0 0 256 256 1 0 1 256 1024 1 1 0 256 2048 1 1 1 256 4096 TABLE 6-32: SENSOR INPUT THRESHOLD REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 30h R/W Sensor Input 1 Threshold - 64 32 16 8 4 2 1 40h 31h R/W Sensor Input 2 Threshold - 64 32 16 8 4 2 1 40h 32h R/W Sensor Input 3 Threshold - 64 32 16 8 4 2 1 40h 33h R/W Sensor Input 4 Threshold - 64 32 16 8 4 2 1 40h 34h R/W Sensor Input 5 Threshold - 64 32 16 8 4 2 1 40h 35h R/W Sensor Input 6 Threshold - 64 32 16 8 4 2 1 40h TABLE 6-33: SENSOR INPUT NOISE THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 38h R/W Sensor Input Noise Threshold CS_BN_TH [1:0] 01h TABLE 6-31: CAL_CFG BIT DECODE (CONTINUED) CAL_CFG[2:0] Recalibration Samples (see Note 6-1) Update Time (see Note 6-2) 210 CAP1106 DS00001624B-page 34 2015 Microchip Technology Inc. Bits 1-0 - CS1_BN_TH[1:0] - Controls the noise threshold for all capacitive touch sensor inputs, as shown in Table 6-34. The threshold is proportional to the threshold setting. 6.20 Standby Channel Register The Standby Channel register controls which (if any) capacitive touch sensor inputs are active during Standby. Bit 5 - CS6_STBY - Controls whether the CS6 channel is active in Standby. • ‘0’ (default) - The CS6 channel not be sampled during Standby mode. • ‘1’ - The CS6 channel will be sampled during Standby Mode. It will use the Standby threshold setting, and the standby averaging and sensitivity settings. Bit 4 - CS5_STBY - Controls whether the CS5 channel is active in Standby. 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. 6.21 Standby Configuration Register The Standby Configuration register controls averaging and cycle time for those sensor inputs that are active in Standby. This register is useful for detecting proximity on a small number of sensor inputs as it allows the user to change averaging and sample times on a limited number of sensor inputs and still maintain normal functionality in the fully active state. Bit 7 - AVG_SUM - Determines whether the active sensor inputs will average the programmed number of samples or whether they will accumulate for the programmed number of samples. • ‘0’ - (default) - The active sensor input delta count values will be based on the average of the programmed number of samples when compared against the threshold. • ‘1’ - The active sensor input delta count values will be based on the summation of the programmed number of samples when compared against the threshold. This bit should only be set when performing proximity detection as a physical touch will overflow the delta count registers and may result in false readings. Bits 6 - 4 - STBY_AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-37. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. TABLE 6-34: CSX_BN_TH BIT DECODE CS_BN_TH[1:0] Percent Threshold Setting 1 0 0 0 25% 0 1 37.5% (default) 1 0 50% 1 1 62.5% TABLE 6-35: STANDBY CHANNEL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 40h R/W Standby Channel - - CS6_ STBY CS5_ STBY CS4_ STBY CS3_ STBY CS2_ STBY CS1_ STBY 00h TABLE 6-36: STANDBY CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 41h R/W Standby Configuration AVG_ SUM STBY_AVG[2:0] STBY_SAMP_ TIME[1:0] STBY_CY_TIME [1:0] 39h 2015 Microchip Technology Inc. DS00001624B-page 35 CAP1106 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 6-38. Bits 1 - 0 - STBY_CY_TIME[2:0] - Determines the overall cycle time for all measured channels during standby operation as shown in Table 6-39. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The STBY_AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. 6.22 Standby Sensitivity Register The Standby Sensitivity register controls the sensitivity for sensor inputs that are active in Standby. TABLE 6-37: STBY_AVG BIT DECODE STBY_AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-38: STBY_SAMP_TIME BIT DECODE STBY_SAMP_TIME[1:0] Sampling Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-39: STBY_CY_TIME BIT DECODE STBY_CY_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms TABLE 6-40: STANDBY SENSITIVITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 42h R/W Standby Sensitivity - - - - - STBY_SENSE[2:0] 02h CAP1106 DS00001624B-page 36 2015 Microchip Technology Inc. Bits 2 - 0 - STBY_SENSE[2:0] - Controls the sensitivity for sensor inputs that are active in Standby. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the 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. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 6.23 Standby Threshold Register The Standby Threshold register stores the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. 6.24 Sensor Input Base Count Registers TABLE 6-41: STBY_SENSE BIT DECODE STBY_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-42: STANDBY THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 43h R/W Standby Threshold - 64 32 16 8 4 2 1 40h TABLE 6-43: SENSOR INPUT BASE COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 50h R Sensor Input 1 Base Count 128 64 32 16 8 4 2 1 C8h 51h R Sensor Input 2 Base Count 128 64 32 16 8 4 2 1 C8h 52h R Sensor Input 3 Base Count 128 64 32 16 8 4 2 1 C8h 53h R Sensor Input 4 Base Count 128 64 32 16 8 4 2 1 C8h 54h R Sensor Input 5 Base Count 128 64 32 16 8 4 2 1 C8h 55h R Sensor Input 6 Base Count 128 64 32 16 8 4 2 1 C8h 2015 Microchip Technology Inc. DS00001624B-page 37 CAP1106 The Sensor Input Base Count registers store the calibrated “Not Touched” input value from the capacitive touch sensor inputs. These registers are periodically updated by the re-calibration routine. The routine uses an internal adder to add the current count value for each reading to the sum of the previous readings until sample size has been reached. At this point, the upper 16 bits are taken and used as the Sensor Input Base Count. The internal adder is then reset and the re-calibration routine continues. The data presented is determined by the BASE_SHIFT[3:0] bits (see Section 6.5). 6.25 Sensor Input Calibration Registers The Sensor Input Calibration registers hold the 10-bit value that represents the last calibration value. 6.26 Product ID Register The Product ID register stores a unique 8-bit value that identifies the device. 6.27 Manufacturer ID Register The Vendor ID register stores an 8-bit value that represents Microchip. TABLE 6-44: SENSOR INPUT CALIBRATION REGISTERS ADDR Register R/W B7 B6 B5 B4 B3 B2 B1 B0 Default B1h Sensor Input 1 Calibration R CAL1_9 CAL1_8 CAL1_7 CAL1_6 CAL1_5 CAL1_4 CAL1_3 CAL1_2 00h B2h Sensor Input 2 Calibration R CAL2_9 CAL2_8 CAL2_7 CAL2_6 CAL2_5 CAL2_4 CAL2_3 CAL2_2 00h B3h Sensor Input 3 Calibration R CAL3_9 CAL3_8 CAL3_7 CAL3_6 CAL3_5 CAL3_4 CAL3_3 CAL3_2 00h B4h Sensor Input 4 Calibration R CAL4_9 CAL4_8 CAL4_7 CAL4_6 CAL4_5 CAL4_4 CAL4_3 CAL4_2 00h B5h Sensor Input 5 Calibration R CAL5_9 CAL5_8 CAL5_7 CAL5_6 CAL5_5 CAL5_4 CAL5_3 CAL5_2 00h B6h Sensor Input 6 Calibration R CAL6_9 CAL6_8 CAL6_7 CAL6_6 CAL6_5 CAL6_4 CAL6_3 CAL6_2 00h B9h Sensor Input Calibration LSB 1 R CAL4_1 CAL4_0 CAL3_1 CAL3_0 CAL2_1 CAL2_0 CAL1_1 CAL1_0 00h BAh Sensor Input Calibration LSB 2 R - - - - CAL6_1 CAL6_0 CAL5_1 CAL5_0 00h TABLE 6-45: PRODUCT ID REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FDh R Product ID CAP1106 0 1 0 1 0 1 0 1 55h TABLE 6-46: 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 CAP1106 DS00001624B-page 38 2015 Microchip Technology Inc. 6.28 Revision Register The Revision register stores an 8-bit value that represents the part revision. TABLE 6-47: REVISION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FFh R Revision 1 0 0 0 0 0 1 1 83h 2015 Microchip Technology Inc. DS00001624B-page 39 CAP1106 7.0 PACKAGE INFORMATION 7.1 CAP1106 Package Drawings FIGURE 7-1: 10-Pin DFN 3mm x 3mm Package Drawings (1 of 2) Note: For the most current package drawings, see the Microchip Packaging Specification at http://www.microchip.com/packaging CAP1106 DS00001624B-page 40 2015 Microchip Technology Inc. FIGURE 7-2: 10-Pin DFN 3mm x 3mm Package Drawings (2 of 2) Note: For the most current package drawings, see the Microchip Packaging Specification at http://www.microchip.com/packaging 2015 Microchip Technology Inc. DS00001624B-page 41 CAP1106 7.2 Package Marking FIGURE 7-3: CAP1106 Package Markings 1 8 W NNNA e4 TOP BOTTOM Bottom marking not allowed PB-FREE/GREEN SYMBOL PIN 1 (Ni/Pd PP-LF) Line 1 – Device Code, Week 2x 0.6 Line 2 – Alphanumeric Traceability Code W Lines 1-2: Line 3: Center Horizontal Alignment As Shown CAP1106 DS00001624B-page 42 2015 Microchip Technology Inc. APPENDIX A: DEVICE DELTA A.1 Delta from CAP1006 to CAP1106 1. Updated circuitry to improve power supply rejection. 2. Added Multiple Touch Pattern detection circuitry. See Section 6.15, "Multiple Touch Pattern Configuration Register". 3. Added General Status register to flag Multiple touches, Multiple Touch Pattern issues and general touch detections. See Section 6.2, "Status Registers". 4. Added bits 6 and 5 to the Recalibration Configuration register (2Fh - see Section 6.17, "Recalibration Configuration Register"). These bits control whether the accumulation of intermediate data and the consecutive negative delta counts counter are cleared when the noise status bit is set. 5. Added Configuration 2 register for noise detection controls and control to interrupt on press but not on release. Added control to change alert pin polarity. See Section 6.6, "Configuration Registers". 6. Updated Deep Sleep behavior so that device does not clear DSLEEP bit on received communications but will wake to communicate. 7. Register delta: Table A.1 Register Delta From CAP1006 to CAP1106 Address Register Delta Delta Default 00h Page 20 Changed - Main Status / Control added bits 7-6 to control gain 00h 02h Page 21 New - General Status new register to store MTP, MULT, and general TOUCH bits 00h 44h Page 24 New - Configuration 2 new register to control alert polarity, and noise detection, and interrupt on release 00h 24h Page 27 Changed - Averaging Control updated register bits - moved SAMP_AVG[2:0] bits and added SAMP_- TIME bit 1. Default changed 39h 2Bh Page 30 New - Multiple Touch Pattern Configuration new register for Multiple Touch Pattern configuration - enable and threshold settings 80h 2Dh Page 31 New - Multiple Touch Pattern Register new register for Multiple Touch Pattern detection circuitry - pattern or number of sensor inputs 3Fh 2Fh Page 32 Changed - Recalibration Configuration updated register - updated CAL_CFG bit decode to add a 128 averages setting and removed highest time setting. Default changed. Added bit 6 NO_CLR_INTD and bit 5 NO_CLR_NEG. 8Ah 38h Page 33 Changed - Sensor Input Noise Threshold updated register bits - removed bits 7 - 3 and consolidated all controls into bits 1 - 0. These bits will set the noise threshold for all channels. Default changed 01h 39h Removed - Noise Threshold Register 2 removed register n/a 41h Page 34 Changed - Standby Configuration updated register bits - moved STBY_AVG[2:0] bits and added STBY_- TIME bit 1. Default changed 39h FDh Page 37 Changed - Product ID Changed bit decode for CAP1106 55h 2015 Microchip Technology Inc. DS00001624B-page 43 CAP1106 APPENDIX B: DATA SHEET REVISION HISTORY Revision Section/Figure/Entry Correction DS00001624B (02-09-15) Features, Table 2-2, Table 2- 2, "Pin Types", Section 5.0, "General Description" References to BC-Link Interface, BC_DATA, BC_- CLK, BC-IRQ#, BC-Link bus have been removed Application Note under Table 2-6 [BC-Link] hidden in data sheet Table 3-2, "Electrical Specifications" BC-Link Timing Section hidden in data sheet Table 4-1 Protocol Used for 68K Pull Down Resistor changed from “BC-Link Communications” to “Reserved” Section 4.1.3 BC-Link Communications Removed this section and Application Note Section 4.2.2, "SMBus Address and RD / WR Bit" Replaced “client address” with “slave address” in this section. Section 4.2.4, SMBus ACK and NACK Bits, Section 4.2.5, SMBus Stop Bit,Section 4.2.7, SMBus and I2C Compatibility Replaced “client” with “slave” in these sections. Table 4-3, "Read Byte Protocol" Heading changed from “Client Address” to “Slave Address” Section 5.1, Power States Removed “BC-Link” Application Notes Table 6-1 Register Name for Register Address 77h changed from “LED Linked Transition Control” to “Linked LED Transition Control” Section 6.1 Main Control Register BC-Link paragraph removed from Bit 4 under Table 6-3 Section 7.7 Package Marking Updated package drawing Figure 7-25 CAP1106 with BC-Link Support Package Markings Removed figure. Appendix A: Device Delta changed 2Dh to 2Fh in item #12 Product Identification System Removed BC-Link references REV A REV A replaces previous SMSC version Rev. 1.32 (01-05-12) Rev. 1.32 (01-05-12) Table 3-2, "Electrical Specifications" Added conditions for tHD:DAT. Section 4.2.7, "SMBus and I2C Compatibility" Renamed from “SMBus and I2C Compliance.” First paragraph, added last sentence: “For information on using the CAP1106 in an I2C system, refer to SMSC AN 14.0 SMSC Dedicated Slave Devices in I 2C Systems.” Added: CAP1106 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. Section 6.4, "Sensor Input Delta Count Registers" Changed negative value cap from FFh to 80h. Rev. 1.31 (08-18-11) Section 4.3.3, "SMBus Send Byte" Added an application note: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Section 4.3.4, "SMBus Receive Byte" Added an application note: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). CAP1106 DS00001624B-page 44 2015 Microchip Technology Inc. Section 6.2, "Status Registers" Removed RESET as bit 3 in register 02h. Rev. 1.3 (05-18-11) Section 6.28, "Revision Register" Updated revision ID from 82h to 83h. Section 6.2, "Status Registers" Added RESET as bit 3 in register 02h. Rev. 1.2 (02-10-11) Section A.8, "Delta from Rev B (Mask B0) to Rev C (Mask B1)" Added. Table 3-2, "Electrical Specifications" PSR improvements made in functional revision B. Changed PSR spec from ±100 typ and ±200 max counts / V to ±3 and ±10 counts / V. Conditions updated. Section 5.2.2, "Recalibrating Sensor Inputs" Added more detail with subheadings for each type of recalibration. Section 6.6, "Configuration Registers" Added bit 5 BLK_PWR_CTRL to the Configuration 2 Register 44h. The TIMEOUT bit is set to ‘1’ by default for functional revision B and is set to ‘0’ by default for functional revision C. Section 6.28, "Revision Register" Updated revision ID in register FFh from 81h to 82h. Rev. 1.1 (11-17-10) Document Updated for functional revision B. See Section A.7, "Delta from Rev A (Mask A0) to Rev B (Mask B0)". Cover 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 Table 3-2, "Electrical Specifications" Conditions for Power Supply Rejection modified adding the following: Sampling time = 2.56ms Averaging = 1 Negative Delta Counts = Disabled All other parameters default Section 6.11, "Calibration Activate Register" Updated register description to indicate which re-calibration routine is used. Section 6.14, "Multiple Touch Configuration Register" Updated register description to indicate what will happen. Table 6-34, "CSx_BN_TH Bit Decode" Table heading changed from “Threshold Divide Setting” to “Percent Threshold Setting”. Rev. 1.0 (06-14-10) Initial release Revision Section/Figure/Entry Correction 2015 Microchip Technology Inc. DS00001624B-page 45 CAP1106 THE MICROCHIP WEB SITE Microchip provides online support via our WWW site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQ), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com. Under “Support”, click on “Customer Change Notification” and follow the registration instructions. CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office • Field Application Engineer (FAE) • Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://www.microchip.com/support CAP1106 DS00001624B-page 46 2015 Microchip Technology Inc. PRODUCT IDENTIFICATION SYSTEM To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PART NO. [X] - [X] - XXX - [X](1) l l l l l Device Temperature Addressing Package Tape and Reel Range Option Option Example: Note 1: Tape and Reel identifier only appears in the catalog part number description. This identifier is used for ordering purposes and is not printed on the device package. Check with your Microchip Sales Office for package availability with the Tape and Reel option. Device: CAP1106 Temperature Range: Blank = 0°C to +85°C (Extended Commercial) Package: AIA = DFN Tape and Reel Option: TR = Tape and Reel(1) CAP1106-1-AIA-TR 10-pin DFN 3mm x 3mm (RoHS compliant) Six capacitive touch sensor inputs, SMBus interface Reel size is 4,000 pieces 2015 Microchip Technology Inc. DS00001624B-page 47 CAP1106 Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 9781632770349 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == 2015 Microchip Technology Inc. DS00001624B-page 48 AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Austin, TX Tel: 512-257-3370 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 ASIA/PACIFIC Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2943-5100 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 China - Dongguan Tel: 86-769-8702-9880 China - Hangzhou Tel: 86-571-8792-8115 Fax: 86-571-8792-8116 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 ASIA/PACIFIC China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 Taiwan - Kaohsiung Tel: 886-7-213-7828 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Dusseldorf Tel: 49-2129-3766400 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Germany - Pforzheim Tel: 49-7231-424750 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Poland - Warsaw Tel: 48-22-3325737 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Worldwide Sales and Service 01/27/15 2015 Microchip Technology Inc. DS00001623B-page 1 General Description The CAP1126, which incorporates RightTouch® technology, is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains six (6) 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. The CAP1126 also contains two (2) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. The CAP1126 includes Multiple Pattern Touch recognition that allows the user to select a specific set of buttons to be touched simultaneously. If this pattern is detected, then a status bit is set and an interrupt generated. Additionally, the CAP1126 includes circuitry and support for enhanced sensor proximity detection. The CAP1126 offers multiple power states operating at low quiescent currents. In the Standby state of operation, one or more capacitive touch sensor inputs are active and all LEDs may be used. If a touch is detected, it will wake the system using the WAKE/SPI_MOSI pin. Deep Sleep is the lowest power state available, drawing 5uA (typical) of current. In this state, no sensor inputs are active. Driving the WAKE/SPI_MOSI pin or communications will wake the device. Applications • Desktop and Notebook PCs • LCD Monitors • Consumer Electronics • Appliances Features • Six (6) Capacitive Touch Sensor Inputs - Programmable sensitivity - Automatic recalibration - Individual thresholds for each button • Proximity Detection • Multiple Button Pattern Detection • Calibrates for Parasitic Capacitance • Analog Filtering for System Noise Sources • Press and Hold feature for Volume-like Applications • Multiple Communication Interfaces - SMBus / I2C compliant interface - SPI communications - Pin selectable communications protocol and multiple slave addresses (SMBus / I2C only) • Low Power Operation - 5uA quiescent current in Deep Sleep - 50uA quiescent current in Standby (1 sensor input monitored) - Samples one or more channels in Standby • Two (2) LED Driver Outputs - Open Drain or Push-Pull - Programmable blink, breathe, and dimness controls - Can be linked to Capacitive Touch Sensor inputs • Dedicated Wake output flags touches in low power state • System RESET pin • Available in 16-pin 4mm x 4mm RoHS compliant QFN package CAP1126 6 Channel Capacitive Touch Sensor with 2 LED Drivers CAP1126 DS00001623B-page 2 2015 Microchip Technology Inc. TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com. We welcome your feedback. Most Current Data Sheet To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000000A is version A of document DS30000000). Errata An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: • Microchip’s Worldwide Web site; http://www.microchip.com • Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include -literature number) you are using. Customer Notification System Register on our web site at www.microchip.com to receive the most current information on all of our products. 2015 Microchip Technology Inc. DS00001623B-page 3 CAP1126 Table of Contents 1.0 Block Diagram ................................................................................................................................................................................. 4 2.0 Pin Description ................................................................................................................................................................................ 5 3.0 Electrical Specifications .................................................................................................................................................................. 9 4.0 Communications ........................................................................................................................................................................... 12 5.0 General Description ...................................................................................................................................................................... 23 6.0 Register Description ...................................................................................................................................................................... 29 7.0 Package Information ..................................................................................................................................................................... 67 Appendix A: Device Delta ................................................................................................................................................................... 72 Appendix B: Data Sheet Revision History ........................................................................................................................................... 74 The Microchip Web Site ...................................................................................................................................................................... 76 Customer Change Notification Service ............................................................................................................................................... 76 Customer Support ............................................................................................................................................................................... 76 Product Identification System ............................................................................................................................................................. 77 CAP1126 DS00001623B-page 4 2015 Microchip Technology Inc. 1.0 BLOCK DIAGRAM SMBus / BC-Link / SPI Slave Protocol SMCLK BC_CLK / SPI_CLK SMDATA BC_DATA / SPI_MSIO / SPI_MISO VDD GND ALERT# / BC_IRQ# Capacitive Touch Sensing Algorithm LED1 CS1 CS2 CS3 CS4 CS5 CS6 LED Driver, Breathe, and Dimness control RESET WAKE / SPI_MOSI ADDR_COMM SPI_CS# LED2 2015 Microchip Technology Inc. DS00001623B-page 5 CAP1126 2.0 PIN DESCRIPTION FIGURE 2-1: CAP1126 Pin Diagram (16-Pin QFN) TABLE 2-1: PIN DESCRIPTION FOR CAP1126 Pin Number Pin Name Pin Function Pin Type Unused Connection 1 SPI_CS# Active low chip-select for SPI bus DI (5V) Connect to Ground 2 WAKE / SPI_- MOSI WAKE - Active high wake / interrupt output Standby power state - requires pull-down resistor DO Pull-down WAKE - Active high wake input - requires pull-down Resistor resistor Deep Sleep power state DI SPI_MOSI - SPI Master-Out-Slave-In port when used in normal mode DI (5V) Connect to Ground 1 2 3 4 12 11 10 9 16 15 14 13 5 6 7 8 SMCLK / BC_CLK / SPI_CLK SMDATA / BC_DATA / SPI_MSIO / SPI_MISO WAKE / SPI_MOSI ADDR_COMM VDD CS6 SPI_CS# CS5 CS1 CS2 CS3 RESET LED1 LED2 CS4 ALERT# / BC_IRQ# CAP1126 16 pin QFN GND CAP1126 DS00001623B-page 6 2015 Microchip Technology Inc. 3 SMDATA / SPI_MSIO / SPI_MISO SMDATA - Bi-directional, open-drain SMBus data - requires pull-up resistor DIOD (5V) n/a SPI_MSIO - SPI Master-Slave-In-Out bidirectional port when used in bi-directional mode DIO SPI_MISO - SPI Master-In-Slave-Out port when used in normal mode DO 4 SMCLK / SPI_- CLK SMCLK - SMBus clock input - requires pull-up resistor DI (5V) SPI_CLK - SPI clock input DI (5V) n/a 5 LED1 Open drain LED 1 driver (default) OD (5V) Connect to Ground Push-pull LED 1 driver DO leave open or connect to Ground 6 LED2 Open drain LED 2 driver (default) OD (5V) Connect to Ground Push-pull LED 2 driver DO leave open or connect to Ground 7 RESET Active high soft reset for system - resets all registers to default values. If not used, connect to ground. DI (5V) Connect to Ground 8 ALERT# ALERT# - Active low alert / interrupt output for SMBus alert or SPI interrupt OD (5V) Connect to Ground ALERT# - Active high push-pull alert / interrupt output for SMBus alert or SPI interrupt DO leave open 9 ADDR_COMM Address / communications select pin - pull-down resistor determines address / communications mechanism AI n/a 10 CS6 Capacitive Touch Sensor Input 6 AIO Connect to Ground 11 CS5 Capacitive Touch Sensor Input 5 AIO Connect to Ground 12 CS4 Capacitive Touch Sensor Input 4 AIO Connect to Ground 13 CS3 Capacitive Touch Sensor Input 3 AIO Connect to Ground 14 CS2 Capacitive Touch Sensor Input 2 AIO Connect to Ground 15 CS1 Capacitive Touch Sensor Input 1 AIO Connect to Ground 16 VDD Positive Power supply Power n/a TABLE 2-1: PIN DESCRIPTION FOR CAP1126 (CONTINUED) Pin Number Pin Name Pin Function Pin Type Unused Connection 2015 Microchip Technology Inc. DS00001623B-page 7 CAP1126 APPLICATION NOTE: When the ALERT# pinis configured as an active low output, it will be open drain. When it is configured as an active high output, it will be push-pull. APPLICATION NOTE: For the 5V tolerant pins that have a pull-up resistor, the pull-up voltage must not exceed 3.6V when the CAP1126 is unpowered. APPLICATION NOTE: The SPI_CS# pin should be grounded when SMBus, or I2C,communications are used. The pin types are described in Table 2-2. All pins labeled with (5V) are 5V tolerant. Bottom Pad GND Ground Power n/a TABLE 2-2: PIN TYPES Pin Type Description Power This pin is used to supply power or ground to the device. DI Digital Input - This pin is used as a digital input. This pin is 5V tolerant. AIO Analog Input / Output -This pin is used as an I/O for analog signals. DIOD Digital Input / Open Drain Output - This pin is used as a digital I/O. When it is used as an output, it is open drain and requires a pull-up resistor. This pin is 5V tolerant. OD Open Drain Digital Output - This pin is used as a digital output. It is open drain and requires a pull-up resistor. This pin is 5V tolerant. DO Push-pull Digital Output - This pin is used as a digital output and can sink and source current. DIO Push-pull Digital Input / Output - This pin is used as an I/O for digital signals. TABLE 2-1: PIN DESCRIPTION FOR CAP1126 (CONTINUED) Pin Number Pin Name Pin Function Pin Type Unused Connection CAP1126 DS00001623B-page 8 2015 Microchip Technology Inc. 3.0 ELECTRICAL SPECIFICATIONS Note 3-1 Stresses above those listed could cause permanent damage to the device. This is a stress rating only and functional operation of the device at any other condition above those indicated in the operation sections of this specification is not implied. Note 3-2 For the 5V tolerant pins that have a pull-up resistor, the voltage difference between V5VT_PIN and VDD must never exceed 3.6V. Note 3-3 The Package Power Dissipation specification assumes a recommended thermal via design consisting of a 3x3 matrix of 0.3mm (12mil) vias at 1.0mm pitch connected to the ground plane with a 2.1mm x 2.1mm thermal landing. Note 3-4 Junction to Ambient (θJA) is dependent on the design of the thermal vias. Without thermal vias and a thermal landing, the θJA is approximately 60°C/W including localized PCB temperature increase. TABLE 3-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 3-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 16 pin QFN (see Note 3-3) 0.9 W Junction to Ambient (θJA) (see Note 3-4) 58 °C/W Operating Ambient Temperature Range -40 to 125 °C Storage Temperature Range -55 to 150 °C ESD Rating, All Pins, HBM 8000 V 2015 Microchip Technology Inc. DS00001623B-page 9 CAP1126 TABLE 3-2: ELECTRICAL SPECIFICATIONS 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 DC Power Supply Voltage VDD 3.0 3.3 3.6 V Supply Current ISTBY 120 170 uA Standby state active 1 sensor input monitored No LEDs active Default conditions (8 avg, 70ms cycle time) ISTBY 50 uA Standby state active 1 sensor input monitored No LEDs active 1 avg, 140ms cycle time, IDSLEEP 5 15 uA Deep Sleep state active LEDs at 100% or 0% Duty Cycle No communications TA < 40°C 3.135 < VDD < 3.465V IDD 500 600 uA Capacitive Sensing Active No LEDs active Capacitive Touch Sensor Inputs Maximum Base Capacitance CBASE 50 pF Pad untouched Minimum Detectable Capacitive Shift ΔCTOUCH 20 fF Pad touched - default conditions (1 avg, 35ms cycle time, 1x sensitivity) Recommended Cap Shift ΔCTOUCH 0.1 2 pF Pad touched - Not tested Power Supply Rejection PSR ±3 ±10 counts / V Untouched Current Counts Base Capacitance 5pF - 50pF Maximum sensitivity Negative Delta Counts disabled All other parameters default Timing RESET Pin Delay tRST_DLY 10 ms Time to communications ready tCOMM_DLY 15 ms Time to first conversion ready tCONV_DLY 170 200 ms LED Drivers Duty Cycle DUTYLED 0 100 % Programmable Drive Frequency fLED 2 kHz Sinking Current ISINK 24 mA VOL = 0.4 Sourcing Current ISOURCE 24 mA VOH = VDD - 0.4 Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered I/O Pins Output Low Voltage VOL 0.4 V ISINK_IO = 8mA Output High Voltage VOH VDD - 0.4 V ISOURCE_IO = 8mA CAP1126 DS00001623B-page 10 2015 Microchip Technology Inc. Note 3-5 The ALERT pin will not glitch high or low at power up if connected to VDD or another voltage. Note 3-6 The SMCLK and SMDATA pins will not glitch low at power up if connected to VDD or another voltage. Input High Voltage VIH 2.0 V Input Low Voltage VIL 0.8 V Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered RESET Pin Release to conversion ready tRESET 170 200 ms SMBus Timing Input Capacitance CIN 5 pF Clock Frequency fSMB 10 400 kHz Spike Suppression tSP 50 ns Bus Free Time Stop to Start tBUF 1.3 us Start Setup Time tSU:STA 0.6 us Start Hold Time tHD:STA 0.6 us Stop Setup Time tSU:STO 0.6 us Data Hold Time tHD:DAT 0 us When transmitting to the master Data Hold Time tHD:DAT 0.3 us When receiving from the master Data Setup Time tSU:DAT 0.6 us Clock Low Period tLOW 1.3 us Clock High Period tHIGH 0.6 us Clock / Data Fall Time tFALL 300 ns Min = 20+0.1CLOAD ns Clock / Data Rise Time tRISE 300 ns Min = 20+0.1CLOAD ns Capacitive Load CLOAD 400 pF per bus line SPI Timing Clock Period tP 250 ns Clock Low Period tLOW 0.4 x tP 0.6 x tP ns Clock High Period tHIGH 0.4 x tP 0.6 x tP ns Clock Rise / Fall time tRISE / tFALL 0.1 x tP ns Data Output Delay tD:CLK 10 ns Data Setup Time tSU:DAT 20 ns Data Hold Time tHD:DAT 20 ns SPI_CS# to SPI_CLK setup time tSU:CS 0 ns Wake Time tWAKE 10 20 us SPI_CS# asserted to CLK assert TABLE 3-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 2015 Microchip Technology Inc. DS00001623B-page 11 CAP1126 4.0 COMMUNICATIONS 4.1 Communications The CAP1126communicates using the 2-wire SMBus or I2C bus, the 2-wire proprietary BC-Link, or the SPI bus. If the proprietary BC-Link protocol is required for your application, please contact your Microchip representative for ordering instructions. 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 4-1. 4.1.1 SMBUS (I2C) COMMUNICATIONS When configured to communicate via the SMBus, the CAP1126 supports the following protocols: Send Byte, Receive Byte, Read Byte, Write Byte, Read Block, and Write Block. In addition, the device supports I2C formatting for block read and block write protocols. APPLICATION NOTE: For SMBus/I2C communications, the SPI_CS# pin is not used and should be grounded; any data presented to this pin will be ignored. See Section 4.2 and Section 4.3 for more information on the SMBus bus and protocols respectively. 4.1.2 SPI COMMUNICATIONS When configured to communicate via the SPI bus, the CAP1126supports both bi-directional 3-wire and normal 4-wire protocols and uses the SPI_CS# pin to enable communications. APPLICATION NOTE: See Section 4.5 and Section 4.6 for more information on the SPI bus and protocols respectively.Upon power up, the CAP1126 will not respond to any communications for up to 15ms. After this time, full functionality is available. 4.2 System Management Bus The CAP1126 communicates with a host controller, such as an SIO, through the SMBus. The SMBus is a two-wire serial communication protocol between a computer host and its peripheral devices. A detailed timing diagram is shown in Figure 4-1. Stretching of the SMCLK signal is supported; however, the CAP1126 will not stretch the clock signal. TABLE 4-1: ADDR_COMM PIN DECODE Pull-Down Resistor (+/- 5%) Protocol Used SMBus Address GND SPI Communications using Normal 4-wire Protocol Used n/a 56k SPI Communications using BiDirectional 3-wire Protocol Used n/a 68k Reserved n/a 82k SMBus / I2C 0101_100(r/w) 100k SMBus / I2C 0101_011(r/w) 120k SMBus / I2C 0101_010(r/w) 150k SMBus / I2C 0101_001(r/w) VDD SMBus / I2C 0101_000(r/w) CAP1126 DS00001623B-page 12 2015 Microchip Technology Inc. 4.2.1 SMBUS START BIT The SMBus Start bit is defined as a transition of the SMBus Data line from a logic ‘1’ state to a logic ‘0’ state while the SMBus Clock line is in a logic ‘1’ state. 4.2.2 SMBUS ADDRESS AND RD / WR BIT The SMBus Address Byte consists of the 7-bit slave address followed by the RD / WR indicator bit. If this RD / WR bit is a logic ‘0’, then the SMBus Host is writing data to the slave device. If this RD / WR bit is a logic ‘1’, then the SMBus Host is reading data from the slave device. See Table 4-1 for available SMBus addresses. 4.2.3 SMBUS DATA BYTES All SMBus Data bytes are sent most significant bit first and composed of 8-bits of information. 4.2.4 SMBUS ACK AND NACK BITS The SMBus slave will acknowledge all data bytes that it receives. This is done by the slave device pulling the SMBus Data line low after the 8th bit of each byte that is transmitted. This applies to both the Write Byte and Block Write protocols. The Host will NACK (not acknowledge) the last data byte to be received from the slave by holding the SMBus data line high after the 8th data bit has been sent. For the Block Read protocol, the Host will ACK each data byte that it receives except the last data byte. 4.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 CAP1126 detects an SMBus Stop bit and it has been communicating with the SMBus protocol, it will reset its slave interface and prepare to receive further communications. 4.2.6 SMBUS TIMEOUT The CAP1126 includes an SMBus timeout feature. Following a 30ms period of inactivity on the SMBus where the SMCLK pin is held low, the device will timeout and reset the SMBus interface. The timeout function defaults to disabled. It can be enabled by setting the TIMEOUT bit in the Configuration register (see Section 6.6, "Configuration Registers"). 4.2.7 SMBUS AND I2C COMPATIBILITY The major differences between SMBus and I2C devices are highlighted here. For more information, refer to the SMBus 2.0 and I2C specifications. For information on using the CAP1126 in an I2C system, refer to AN 14.0 Dedicated Slave Devices in I2C Systems. FIGURE 4-1: SMBus Timing Diagram SMDATA SMCLK TLOW TRISE THIGH TFALL TBUF THD:STA P S S - Start Condition P - Stop Condition THD:DAT TSU:DAT TSU:STA THD:STA P TSU:STO S 2015 Microchip Technology Inc. DS00001623B-page 13 CAP1126 1. CAP1126 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. 2. Minimum frequency for SMBus communications is 10kHz. 3. The SMBus slave protocol will reset if the clock is held at a logic ‘0’ for longer than 30ms. This timeout functionality is disabled by default in the CAP1126 and can be enabled by writing to the TIMEOUT bit. I2C does not have a timeout. 4. The SMBus slave protocol will reset if both the clock and data lines are held at a logic ‘1’ for longer than 200µs (idle condition). This function is disabled by default in the CAP1126 and can be enabled by writing to the TIMEOUT bit. I2C does not have an idle condition. 5. I2C devices do not support the Alert Response Address functionality (which is optional for SMBus). 6. I2C devices support block read and write differently. I2C protocol allows for unlimited number of bytes to be sent in either direction. The SMBus protocol requires that an additional data byte indicating number of bytes to read / write is transmitted. The CAP1126 supports I2C formatting only. 4.3 SMBus Protocols The CAP1126 is SMBus 2.0 compatible and supports Write Byte, Read Byte, Send Byte, and Receive Byte as valid protocols as shown below. All of the below protocols use the convention in Table 4-2. 4.3.1 SMBUS WRITE BYTE The Write Byte is used to write one byte of data to a specific register as shown in Table 4-3. 4.3.2 SMBUS READ BYTE The Read Byte protocol is used to read one byte of data from the registers as shown in Table 4-4. 4.3.3 SMBUS SEND BYTE The Send Byte protocol is used to set the internal address register pointer to the correct address location. No data is transferred during the Send Byte protocol as shown in Table 4-5. APPLICATION NOTE: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). TABLE 4-2: PROTOCOL FORMAT Data Sent to Device Data Sent to the HOst Data sent Data sent TABLE 4-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 TABLE 4-4: READ BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data NACK Stop 1->0 YYYY_YYY 0 0 XXh 0 1 ->0 YYYY_YYY 1 0 XXh 1 0 -> 1 TABLE 4-5: SEND BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Stop 1 -> 0 YYYY_YYY 0 0 XXh 0 0 -> 1 CAP1126 DS00001623B-page 14 2015 Microchip Technology Inc. 4.3.4 SMBUS RECEIVE BYTE The Receive Byte protocol is used to read data from a register when the internal register address pointer is known to be at the right location (e.g., set via Send Byte). This is used for consecutive reads of the same register as shown in Table 4-6. APPLICATION NOTE: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). 4.4 I2C Protocols The CAP1126 supports I2C Block Write and Block Read. The protocols listed below use the convention in Table 4-2. 4.4.1 BLOCK WRITE The Block Write is used to write multiple data bytes to a group of contiguous registers as shown in Table 4-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. 4.4.2 BLOCK READ The Block Read is used to read multiple data bytes from a group of contiguous registers as shown in Table 4-8. APPLICATION NOTE: When using the Block Read protocol, the internal address pointer will be automatically incremented after every data byte is received. It will wrap from FFh to 00h. 4.5 SPI Interface The SMBus has a predefined packet structure, the SPI does not. The SPI Bus can operate in two modes of operation, normal 4-wire mode and bi-directional 3-wire mode. All SPI commands consist of 8-bit packets sent to a specific slave device (identified by the CS pin). The SPI bus will latch data on the rising edge of the clock and the clock and data both idle high. All commands are supported via both operating modes. The supported commands are: Reset Serial interface, set address pointer, write command and read command. Note that all other codes received during the command phase are ignored and have no effect on the operation of the device. TABLE 4-6: RECEIVE BYTE PROTOCOL Start Slave Address RD ACK Register Data NACK Stop 1 -> 0 YYYY_YYY 1 0 XXh 1 0 -> 1 TABLE 4-7: BLOCK WRITE PROTOCOL Start Slave Address WR ACK Register Address ACK Register Data ACK 1 ->0 YYYY_YYY 0 0 XXh 0 XXh 0 Register Data ACK Register Data ACK . . . Register Data ACK Stop XXh 0 XXh 0 . . . XXh 0 0 -> 1 TABLE 4-8: BLOCK READ PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data 1->0 YYYY_YYY 0 0 XXh 0 1 ->0 YYYY_YYY 1 0 XXh ACK Register Data ACK Register Data ACK Register Data ACK . . . Register Data NACK Stop 0 XXh 0 XXh 0 XXh 0 . . . XXh 1 0 -> 1 2015 Microchip Technology Inc. DS00001623B-page 15 CAP1126 4.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 CAP1126 SPI_MOSI data line and reading data on the SPI_MISO data line. Both communications occur simultaneously which allows for larger throughput of data transactions. All basic transfers consist of two 8 bit transactions from the Master device while the slave device is simultaneously sending data at the current address pointer value. Data writes consist of two or more 8-bit transactions. The host sends a specific write command followed by the data to write the address pointer. Data reads consist of one or more 8-bit transactions. The host sends the specific read data command and continues clocking for as many data bytes as it wishes to receive. 4.5.2 SPI BI-DIRECTIONAL MODE In the bi-directional mode of operation, the SPI data signals are combined into the SPI_MSIO line, which is shared for data received by the device and transmitted by the device. The protocol uses a simple handshake and turn around sequence for data communications based on the number of clocks transmitted during each phase. All basic transfers consist of two 8 bit transactions. The first is an 8 bit command phase driven by the Master device. The second is by an 8 bit data phase driven by the Master for writes, and by the CAP1126 for read operations. The auto increment feature of the address pointer allows for successive reads or writes. The address pointer will return to 00h after reaching FFh. 4.5.3 SPI_CS# PIN The SPI Bus is a single master, multiple slave serial bus. Each slave has a dedicated CS pin (chip select) that the master asserts low to identify that the slave is being addressed. There are no formal addressing options. 4.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. 4.5.5 SPI TIMEOUT The CAP1126 does not detect any timeout conditions on the SPI bus. FIGURE 4-2: SPI Timing SPI_MSIO or SPI_MOSI or SPI_MISO SPI_CLK tLOW tRISE tHIGH tFALL tD:CLK tHD:DAT tSU:DAT tP 2015 Microchip Technology Inc. DS00001623B-page 16 CAP1126 4.6 Normal SPI Protocols When operating in normal mode, the SPI bus internal address pointer is incremented depending upon which command has been transmitted. Multiple commands may be transmitted sequentually so long as the SPI_CS# pin is asserted low. Figure 4-3 shows an example of this operation. 4.6.1 RESET INTERFACE Resets the Serial interface whenever two successive 7Ah codes are received. Regardless of the current phase of the transaction - command or data, the receipt of the successive reset commands resets the Serial communication interface only. All other functions are not affected by the reset operation. FIGURE 4-3: Example SPI Bus Communication - Normal Mode SPI_CS# SPI_MISO SPI_MOSI SPI Address Pointer SPI Data output buffer Register Address / Data 7Ah XXh (invalid) XXh (invalid) YYh (invalid) 7Ah 7Dh 41h YYh (invalid) 7Eh 66h XXh (invalid) 45h 7Dh 41h AAh (invalid) AAh (invalid) 7Fh 7Fh 55h (invalid) 66h 7Fh AAh 7Dh 43h 40h 78h 7Fh XXh (invalid) 7Fh 56h 40h / 56h 41h / 45h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 45h 40h / 56h 41h / 45h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 42h AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 55h 7Fh AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 66h 42h AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 44h 80h 40h 80h 40h 56h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 43h 55h 7Fh 7Fh 55h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 80h 45h 43h 46h 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 00h XXh Indicates SPI Address pointer incremented 2015 Microchip Technology Inc. DS00001623B-page 17 CAP1126 4.6.2 SET ADDRESS POINTER The Set Address Pointer command sets the Address pointer for subsequent reads and writes of data. The pointer is set on the rising edge of the final data bit. At the same time, the data that is to be read is fetched and loaded into the internal output buffer but is not transmitted. 4.6.3 WRITE DATA The Write Data protocol updates the contents of the register referenced by the address pointer. As the command is processed, the data to be read is fetched and loaded into the internal output buffer but not transmitted. Then, the register is updated with the data to be written. Finally, the address pointer is incremented. FIGURE 4-4: SPI Reset Interface Command - Normal Mode FIGURE 4-5: SPI Set Address Pointer Command - Normal Mode Master SPDOUT SPI_MOSI SPI_CS# SPI_CLK Reset - 7Ah Reset - 7Ah Invalid register data 00h – Internal Data buffer empty SPI_MISO Master Drives Slave Drives ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ Master SPDOUT SPI_MOSI Register Address SPI_CS# SPI_CLK Set Address Pointer – 7Dh SPI_MISO Unknown, Invalid Data Unknown, Invalid Data Master Drives Slave Drives Address pointer set ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ CAP1126 DS00001623B-page 18 2015 Microchip Technology Inc. 4.6.4 READ DATA The Read Data protocol is used to read data from the device. During the normal mode of operation, while the device is receiving data, the CAP1126 is simultaneously transmitting data to the host. For the Set Address commands and the Write Data commands, this data may be invalid and it is recommended that the Read Data command is used. FIGURE 4-6: SPI Write Command - Normal Mode FIGURE 4-7: SPI Read Command - Normal Mode Master SPDOUT SPI_MOSI Data to Write SPI_CS# SPI_CLK Write Command – 7Eh Unknown, Invalid Data Old Data at Current Address Pointer SPI_MISO Master Drives Slave Drives 1. Data written at current address pointer 2. Address pointer incremented Master SPDOUT SPI_MOSI Master Drives Slave Drives SPI_CLK First Read Command – 7Fh SPI_CS# SPI_MISO Invalid, Unknown Data * ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Subsequent Read Commands – 7F Data at Current Address Pointer Address Pointer Incremented ** ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ * The first read command after any other command will return invalid data for the first byte. Subsequent read commands will return the data at the Current Address Pointer ** The Address Pointer is incremented 8 clocks after the Read Command has been received. Therefore continually sending Read Commands will result in each command reporting new data. Once Read Commands have been finished, the last data byte will be read during the next 8 clocks for any command 2015 Microchip Technology Inc. DS00001623B-page 19 CAP1126 4.7 Bi-Directional SPI Protocols 4.7.1 RESET INTERFACE Resets the Serial interface whenever two successive 7Ah codes are received. Regardless of the current phase of the transaction - command or data, the receipt of the successive reset commands resets the Serial communication interface only. All other functions are not affected by the reset operation. 4.7.2 SET ADDRESS POINTER Sets the address pointer to the register to be accessed by a read or write command. This command overrides the autoincrementing of the address pointer. FIGURE 4-8: SPI Read Command - Normal Mode - Full FIGURE 4-9: SPI Reset Interface Command - Bi-directional Mode Master SPDOUT SPI_MOSI Master Drives Slave Drives SPI_CLK Read Command – 7Fh SPI_CS# Data at previously set register address = current address pointer SPI_MISO ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Data at previously set register address = current address pointer (SPI) XXh 1. Register Read Address updated to Current SPI Read Address pointer 1. Register data loaded into output buffer = data at current address pointer 1. Output buffer transmitted = data at previous address pointer + 1 = current address pointer 1. Register Read Address incremented = current address pointer + 1 1. SPI Read Address Incremented = new current address pointer 2. Register Read Address Incremented = current address pointer +1 Register Data loaded into Output buffer = data at current address pointer + 1 1. Output buffer transmitted = data at current address pointer + 1 2. Flag set to increment SPI Read Address at end of next 8 clocks ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Data at previously set register address = current address pointer (SPI) 1. Register data loaded into output buffer = data at current address pointer 1. Output buffer transmitted = data at previous register address pointer + 1 = current address pointer 1. Output buffer transmitted = data at current address pointer + 1 2. Flag set to increment SPI Read Address at end of next 8 clocks Subsequent Read Commands – 7Fh 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 Master SPDOUT SPI_MSIO SPI_CS# SPI_CLK Reset - 7Ah Reset - 7Ah ‘0’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ CAP1126 DS00001623B-page 20 2015 Microchip Technology Inc. 4.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. 4.7.4 READ DATA Reads data referenced by the address pointer. Performs auto increment of address pointer after the data is transferred to the Master. FIGURE 4-10: SPI Set Address Pointer Command - Bi-directional Mode FIGURE 4-11: SPI Write Data Command - Bi-directional Mode FIGURE 4-12: SPI Read Data Command - Bi-directional Mode Master SPDOUT SPI_MSIO Register Address SPI_CS# SPI_CLK Set Address Pointer – 7Dh ‘0’ ‘1’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Master SPDOUT SPI_MSIO Register Write Data SPI_CS# SPI_CLK Write Command – 7Eh ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ Master SPDOUT SPI_MSIO Master Drives Slave Drives Indeterminate Register Read Data SPI_CLK Read Command – 7Fh SPI_CS# ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ 2015 Microchip Technology Inc. DS00001623B-page 21 CAP1126 4.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 8051’s SFR space. Refer to documentation for the BC-Link compatible host controller for details on how to access the CAP1126 via the BCLink Interface. CAP1126 DS00001623B-page 22 2015 Microchip Technology Inc. 5.0 GENERAL DESCRIPTION The CAP1126 is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains six (6) 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. The CAP1126 also contains two (2) low side (or push-pull) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. Finally, the device contains a dedicated RESET pin to act as a soft reset by the system. The CAP1126 offers multiple power states. It operates at the lowest quiescent current during its Deep Sleep state. In the low power Standby state, it can monitor one or more channels and respond to communications normally. The device contains a wake pin (WAKE/SPI_MOSI) output to wake the system when a touch is detected in Standby and to wake the device from Deep Sleep. The device communicates with a host controller using the SPI bus, or via SMBus / I2C. The host controller may poll the device for updated information at any time or it may configure the device to flag an interrupt whenever a touch is detected on any sensor pad. A typical system diagram is shown in Figure 5-1. 2015 Microchip Technology Inc. DS00001623B-page 23 CAP1126 5.1 Power States The CAP1126 has three operating states depending on the status of the STBY and DSLEEP bits. When the device transitions between power states, previously detected touches (for inactive channels) are cleared and the status bits reset. 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 6.20 through Section 6.22). Interrupts will still be generated based on the active channels. The device will still respond to communications normally and can be returned to the Fully Active state of operation by clearing the STBY bit. FIGURE 5-1: System Diagram for CAP1126 CAP1126 CS6 SMDATA / BC_DATA / SPI_MSIO / SPI_MISO SMCLK / BC_CLK / SPI_CLK VDD Embedded Controller ALERT# / BC_IRQ# CS4 CS2 3.3V – 5V CS5 CS3 CS1 WAKE / SPI_MOSI RESET SPI_CS# ADDR_COMM LED1 LED2 3.3V – 5V Touch Button Touch Button Touch Button Touch Button Touch Button Touch Button CAP1126 DS00001623B-page 24 2015 Microchip Technology Inc. 3. Deep Sleep - The device is in its lowest power state. It is not monitoring any capacitive sensor inputs and not driving any LEDs. All LEDs will be driven to their programmed non-actuated state and no PWM operations will be done. While in Deep Sleep, the device can be awakened by SMBus or SPI communications targeting the device. This will not cause the DSLEEP to be cleared so the device will return to Deep Sleep once all communications have stopped. If the device is not communicating via the 4-wire SPI bus, then during this state of operation, if the WAKE/SPI_MOSI pin is driven high by an external source, the device will clear the DSLEEP bit and return to Fully Active. APPLICATION NOTE: In the Deep Sleep state, the LED output will be either high or low and will not be PWM’d at the min or max duty cycle. 5.2 RESET Pin The RESET pin is an active high reset that is driven from an external source. While it is asserted high, all the internal blocks will be held in reset including the communications protocol used. No capacitive touch sensor inputs will be sampled and the LEDs will not be driven. All configuration settings will be reset to default states and all readings will be cleared. The device will be held in Deep Sleep that can only be removed by driving the RESET pin low. This will cause the RESET status bit to be set to a logic ‘1’ and generate an interrupt. 5.3 WAKE/SPI_MOSI Pin Operation The WAKE / SPI_MOSI pin is a multi-function pin depending on device operation. When the device is configured to communicate using the 4-wire SPI bus, this pin is an input. However, when the CAP1126 is placed in Standby and is not communicating using the 4-wire SPI protocol, the WAKE pin is an active high output. In this condition, the device will assert the WAKE/SPI_MOSI pin when a touch is detected on one of its sampled sensor inputs. The pin will remain asserted until the INT bit has been cleared and then it will be de-asserted. When the CAP1126 is placed in Deep Sleep and it is not communicating using the 4-wire SPI protocol, the WAKE/SPI_- MOSI pin is monitored by the device as an input. If the WAKE/SPI_MOSI pin is driven high by an external source, the CAP1126will clear the DSLEEP bit causing the device to return to Fully Active. When the device is placed in Deep Sleep, this pin is a High-Z input and must have a pull-down resistor to GND for proper operation. 5.4 LED Drivers The CAP1126 contains two (2) LED drivers. Each LED driver can be linked to its respective capacitive touch sensor input or it can be controlled by the host. Each LED driver can be configured to operate in one of the following modes with either push-pull or open drain drive. 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. This behavior may be actuated when a press is detected or when a release is detected. 3. Pulse 2 - The LED is configured to “Pulse” while actuated and then “Pulse” a programmable number of times with programmable rate and min / max brightness when the sensor pad is released. 4. Breathe - The LED is configured to transition continuously ON-OFF-ON (i.e. to “Breathe”) with a programmable rate and min / max brightness. When an LED is not linked to a sensor and is actuated by the host, there’s an option to assert the ALERT# pin when the initiated LED behavior has completed. 5.4.1 LINKING LEDS TO CAPACITIVE TOUCH SENSOR INPUTS All LEDs can be linked to the corresponding capacitive touch sensor input so that when the sensor input detects a touch, the corresponding LED will be actuated at one of the programmed responses. 2015 Microchip Technology Inc. DS00001623B-page 25 CAP1126 5.5 Capacitive Touch Sensing The CAP1126 contains six (6) independent capacitive touch sensor inputs. Each sensor input has dynamic range to detect a change of capacitance due to a touch. Additionally, each sensor input can be configured to be automatically and routinely re-calibrated. 5.5.1 SENSING CYCLE Each capacitive touch sensor input has controls to be activated and included in the sensing cycle. When the device is active, it automatically initiates a sensing cycle and repeats the cycle every time it finishes. The cycle polls through each active sensor input starting with CS1 and extending through CS6. As each capacitive touch sensor input is polled, its measurement is compared against a baseline “Not Touched” measurement. If the delta measurement is large enough, a touch is detected and an interrupt is generated. The sensing cycle time is programmable (see Section 6.10, "Averaging and Sampling Configuration Register"). 5.5.2 RECALIBRATING SENSOR INPUTS There are various options for recalibrating the capacitive touch sensor inputs. Recalibration re-sets the Base Count Registers (Section 6.24, "Sensor Input Base Count Registers") which contain the “not touched” values used for touch detection comparisons. APPLICATION NOTE: The device will recalibrate all sensor inputs that were disabled when it transitions from Standby. Likewise, the device will recalibrate all sensor inputs when waking out of Deep Sleep. 5.5.2.1 Manual Recalibration The Calibration Activate Registers (Section 6.11, "Calibration Activate Register") force recalibration of selected sensor inputs. When a bit is set, the corresponding capacitive touch sensor input will be recalibrated (both analog and digital). The bit is automatically cleared once the recalibration routine has finished. 5.5.2.2 Automatic Recalibration Each sensor input is regularly recalibrated at a programmable rate (see Section 6.17, "Recalibration Configuration Register"). By default, the recalibration routine stores the average 64 previous measurements and periodically updates the base “not touched” setting for the capacitive touch sensor input. 5.5.2.3 Negative Delta Count Recalibration It is possible that the device loses sensitivity to a touch. This may happen as a result of a noisy environment, an accidental recalibration during a touch, or other environmental changes. When this occurs, the base untouched sensor input may generate negative delta count values. The NEG_DELTA_CNT bits (see Section 6.17, "Recalibration Configuration Register") can be set to force a recalibration after a specified number of consecutive negative delta readings. 5.5.2.4 Delayed Recalibration It is possible that a “stuck button” occurs when something is placed on a button which causes a touch to be detected for a long period. By setting the MAX_DUR_EN bit (see Section 6.6, "Configuration Registers"), a recalibration can be forced when a touch is held on a button for longer than the duration specified in the MAX_DUR bits (see Section 6.8, "Sensor Input Configuration Register"). 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. Note: Automatic recalibration only works when the delta count is below the active sensor input threshold. It is disabled when a touch is detected. Note: During this recalibration, the device will not respond to touches. CAP1126 DS00001623B-page 26 2015 Microchip Technology Inc. 5.5.3 PROXIMITY DETECTION Each sensor input can be configured to detect changes in capacitance due to proximity of a touch. This circuitry detects the change of capacitance that is generated as an object approaches, but does not physically touch, the enabled sensor pad(s). When a sensor input is selected to perform proximity detection, it will be sampled from 1x to 128x per sampling cycle. The larger the number of samples that are taken, the greater the range of proximity detection is available at the cost of an increased overall sampling time. 5.5.4 MULTIPLE TOUCH PATTERN DETECTION The multiple touch pattern (MTP) detection circuitry can be used to detect lid closure or other similar events. An event can be flagged based on either a minimum number of sensor inputs or on specific sensor inputs simultaneously exceeding an MTP threshold or having their Noise Flag Status Register bits set. An interrupt can also be generated. During an MTP event, all touches are blocked (see Section 6.15, "Multiple Touch Pattern Configuration Register"). 5.5.5 LOW FREQUENCY NOISE DETECTION Each sensor input has an EMI noise detector that will sense if low frequency noise is injected onto the input with sufficient power to corrupt the readings. If this occurs, the device will reject the corrupted sample and set the corresponding bit in the Noise Status register to a logic ‘1’. 5.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. 5.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. Whenever an interrupt is generated, the INT bit (see Section 6.1, "Main Control Register") is set. The ALERT# pin is cleared when the INT bit is cleared by the user. Additionally, when the INT bit is cleared by the user, status bits are only cleared if no touch is detected. 5.6.1 SENSOR INTERRUPT BEHAVIOR The sensor interrupts are generated in one of two ways: 1. An interrupt is generated when a touch is detected and, as a user selectable option, when a release is detected (by default - see Section 6.6). See Figure 5-3. 2. If the repeat rate is enabled then, so long as the touch is held, another interrupt will be generated based on the programmed repeat rate (see Figure 5-2). When the repeat rate is enabled, the device uses an additional control called MPRESS that determines whether a touch is flagged as a simple “touch” or a “press and hold”. The MPRESS[3:0] bits set a minimum press timer. When the button is touched, the timer begins. If the sensor pad is released before the minimum press timer expires, it is flagged as a touch and an interrupt is generated upon release. If the sensor input detects a touch for longer than this timer value, it is flagged as a “press and hold” event. So long as the touch is held, interrupts will be generated at the programmed repeat rate and upon release (if enabled). APPLICATION NOTE: Figure 5-2 and Figure 5-3 show default operation which is to generate an interrupt upon sensor pad release and an active-low ALERT# pin. APPLICATION NOTE: The host may need to poll the device twice to determine that a release has been detected. Note: Delayed recalibration only works when the delta count is above the active sensor input threshold. If enabled, it is invoked when a sensor pad touch is held longer than the MAX_DUR bit setting. 2015 Microchip Technology Inc. DS00001623B-page 27 CAP1126 FIGURE 5-2: Sensor Interrupt Behavior - Repeat Rate Enabled FIGURE 5-3: Sensor Interrupt Behavior - No Repeat Rate Enabled Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Min Press Setting (280ms) Interrupt on Touch Button Repeat Rate (175ms) Button Repeat Rate (175ms) Interrupt on Release (optional) ALERT# pin (active low) Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Interrupt on Touch Interrupt on Release (optional) ALERT# pin (active low) CAP1126 DS00001623B-page 28 2015 Microchip Technology Inc. 6.0 REGISTER DESCRIPTION The registers shown in Table 6-1 are accessible through the communications protocol. An entry of ‘-’ indicates that the bit is not used and will always read ‘0’. TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER Register Address R/W Register Name Function Default Value Page 00h R/W Main Control Controls general power states and power dissipation 00h Page 31 02h R General Status Stores general status bits 00h Page 32 03h R Sensor Input Status Returns the state of the sampled capacitive touch sensor inputs 00h Page 32 04h R LED Status Stores status bits for LEDs 00h Page 32 0Ah R Noise Flag Status Stores the noise flags for sensor inputs 00h Page 33 10h R Sensor Input 1 Delta Count Stores the delta count for CS1 00h Page 33 11h R Sensor Input 2 Delta Count Stores the delta count for CS2 00h Page 33 12h R Sensor Input 3 Delta Count Stores the delta count for CS3 00h Page 33 13h R Sensor Input 4 Delta Count Stores the delta count for CS4 00h Page 33 14h R Sensor Input 5 Delta Count Stores the delta count for CS5 00h Page 33 15h R Sensor Input 6 Delta Count Stores the delta count for CS6 00h Page 33 1Fh R/W Sensitivity Control Controls the sensitivity of the threshold and delta counts and data scaling of the base counts 2Fh Page 33 20h R/W Configuration Controls general functionality 20h Page 35 21h R/W Sensor Input Enable Controls whether the capacitive touch sensor inputs are sampled 3Fh Page 36 22h R/W Sensor Input Configuration Controls max duration and auto-repeat delay for sensor inputs operating in the full power state A4h Page 36 23h R/W Sensor Input Configuration 2 Controls the MPRESS controls for all sensor inputs 07h Page 38 24h R/W Averaging and Sampling Config Controls averaging and sampling window 39h Page 38 26h R/W Calibration Activate Forces re-calibration for capacitive touch sensor inputs 00h Page 39 27h R/W Interrupt Enable Enables Interrupts associated with capacitive touch sensor inputs 3Fh Page 40 28h R/W Repeat Rate Enable Enables repeat rate for all sensor inputs 3Fh Page 40 2Ah R/W Multiple Touch Configuration Determines the number of simultaneous touches to flag a multiple touch condition 80h Page 41 2Bh R/W Multiple Touch Pattern Configuration Determines the multiple touch pattern (MTP) configuration 00h Page 41 2015 Microchip Technology Inc. DS00001623B-page 29 CAP1126 2Dh R/W Multiple Touch Pattern Determines the pattern or number of sensor inputs used by the MTP circuitry 3Fh Page 42 2Fh R/W Recalibration Configuration Determines re-calibration timing and sampling window 8Ah Page 43 30h R/W Sensor Input 1 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 1 40h Page 44 31h R/W Sensor Input 2 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 2 40h Page 44 32h R/W Sensor Input 3 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 3 40h Page 44 33h R/W Sensor Input 4 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 4 40h Page 44 34h R/W Sensor Input 5 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 5 40h Page 44 35h R/W Sensor Input 6 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 6 40h Page 44 38h R/W Sensor Input Noise Threshold Stores controls for selecting the noise threshold for all sensor inputs 01h Page 44 Standby Configuration Registers 40h R/W Standby Channel Controls which sensor inputs are enabled while in standby 00h Page 45 41h R/W Standby Configuration Controls averaging and cycle time while in standby 39h Page 45 42h R/W Standby Sensitivity Controls sensitivity settings used while in standby 02h Page 47 43h R/W Standby Threshold Stores the touch detection threshold for active sensor inputs in standby 40h Page 47 44h R/W Configuration 2 Stores additional configuration controls for the device 40h Page 35 Base Count Registers 50h R Sensor Input 1 Base Count Stores the reference count value for sensor input 1 C8h Page 47 51h R Sensor Input 2 Base Count Stores the reference count value for sensor input 2 C8h Page 47 52h R Sensor Input 3 Base Count Stores the reference count value for sensor input 3 C8h Page 47 53h R Sensor Input 4 Base Count Stores the reference count value for sensor input 4 C8h Page 47 54h R Sensor Input 5 Base Count Stores the reference count value for sensor input 5 C8h Page 47 55h R Sensor Input 6 Base Count Stores the reference count value for sensor input 6 C8h Page 47 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page CAP1126 DS00001623B-page 30 2015 Microchip Technology Inc. LED Controls 71h R/W LED Output Type Controls the output type for the LED outputs 00h Page 48 72h R/W Sensor Input LED Linking Controls linking of sensor inputs to LED channels 00h Page 48 73h R/W LED Polarity Controls the output polarity of LEDs 00h Page 49 74h R/W LED Output Control Controls the output state of the LEDs 00h Page 50 77h R/W Linked LED Transition Control Controls the transition when LEDs are linked to CS channels 00h Page 51 79h R/W LED Mirror Control Controls the mirroring of duty cycles for the LEDs 00h Page 51 81h R/W LED Behavior 1 Controls the behavior and response of LEDs 1 - 2 00h Page 51 84h R/W LED Pulse 1 Period Controls the period of each breathe during a pulse 20h Page 53 85h R/W LED Pulse 2 Period Controls the period of the breathing during breathe and pulse operation 14h Page 55 86h R/W LED Breathe Period Controls the period of an LED breathe operation 5Dh Page 56 88h R/W LED Config Controls LED configuration 04h Page 56 90h R/W LED Pulse 1 Duty Cycle Determines the min and max duty cycle for the pulse operation F0h Page 57 91h R/W LED Pulse 2 Duty Cycle Determines the min and max duty cycle for breathe and pulse operation F0h Page 57 92h R/W LED Breathe Duty Cycle Determines the min and max duty cycle for the breathe operation F0h Page 57 93h R/W LED Direct Duty Cycle Determines the min and max duty cycle for Direct mode LED operation F0h Page 57 94h R/W LED Direct Ramp Rates Determines the rising and falling edge ramp rates of the LEDs 00h Page 58 95h R/W LED Off Delay Determines the off delay for all LED behaviors 00h Page 58 B1h R Sensor Input 1 Calibration Stores the upper 8-bit calibration value for sensor input 1 00h Page 61 B2h R Sensor Input 2 Calibration Stores the upper 8-bit calibration value for sensor input 2 00h Page 61 B3h R Sensor Input 3 Calibration Stores the upper 8-bit calibration value for sensor input 3 00h Page 61 B4h R Sensor Input 4 Calibration Stores the upper 8-bit calibration value for sensor input 4 00h Page 61 B5h R Sensor Input 5 Calibration Stores the upper 8-bit calibration value for sensor input 5 00h Page 61 B6h R Sensor Input 6 Calibration Stores the upper 8-bit calibration value for sensor input 6 00h Page 61 B9h R Sensor Input Calibration LSB 1 Stores the 2 LSBs of the calibration value for sensor inputs 1 - 4 00h Page 61 BAh R Sensor Input Calibration LSB 2 Stores the 2 LSBs of the calibration value for sensor inputs 5 - 6 00h Page 61 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page 2015 Microchip Technology Inc. DS00001623B-page 31 CAP1126 During Power-On-Reset (POR), the default values are stored in the registers. A POR is initiated when power is first applied to the part and the voltage on the VDD supply surpasses the POR level as specified in the electrical characteristics. Any reads to undefined registers will return 00h. Writes to undefined registers will not have an effect. When a bit is “set”, this means that the user writes a logic ‘1’ to it. When a bit is “cleared”, this means that the user writes a logic ‘0’ to it. 6.1 Main Control Register The Main Control register controls the primary power state of the device. Bits 7 - 6 - GAIN[1:0] - Controls the gain used by the capacitive touch sensing circuitry. As the gain is increased, the effective sensitivity is likewise increased as a smaller delta capacitance is required to generate the same delta count values. The sensitivity settings may need to be adjusted along with the gain settings such that data overflow does not occur. APPLICATION NOTE: The gain settings apply to both Standby and Active states. 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 6.20). The status registers will not be cleared until read. LEDs that are linked to capacitive touch sensor inputs will remain linked and active. Sensor inputs that are no longer sampled will flag a release and then remain in a non-touched state. LEDs that are manually controlled will be unaffected. • Bit 4 - DSLEEP - Enables Deep Sleep by deactivating all functions. This bit will be cleared when the WAKE pin is driven high. ‘0’ (default) - Sensor input scanning is active and LEDs are functional. • ‘1’ - All sensor input scanning is disabled. All LEDs are driven to their programmed non-actuated state and no PWM operations will be done. The status registers are automatically cleared and the INT bit is cleared. Bit 0 - INT - Indicates that there is an interrupt. When this bit is set, it asserts the ALERT# pin. If a channel detects a touch and its associated interrupt enable bit is not set to a logic ‘1’, no action is taken. FDh R Product ID Stores a fixed value that identifies each product 53h Page 62 FEh R Manufacturer ID Stores a fixed value that identifies Microchip 5Dh Page 62 FFh R Revision Stores a fixed value that represents the revision number 83h Page 62 TABLE 6-2: MAIN CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 00h R/W Main Control GAIN[1:0] STBY DSLEEP - - - INT 00h TABLE 6-3: GAIN BIT DECODE GAIN[1:0] Capacitive Touch Sensor Gain 1 0 0 0 1 01 2 10 4 11 8 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page CAP1126 DS00001623B-page 32 2015 Microchip Technology Inc. This bit is cleared by writing a logic ‘0’ to it. When this bit is cleared, the ALERT# pin will be deasserted and all status registers will be cleared if the condition has been removed. If the WAKE/SPI_MOSI pin is asserted as a result of a touch detected while in Standby, it will likewise be deasserted when this bit is cleared. Note that the WAKE / SPI_MOSI pin is not driven when communicating via the 4-wire SPI protocol. • ‘0’ - No interrupt pending. • ‘1’ - A touch has been detected on one or more channels and the interrupt has been asserted. 6.2 Status Registers All status bits are cleared when the device enters the Deep Sleep (DSLEEP = ‘1’ - see Section 6.1). 6.2.1 GENERAL STATUS - 02H Bit 4 - LED - Indicates that one or more LEDs have finished their programmed activity. This bit is set if any bit in the LED Status register is set. Bit 3 - RESET - Indicates that the device has come out of reset. This bit is set when the device exits a POR state or when the RESET pin has been deasserted and qualified via the RESET pin filter (see Section 5.2). This bit will cause the INT bit to be set and is cleared when the INT bit is cleared. Bit 2 - MULT - Indicates that the device is blocking detected touches due to the Multiple Touch detection circuitry (see Section 6.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 6.15). This bit will cause the INT bit to be set if the MTP_ALERT bit is also set. This bit will not be cleared until the condition that caused it to be set has been removed. Bit 0 - TOUCH - Indicates that a touch was detected. This bit is set if any bit in the Sensor Input Status register is set. 6.2.2 SENSOR INPUT STATUS - 03H The Sensor Input Status Register stores status bits that indicate a touch has been detected. A value of ‘0’ in any bit indicates that no touch has been detected. A value of ‘1’ in any bit indicates that a touch has been detected. All bits are cleared when the INT bit is cleared and if a touch on the respective capacitive touch sensor input is no longer present. If a touch is still detected, the bits will not be cleared (but this will not cause the interrupt to be asserted - see Section 6.6). Bit 5 - CS6 - Indicates that a touch was detected on Sensor Input 6. Bit 4 - CS5 - Indicates that a touch was detected on Sensor Input 5. Bit 3 - CS4 - Indicates that a touch was detected on Sensor Input 4. Bit 2 - CS3 - Indicates that a touch was detected on Sensor Input 3. Bit 1 - CS2 - Indicates that a touch was detected on Sensor Input 2. This sensor input can be linked to LED2. Bit 0 - CS1 - Indicates that a touch was detected on Sensor Input 1. This sensor input can be linked to LED1. 6.2.3 LED STATUS - 04H The LED Status Registers indicate when an LED has completed its configured behavior (see Section 6.31, "LED Behavior Register") after being actuated by the host (see Section 6.28, "LED Output Control Register"). These bits are ignored when the LED is linked to a capacitive sensor input. All LED Status bits are cleared when the INT bit is cleared. 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. TABLE 6-4: STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 02h R General Status - - - LED RESET MULT MTP TOUCH 00h 03h R Sensor Input Status - - CS6 CS5 CS4 CS3 CS2 CS1 00h 04h R LED Status - - - - - - LED2_ DN LED1_ DN 00h 2015 Microchip Technology Inc. DS00001623B-page 33 CAP1126 6.3 Noise Flag Status Registers The Noise Flag Status registers store status bits that are generated from the analog block if the detected noise is above the operating region of the analog detector or the RF noise detector. These bits indicate that the most recently received data from the sensor input is invalid and should not be used for touch detection. So long as the bit is set for a particular channel, the delta count value is reset to 00h and thus no touch is detected. These bits are not sticky and will be cleared automatically if the analog block does not report a noise error. APPLICATION NOTE: If the MTP detection circuitry is enabled, these bits count as sensor inputs above the MTP threshold (see Section 5.5.4, "Multiple Touch Pattern Detection") even if the corresponding delta count is not. If the corresponding delta count also exceeds the MTP threshold, it is not counted twice. APPLICATION NOTE: Regardless of the state of the Noise Status bits, if low frequency noise is detected on a sensor input, that sample will be discarded unless the DIS_ANA_NOISE bit is set. As well, if RF noise is detected on a sensor input, that sample will be discarded unless the DIS_RF_NOISE bit is set. 6.4 Sensor Input Delta Count Registers 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. The count value represents a change in input due to the capacitance associated with a touch on one of the sensor inputs and is referenced to a calibrated base “Not Touched” count value. The delta is an instantaneous change and is updated once per sensor input per sensing cycle (see Section 5.5.1, "Sensing Cycle"). The value presented is a standard 2’s complement number. In addition, the value is capped at a value of 7Fh. A reading of 7Fh indicates that the sensitivity settings are too high and should be adjusted accordingly (see Section 6.5). The value is also capped at a negative value of 80h for negative delta counts which may result upon a release. 6.5 Sensitivity Control Register TABLE 6-5: NOISE FLAG STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 0Ah R Noise Flag Status - - CS6_ NOISE CS5_ NOISE CS4_ NOISE CS3_ NOISE CS2_ NOISE CS1_ NOISE 00h TABLE 6-6: SENSOR INPUT DELTA COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 10h R Sensor Input 1 Delta Count Sign 64 32 16 8 4 2 1 00h 11h R Sensor Input 2 Delta Count Sign 64 32 16 8 4 2 1 00h 12h R Sensor Input 3 Delta Count Sign 64 32 16 8 4 2 1 00h 13h R Sensor Input 4 Delta Count Sign 64 32 16 8 4 2 1 00h 14h R Sensor Input 5 Delta Count Sign 64 32 16 8 4 2 1 00h 15h R Sensor Input 6 Delta Count Sign 64 32 16 8 4 2 1 00h TABLE 6-7: SENSITIVITY CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 1Fh R/W Sensitivity Control - DELTA_SENSE[2:0] BASE_SHIFT[3:0] 2Fh CAP1126 DS00001623B-page 34 2015 Microchip Technology Inc. The Sensitivity Control register controls the sensitivity of a touch detection. Bits 6-4 DELTA_SENSE[2:0] - Controls the sensitivity of a touch detection. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the more sensitive settings, touches are detected for a smaller delta capacitance corresponding to a “lighter” touch. These settings are more sensitive to noise, however, and a noisy environment may flag more false touches with higher sensitivity levels. APPLICATION NOTE: A value of 128x is the most sensitive setting available. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely, a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 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. The scale factor represents the multiplier to the bit-weighting presented in these register descriptions. APPLICATION NOTE: The BASE_SHIFT[3:0] bits normally do not need to be updated. These settings will not affect touch detection or sensitivity. These bits are sometimes helpful in analyzing the Cap Sensing board performance and stability. TABLE 6-8: DELTA_SENSE BIT DECODE DELTA_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-9: BASE_SHIFT BIT DECODE BASE_SHIFT[3:0] Data Scaling Factor 32 1 0 0 0 0 0 1x 0 0 0 1 2x 0 0 1 0 4x 0 0 1 1 8x 0 1 0 0 16x 0 1 0 1 32x 0 1 1 0 64x 0 1 1 1 128x 1 0 0 0 256x All others 256x (default = 1111b) 2015 Microchip Technology Inc. DS00001623B-page 35 CAP1126 6.6 Configuration Registers The Configuration registers control general global functionality that affects the entire device. 6.6.1 CONFIGURATION - 20H Bit 7 - TIMEOUT - Enables the timeout and idle functionality of the SMBus protocol. • ‘0’ (default for Functional Revision C) - The SMBus timeout and idle functionality are disabled. The SMBus interface will not time out if the clock line is held low. Likewise, it will not reset if both the data and clock lines are held high for longer than 200us. This is used for I2C compliance. • ‘1’ (default for Functional Revision B) - The SMBus timeout and idle functionality are enabled. The SMBus interface will time out if the clock line is held low for longer than 30ms. Likewise, it will reset if both the data and clock lines are held high for longer than 200us. Bit 6 - WAKE_CFG - Configures the operation of the WAKE pin. • ‘0’ (default) - The WAKE pin is not asserted when a touch is detected while the device is in Standby. It will still be used to wake the device from Deep Sleep when driven high. • ‘1’ - The WAKE pin will be asserted high when a touch is detected while the device is in Standby. It will also be used to wake the device from Deep Sleep when driven high. Bit 5 - DIS_DIG_NOISE - Determines whether the digital noise threshold (see Section 6.19, "Sensor Input Noise Threshold Register") is used by the device. Setting this bit disables the feature. • ‘0’ - The digital noise threshold is used. If a delta count value exceeds the noise threshold but does not exceed the touch threshold, the sample is discarded and not used for the automatic re-calibration routine. • ‘1’ (default) - The noise threshold is disabled. Any delta count that is less than the touch threshold is used for the automatic re-calibration routine. Bit 4 - DIS_ANA_NOISE - Determines whether the analog noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If low frequency noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if low frequency noise is detected. Bit 3 - MAX_DUR_EN - Determines whether the maximum duration recalibration is enabled. • ‘0’ (default) - The maximum duration recalibration functionality is disabled. A touch may be held indefinitely and no re-calibration will be performed on any sensor input. • ‘1’ - The maximum duration recalibration functionality is enabled. If a touch is held for longer than the MAX_DUR bit settings, then the re-calibration routine will be restarted (see Section 6.8). 6.6.2 CONFIGURATION 2 - 44H Bit 7 - INV_LINK_TRAN - Determines the behavior of the Linked LED Transition controls (see Section 6.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. • ‘0’ - The ALERT# pin is active high and push-pull. • ‘1’ (default) - The ALERT# pin is active low and open drain. TABLE 6-10: CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 20h R/W Configuration TIMEOUT WAKE_ CFG DIS_ DIG_ NOISE DIS_ ANA_ NOISE MAX_ DUR_EN - -- A0h (Rev B) 20h (rev C) 44h R/W Configuration 2 INV_LINK_ TRAN ALT_ POL BLK_PWR_ CTRL BLK_POL_ MIR SHOW_ RF_ NOISE DIS_ RF_ NOISE - INT_ REL_n 40h CAP1126 DS00001623B-page 36 2015 Microchip Technology Inc. Bit 5 - BLK_PWR_CTRL - Determines whether the device will reduce power consumption while waiting between conversion time completion and the end of the polling cycle. • ‘0’ (default) - The device will always power down as much as possible during the time between the end of the last conversion and the end of the polling cycle. • ‘1’ - The device will not power down the Cap Sensor during the time between the end of the last conversion and the end of the polling cycle. Bit 4 - BLK_POL_MIR - Determines whether the LED Mirror Control register bits are linked to the LED Polarity bits. Setting this bit blocks the normal behavior which is to automatically set and clear the LED Mirror Control bits when the LED Polarity bits are set or cleared. • ‘0’ (default) - When the LED Polarity controls are set, the corresponding LED Mirror control is automatically set. Likewise, when the LED Polarity controls are cleared, the corresponding LED Mirror control is also cleared. • ‘1’ - When the LED Polarity controls are set, the corresponding LED Mirror control is not automatically set. Bit 3 - SHOW_RF_NOISE - Determines whether the Noise Status bits will show RF Noise as the only input source. • ‘0’ (default) - The Noise Status registers will show both RF noise and low frequency EMI noise if either is detected on a capacitive touch sensor input. • ‘1’ - The Noise Status registers will only show RF noise if it is detected on a capacitive touch sensor input. EMI noise will still be detected and touches will be blocked normally; however, the status bits will not be updated. Bit 2 - DIS_RF_NOISE - Determines whether the RF noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If RF noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if RF noise is detected. Bit 0 - INT_REL_n - Controls the interrupt behavior when a release is detected on a button. • ‘0’ (default) - An interrupt is generated when a press is detected and again when a release is detected and at the repeat rate (if enabled - see Section 6.13). • ‘1’ - An interrupt is generated when a press is detected and at the repeat rate but not when a release is detected. 6.7 Sensor Input Enable Registers 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. Bit 5 - CS6_EN - Enables the CS6 input to be included during the sampling cycle. • ‘0’ - The CS6 input is not included in the sampling cycle. • ‘1’ (default) - The CS6 input is included in the sampling cycle. Bit 4 - CS5_EN - Enables the CS5 input to be included during the sampling cycle. Bit 3 - CS4_EN - Enables the CS4 input to be included during the sampling cycle. Bit 2 - CS3_EN - Enables the CS3 input to be included during the sampling cycle. Bit 1 - CS2_EN - Enables the CS2 input to be included during the sampling cycle. Bit 0 - CS1_EN - Enables the CS1 input to be included during the sampling cycle. 6.8 Sensor Input Configuration Register TABLE 6-11: SENSOR INPUT ENABLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 21h R/W Sensor Input Enable - - CS6_EN CS5_EN CS4_EN CS3_EN CS2_EN CS1_EN 3Fh TABLE 6-12: SENSOR INPUT CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 22h R/W Sensor Input Configuration MAX_DUR[3:0] RPT_RATE[3:0] A4h 2015 Microchip Technology Inc. DS00001623B-page 37 CAP1126 The Sensor Input Configuration Register controls timings associated with the Capacitive sensor inputs 1 - 6. Bits 7 - 4 - MAX_DUR[3:0] - (default 1010b) - Determines the maximum time that a sensor pad is allowed to be touched until the capacitive touch sensor input is recalibrated, as shown in Table 6-13. Bits 3 - 0 - RPT_RATE[3:0] - (default 0100b) Determines the time duration between interrupt assertions when auto repeat is enabled. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-14. TABLE 6-13: MAX_DUR BIT DECODE MAX_DUR[3:0] Time Before Recalibration 32 1 0 0 0 0 0 560ms 0 0 0 1 840ms 0 0 1 0 1120ms 0 0 1 1 1400ms 0 1 0 0 1680ms 0 1 0 1 2240ms 0 1 1 0 2800ms 1 1 1 3360ms 1 0 0 0 3920ms 1 0 0 1 4480ms 1 0 1 0 5600ms (default) 1 0 1 1 6720ms 1 1 0 0 7840ms 1 1 0 1 8906ms 1 1 1 0 10080ms 1 1 1 1 11200ms TABLE 6-14: RPT_RATE BIT DECODE RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms (default) 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms 1 0 0 0 315ms 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 CAP1126 DS00001623B-page 38 2015 Microchip Technology Inc. 6.9 Sensor Input Configuration 2 Register Bits 3 - 0 - M_PRESS[3:0] - (default 0111b) - Determines the minimum amount of time that sensor inputs configured to use auto repeat must detect a sensor pad touch to detect a “press and hold” event. If the sensor input detects a touch for longer than the M_PRESS[3:0] settings, a “press and hold” event is detected. If a sensor input detects a touch for less than or equal to the M_PRESS[3:0] settings, a touch event is detected. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-16. 6.10 Averaging and Sampling Configuration Register The Averaging and Sampling Configuration register controls the number of samples taken and the total sensor input cycle time for all active sensor inputs while the device is functioning in Active state. Bits 6 - 4 - AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-18. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. For example, if CS1, CS2, and CS3 are sampled during the sensor cycle, and the AVG[2:0] bits are set to take 4 samples per channel, then the full sensor cycle will be: CS1, CS1, CS1, CS1, CS2, CS2, CS2, CS2, CS3, CS3, CS3, CS3. TABLE 6-15: SENSOR INPUT CONFIGURATION 2 REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 23h R/W Sensor Input Configuration 2 - - - - M_PRESS[3:0] 07h TABLE 6-16: M_PRESS BIT DECODE M_PRESS[3:0] M_PRESS SETTINGS 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms (default) 1 0 0 0 315ms 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 TABLE 6-17: AVERAGING AND SAMPLING CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 24h R/W Averaging and Sampling Config AVG[2:0] SAMP_TIME[1:0] CYCLE_TIME [1:0] 39h 2015 Microchip Technology Inc. DS00001623B-page 39 CAP1126 Bits 3 - 2 - SAMP_TIME[1:0] - Determines the time to take a single sample as shown in Table 6-19. Bits 1 - 0 - CYCLE_TIME[1:0] - Determines the overall cycle time for all measured channels during normal operation as shown in Table 6-20. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, then the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. 6.11 Calibration Activate Register The Calibration Activate register forces the respective sensor inputs to be re-calibrated affecting both the analog and digital blocks. During the re-calibration routine, the sensor inputs will not detect a press for up to 600ms and the Sensor Input Base Count register values will be invalid. During this time, any press on the corresponding sensor pads will invalidate the re-calibration. When finished, the CALX[9:0] bits will be updated (see Section 6.39). TABLE 6-18: AVG BIT DECODE AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-19: SAMP_TIME BIT DECODE SAMP_TIME[1:0] Sample Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-20: CYCLE_TIME BIT DECODE CYCLE_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms TABLE 6-21: CALIBRATION ACTIVATE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 26h R/W Calibration Activate - - CS6_ CAL CS5_ CAL CS4_ CAL CS3_ CAL CS2_ CAL CS1_ CAL 00h CAP1126 DS00001623B-page 40 2015 Microchip Technology Inc. When the corresponding bit is set, the device will perform the calibration and the bit will be automatically cleared once the re-calibration routine has finished. Bit 5 - CS6_CAL - When set, the CS6 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 4 - CS5_CAL - When set, the CS5 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 3 - CS4_CAL - When set, the CS4 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 2 - CS3_CAL - When set, the CS3 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 1 - CS2_CAL - When set, the CS2 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 0 - CS1_CAL - When set, the CS1 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. 6.12 Interrupt Enable Register The Interrupt Enable register determines whether a sensor pad touch or release (if enabled) causes the interrupt pin to be asserted. Bit 5 - CS6_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS6 (associated with the CS6 status bit). • ‘0’ - The interrupt pin will not be asserted if a touch is detected on CS6 (associated with the CS6 status bit). • ‘1’ (default) - The interrupt pin will be asserted if a touch is detected on CS6 (associated with the CS6 status bit). Bit 4 - CS5_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS5 (associated with the CS5 status bit). Bit 3 - CS4_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS4 (associated with the CS4 status bit). Bit 2 - CS3_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS3 (associated with the CS3 status bit). Bit 1 - CS2_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS2 (associated with the CS2 status bit). Bit 0 - CS1_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS1 (associated with the CS1 status bit). 6.13 Repeat Rate Enable Register The Repeat Rate Enable register enables the repeat rate of the sensor inputs as described in Section 5.6.1. Bit 5 - CS6_RPT_EN - Enables the repeat rate for capacitive touch sensor input 6. • ‘0’ - The repeat rate for CS6 is disabled. It will only generate an interrupt when a touch is detected and when a release is detected no matter how long the touch is held for. • ‘1’ (default) - The repeat rate for CS6 is enabled. In the case of a “touch” event, it will generate an interrupt when a TABLE 6-22: INTERRUPT ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 27h R/W Interrupt Enable - - CS6_ INT_EN CS5_ INT_EN CS4_ INT_EN CS3_ INT_EN CS2_ INT_EN CS1_ INT_EN 3Fh TABLE 6-23: REPEAT RATE ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 28h R/W Repeat Rate Enable - - CS6_ RPT_EN CS5_ RPT_EN CS4_ RPT_EN CS3_ RPT_EN CS2_ RPT_EN CS1_ RPT_EN 3Fh 2015 Microchip Technology Inc. DS00001623B-page 41 CAP1126 touch is detected and a release is detected (as determined by the INT_REL_n bit - see Section 6.6). In the case of a “press and hold” event, it will generate an interrupt when a touch is detected and at the repeat rate so long as the touch is held. Bit 4 - CS5_RPT_EN - Enables the repeat rate for capacitive touch sensor input 5. Bit 3 - CS4_RPT_EN - Enables the repeat rate for capacitive touch sensor input 4. Bit 2 - CS3_RPT_EN - Enables the repeat rate for capacitive touch sensor input 3. Bit 1 - CS2_RPT_EN - Enables the repeat rate for capacitive touch sensor input 2. Bit 0 - CS1_RPT_EN - Enables the repeat rate for capacitive touch sensor input 1. 6.14 Multiple Touch Configuration Register The Multiple Touch Configuration register controls the settings for the multiple touch detection circuitry. These settings determine the number of simultaneous buttons that may be pressed before additional buttons are blocked and the MULT status bit is set. Bit 7 - MULT_BLK_EN - Enables the multiple button blocking circuitry. • ‘0’ - The multiple touch circuitry is disabled. The device will not block multiple touches. • ‘1’ (default) - The multiple touch circuitry is enabled. The device will flag the number of touches equal to programmed multiple touch threshold and block all others. It will remember which sensor inputs are valid and block all others until that sensor pad has been released. Once a sensor pad has been released, the N detected touches (determined via the cycle order of CS1 - CS6) will be flagged and all others blocked. Bits 3 - 2 - B_MULT_T[1:0] - Determines the number of simultaneous touches on all sensor pads before a Multiple Touch Event is detected and sensor inputs are blocked. The bit decode is given by Table 6-25. 6.15 Multiple Touch Pattern Configuration Register The Multiple Touch Pattern Configuration register controls the settings for the multiple touch pattern detection circuitry. This circuitry works like the multiple touch detection circuitry with the following differences: 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. The MTP detection circuitry either will detect a specific pattern of sensor inputs as determined by the Multiple Touch Pattern register settings or it will use the Multiple Touch Pattern register settings to determine a minimum number of sensor inputs that will cause the MTP circuitry to flag an event. When using pattern recognition mode, TABLE 6-24: MULTIPLE TOUCH CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Ah R/W Multiple Touch Config MULT_ BLK_ EN - - - B_MULT_T[1:0] - - 80h TABLE 6-25: B_MULT_T BIT DECODE B_MULT_T[1:0] Number of Simultaneous Touches 1 0 0 0 1 (default) 01 2 10 3 11 4 TABLE 6-26: MULTIPLE TOUCH PATTERN CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Bh R/W Multiple Touch Pattern Config MTP_ EN - - MTP_TH[1:0] COMP_ PTRN MTP_ ALERT 00h CAP1126 DS00001623B-page 42 2015 Microchip Technology Inc. if all of the sensor inputs set by the Multiple Touch Pattern register have a delta count greater than the MTP threshold or have their corresponding Noise Flag Status bits set, the MTP bit will be set. When using the absolute number mode, if the number of sensor inputs with thresholds above the MTP threshold or with Noise Flag Status bits set is equal to or greater than this number, the MTP bit will be set. 3. When an MTP event occurs, all touches are blocked and an interrupt is generated. 4. All sensor inputs will remain blocked so long as the requisite number of sensor inputs are above the MTP threshold or have Noise Flag Status bits set. Once this condition is removed, touch detection will be restored. Note that the MTP status bit is only cleared by writing a ‘0’ to the INT bit once the condition has been removed. Bit 7 - MTP_EN - Enables the multiple touch pattern detection circuitry. • ‘0’ (default) - The MTP detection circuitry is disabled. • ‘1’ - The MTP detection circuitry is enabled. Bits 3-2 - MTP_TH[1:0] - Determine the MTP threshold, as shown in Table 6-27. This threshold is a percentage of sensor input threshold (see Section 6.18, "Sensor Input Threshold Registers") when the device is in the Fully Active state or of the standby threshold (see Section 6.23, "Standby Threshold Register") when the device is in the Standby state. Bit 1 - COMP_PTRN - Determines whether the MTP detection circuitry will use the Multiple Touch Pattern register as a specific pattern of sensor inputs or as an absolute number of sensor inputs. • ‘0’ (default) - The MTP detection circuitry will use the Multiple Touch Pattern register bit settings as an absolute minimum number of sensor inputs that must be above the threshold or have Noise Flag Status bits set. The number will be equal to the number of bits set in the register. • ‘1’ - The MTP detection circuitry will use pattern recognition. Each bit set in the Multiple Touch Pattern register indicates a specific sensor input that must have a delta count greater than the MTP threshold or have a Noise Flag Status bit set. If the criteria are met, the MTP status bit will be set. Bit 0 - MTP_ALERT - Enables an interrupt if an MTP event occurs. In either condition, the MTP status bit will be set. • ‘0’ (default) - If an MTP event occurs, the ALERT# pin is not asserted. • ‘1’ - If an MTP event occurs, the ALERT# pin will be asserted. 6.16 Multiple Touch Pattern Register The Multiple Touch Pattern register acts as a pattern to identify an expected sensor input profile for diagnostics or other significant events. There are two methods for how the Multiple Touch Pattern register is used: as specific sensor inputs or number of sensor input that must exceed the MTP threshold or have Noise Flag Status bits set. Which method is used is based on the COMP_PTRN bit (see Section 6.15). The methods are described below. 1. Specific Sensor Inputs: If, during a single polling cycle, the specific sensor inputs above the MTP threshold or with Noise Flag Status bits set match those bits set in the Multiple Touch Pattern register, an MTP event is flagged. 2. Number of Sensor Inputs: If, during a single polling cycle, the number of sensor inputs with a delta count above the MTP threshold or with Noise Flag Status bits set is equal to or greater than the number of pattern bits set, an MTP event is flagged. TABLE 6-27: MTP_TH BIT DECODE MTP_TH[1:0] Threshold Divide Setting 1 0 0 0 12.5% (default) 0 1 25% 1 0 37.5% 1 1 100% TABLE 6-28: MULTIPLE TOUCH PATTERN REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Dh R/W Multiple Touch Pattern - - CS6_ PTRN CS5_ PTRN CS4_ PTRN CS3_ PTRN CS2_ PTRN CS1_ PTRN 3Fh 2015 Microchip Technology Inc. DS00001623B-page 43 CAP1126 Bit 5 - CS6_PTRN - Determines whether CS6 is considered as part of the Multiple Touch Pattern. • ‘0’ - CS6 is not considered a part of the pattern. • ‘1’ - CS6 is considered a part of the pattern or the absolute number of sensor inputs that must have a delta count greater than the MTP threshold or have the Noise Flag Status bit set is increased by 1. Bit 4 - CS5_PTRN - Determines whether CS5 is considered as part of the Multiple Touch Pattern. Bit 3 - CS4_PTRN - Determines whether CS4 is considered as part of the Multiple Touch Pattern. Bit 2 - CS3_PTRN - Determines whether CS3 is considered as part of the Multiple Touch Pattern. Bit 1 - CS2_PTRN - Determines whether CS2 is considered as part of the Multiple Touch Pattern. Bit 0 - CS1_PTRN - Determines whether CS1 is considered as part of the Multiple Touch Pattern. 6.17 Recalibration Configuration Register The Recalibration Configuration register controls the automatic re-calibration routine settings as well as advanced controls to program the Sensor Input Threshold register settings. 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 6). The individual Sensor Input X Threshold registers (Sensor Input 2 Threshold through Sensor Input 6 Threshold) can be individually updated at any time. Bit 6 - NO_CLR_INTD - Controls whether the accumulation of intermediate data is cleared if the noise status bit is set. • ‘0’ (default) - The accumulation of intermediate data is cleared if the noise status bit is set. • ‘1’ - The accumulation of intermediate data is not cleared if the noise status bit is set. APPLICATION NOTE: Bits 5 and 6 should both be set to the same value. Either both should be set to ‘0’ or both should be set to ‘1’. Bit 5 - NO_CLR_NEG - Controls whether the consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘0’ (default) - The consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘1’ - The consecutive negative delta counts counter is not cleared if the noise status bit is set. Bits 4 - 3 - NEG_DELTA_CNT[1:0] - Determines the number of negative delta counts necessary to trigger a digital recalibration as shown in Table 6-30. TABLE 6-29: RECALIBRATION CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Fh R/W Recalibration Configuration BUT_ LD_TH NO_ CLR_ INTD NO_ CLR_ NEG NEG_DELTA_ CNT[1:0] CAL_CFG[2:0] 8Ah TABLE 6-30: NEG_DELTA_CNT BIT DECODE NEG_DELTA_CNT[1:0] Number of Consecutive Negative Delta Count Values 1 0 00 8 0 1 16 (default) 1 0 32 1 1 None (disabled) CAP1126 DS00001623B-page 44 2015 Microchip Technology Inc. Bits 2 - 0 - CAL_CFG[2:0] - Determines the update time and number of samples of the automatic re-calibration routine. The settings apply to all sensor inputs universally (though individual sensor inputs can be configured to support re-calibration - see Section 6.11). Note 6-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 6-2 Update Time refers to the amount of time (in polling cycle periods) that elapses before the Base Count is updated. The time will depend upon the number of channels active, the averaging setting, and the programmed cycle time. 6.18 Sensor Input Threshold Registers The Sensor Input Threshold registers store the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. When the BUT_LD_TH bit is set (see Section 6.17 - bit 7), writing data to the Sensor Input 1 Threshold register will update all of the sensor input threshold registers (31h - 35h inclusive). 6.19 Sensor Input Noise Threshold Register TABLE 6-31: CAL_CFG BIT DECODE CAL_CFG[2:0] Recalibration Samples (see Note 6-1) Update Time (see Note 6-2) 210 0 0 0 16 16 0 0 1 32 32 0 1 0 64 64 (default) 0 1 1 128 128 1 0 0 256 256 1 0 1 256 1024 1 1 0 256 2048 1 1 1 256 4096 TABLE 6-32: SENSOR INPUT THRESHOLD REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 30h R/W Sensor Input 1 Threshold - 64 32 16 8 4 2 1 40h 31h R/W Sensor Input 2 Threshold - 64 32 16 8 4 2 1 40h 32h R/W Sensor Input 3 Threshold - 64 32 16 8 4 2 1 40h 33h R/W Sensor Input 4 Threshold - 64 32 16 8 4 2 1 40h 34h R/W Sensor Input 5 Threshold - 64 32 16 8 4 2 1 40h 35h R/W Sensor Input 6 Threshold - 64 32 16 8 4 2 1 40h TABLE 6-33: SENSOR INPUT NOISE THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 38h R/W Sensor Input Noise Threshold CS_BN_TH [1:0] 01h 2015 Microchip Technology Inc. DS00001623B-page 45 CAP1126 The Sensor Input Noise Threshold register controls the value of a secondary internal threshold to detect noise and improve the automatic recalibration routine. If a capacitive touch sensor input exceeds the Sensor Input Noise Threshold but does not exceed the sensor input threshold, it is determined to be caused by a noise spike. That sample is not used by the automatic re-calibration routine. This feature can be disabled by setting the DIS_DIG_NOISE bit. Bits 1-0 - CS1_BN_TH[1:0] - Controls the noise threshold for all capacitive touch sensor inputs, as shown in Table 6-34. The threshold is proportional to the threshold setting. 6.20 Standby Channel Register The Standby Channel register controls which (if any) capacitive touch sensor inputs are active during Standby. Bit 5 - CS6_STBY - Controls whether the CS6 channel is active in Standby. • ‘0’ (default) - The CS6 channel not be sampled during Standby mode. • ‘1’ - The CS6 channel will be sampled during Standby Mode. It will use the Standby threshold setting, and the standby averaging and sensitivity settings. Bit 4 - CS5_STBY - Controls whether the CS5 channel is active in Standby. 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. 6.21 Standby Configuration Register The Standby Configuration register controls averaging and cycle time for those sensor inputs that are active in Standby. This register is useful for detecting proximity on a small number of sensor inputs as it allows the user to change averaging and sample times on a limited number of sensor inputs and still maintain normal functionality in the fully active state. Bit 7 - AVG_SUM - Determines whether the active sensor inputs will average the programmed number of samples or whether they will accumulate for the programmed number of samples. • ‘0’ - (default) - The active sensor input delta count values will be based on the average of the programmed number of samples when compared against the threshold. • ‘1’ - The active sensor input delta count values will be based on the summation of the programmed number of samples when compared against the threshold. This bit should only be set when performing proximity detection as TABLE 6-34: CSX_BN_TH BIT DECODE CS_BN_TH[1:0] Percent Threshold Setting 1 0 0 0 25% 0 1 37.5% (default) 1 0 50% 1 1 62.5% TABLE 6-35: STANDBY CHANNEL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 40h R/W Standby Channel - - CS6_ STBY CS5_ STBY CS4_ STBY CS3_ STBY CS2_ STBY CS1_ STBY 00h TABLE 6-36: STANDBY CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 41h R/W Standby Configuration AVG_ SUM STBY_AVG[2:0] STBY_SAMP_ TIME[1:0] STBY_CY_TIME [1:0] 39h CAP1126 DS00001623B-page 46 2015 Microchip Technology Inc. a physical touch will overflow the delta count registers and may result in false readings. Bits 6 - 4 - STBY_AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-37. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. 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 6-38. Bits 1 - 0 - STBY_CY_TIME[2:0] - Determines the overall cycle time for all measured channels during standby operation as shown in Table 6-39. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The STBY_AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. TABLE 6-37: STBY_AVG BIT DECODE STBY_AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-38: STBY_SAMP_TIME BIT DECODE STBY_SAMP_TIME[1:0] Sampling Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-39: STBY_CY_TIME BIT DECODE STBY_CY_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms 2015 Microchip Technology Inc. DS00001623B-page 47 CAP1126 6.22 Standby Sensitivity Register The Standby Sensitivity register controls the sensitivity for sensor inputs that are active in Standby. Bits 2 - 0 - STBY_SENSE[2:0] - Controls the sensitivity for sensor inputs that are active in Standby. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the 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. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 6.23 Standby Threshold Register The Standby Threshold register stores the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. 6.24 Sensor Input Base Count Registers TABLE 6-40: STANDBY SENSITIVITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 42h R/W Standby Sensitivity - - - - - STBY_SENSE[2:0] 02h TABLE 6-41: STBY_SENSE BIT DECODE STBY_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-42: STANDBY THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 43h R/W Standby Threshold - 64 32 16 8 4 2 1 40h TABLE 6-43: SENSOR INPUT BASE COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 50h R Sensor Input 1 Base Count 128 64 32 16 8 4 2 1 C8h CAP1126 DS00001623B-page 48 2015 Microchip Technology Inc. The Sensor Input Base Count registers store the calibrated “Not Touched” input value from the capacitive touch sensor inputs. These registers are periodically updated by the re-calibration routine. The routine uses an internal adder to add the current count value for each reading to the sum of the previous readings until sample size has been reached. At this point, the upper 16 bits are taken and used as the Sensor Input Base Count. The internal adder is then reset and the re-calibration routine continues. The data presented is determined by the BASE_SHIFT[3:0] bits (see Section 6.5). 6.25 LED Output Type Register The LED Output Type register controls the type of output for the LED pins. Each pin is controlled by a single bit. Refer to application note 21.4 CAP1126Family LED Configuration Options for more information about implementing LEDs. Bit 1 - LED2_OT - Determines the output type of the LED2 pin. • ‘0’ (default) - The LED2 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. • ‘1’ - The LED2 pin is a push-pull output. When driving a logic ‘1’, the pin is driven high. When driving a logic ‘0’, the pin is driven low. Bit 0 - LED1_OT - Determines the output type of the LED1 pin. 6.26 Sensor Input LED Linking Register The Sensor Input LED Linking register controls whether a capacitive touch sensor input is linked to an LED output. If the corresponding bit is set, then the appropriate LED output will change states defined by the LED Behavior controls (see Section 6.31) in response to the capacitive touch sensor input. 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. • ‘0’ (default) - The LED 2 output is not associated with the CS2 input. If a touch is detected on the CS2 input, the LED will not automatically be actuated. The LED is enabled and controlled via the LED Output Control register (see Section 6.28) and the LED Behavior registers (see Section 6.31). 51h R Sensor Input 2 Base Count 128 64 32 16 8 4 2 1 C8h 52h R Sensor Input 3 Base Count 128 64 32 16 8 4 2 1 C8h 53h R Sensor Input 4 Base Count 128 64 32 16 8 4 2 1 C8h 54h R Sensor Input 5 Base Count 128 64 32 16 8 4 2 1 C8h 55h R Sensor Input 6 Base Count 128 64 32 16 8 4 2 1 C8h TABLE 6-44: LED OUTPUT TYPE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 71h R/W LED Output Type ----- - LED2_ OT LED1_ OT 00h TABLE 6-45: SENSOR INPUT LED LINKING REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 72h R/W Sensor Input LED Linking - - - - - - CS2_ LED2 CS1_ LED1 00h TABLE 6-43: SENSOR INPUT BASE COUNT REGISTERS (CONTINUED) ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2015 Microchip Technology Inc. DS00001623B-page 49 CAP1126 • ‘1’ - The LED 2 output is associated with the CS2 input. If a touch is detected on the CS2 input, the LED will be actuated and behave as defined in Table 6-52. Bit 0 - CS1_LED1 - Links the LED1 output to a detected touch on the CS1 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. 6.27 LED Polarity Register The LED Polarity register controls the logical polarity of the LED outputs. When these bits are set or cleared, the corresponding LED Mirror controls are also set or cleared (unless the BLK_POL_MIR bit is set - see Section 6.6, "Configuration Registers"). Table 6-48, "LED Polarity Behavior" shows the interaction between the polarity controls, output controls, and relative brightness. APPLICATION NOTE: The polarity controls determine the final LED pin drive. A touch on a linked capacitive touch sensor input is treated in the same way as the LED Output Control bit being set to a logic ‘1’. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’ then the LED will be on and that the CAP1126 LED pin is sinking the LED current. Conversely, if the LED pin is driven to a logic ‘1’, the LED will be off and there is no current flow. See Figure 5-1, "System Diagram for CAP1126". APPLICATION NOTE: This application note applies when the LED polarity is inverted (LEDx_POL = ‘0’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘0’ state in. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven low (i.e. maximum % of time that the LED is on) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven low (i.e. minimum % of time that the LED is on). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at the minimum duty cycle setting. Breathe operations will ramp the duty cycle from the minimum duty cycle to the maximum duty cycle. APPLICATION NOTE: This application note applies when the LED polarity is non-inverted (LEDx_POL = ‘1’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘1’ state. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven high (i.e. maximum % of time that the LED is off) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven high (i.e. minimum % of time that the LED is off). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at 100 minus the minimum duty cycle setting. Breathe operations will ramp the duty cycle from 100 minus the minimum duty cycle to 100 minus the maximum duty cycle. APPLICATION NOTE: The LED Mirror controls (see Section 6.30, "LED Mirror Control Register") work with the polarity controls with respect to LED brightness but will not have a direct effect on the output pin drive. Bit 1 - LED2_POL - Determines the polarity of the LED2 output. • ‘0’ (default) - The LED2 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 LED2 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. Bit 0 - LED1_POL - Determines the polarity of the LED1 output. TABLE 6-46: LED POLARITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 73h R/W LED Polarity - - - - - - LED2_ POL LED1_ POL 00h CAP1126 DS00001623B-page 50 2015 Microchip Technology Inc. 6.28 LED Output Control Register The LED Output Control Register controls the output state of the LED pins that are not linked to sensor inputs. The LED Polarity Control Register will determine the non actuated state of the LED pins. The actuated LED behavior is determined by the LED behavior controls (see Section 6.31, "LED Behavior Register"). Table 6-48 shows the interaction between the polarity controls, output controls, and relative brightness. Bit 1 - LED2_DR - Determines whether LED2 output is driven high or low. • ‘0’ (default) - The LED2 output is driven at the minimum duty cycle or not actuated. • ‘1’ - The LED2 output is High Z or driven at the maximum duty cycle or actuated. Bit 0 - LED1_DR - Determines whether LED1 output is driven high or low. TABLE 6-47: LED OUTPUT CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 74h R/W LED Output Control --- - -- LED2_ DR LED1_ DR 00h Note: If an LED is linked to a sensor input in the Sensor Input LED Linking Register (Section 6.26, "Sensor Input LED Linking Register"), the corresponding bit in the LED Output Control Register is ignored (i.e. a linked LED cannot be host controlled). TABLE 6-48: LED POLARITY BEHAVIOR LED Output Control Register or Touch Polarity Max Duty Min Duty Brightness LED Appearance 0 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. Brightness ramps from min duty cycle to max duty cycle according to LED behavior 0 non-inverted (‘1’) not used minimum % of time that the LED is off (logic 1) maximum brightness at 100 minus min duty cycle. on at 100 - min duty cycle 1 non-inverted (‘1’) maximum % of time that the LED is off (logic 1) minimum % of time that the LED is off (logic 1) For Direct behavior, maximum brightness is 100 minus max duty cycle. When breathing, max brightness is 100 minus min duty cycle. Brightness ramps from 100 - min duty cycle to 100 - max duty cycle. according to LED behavior 2015 Microchip Technology Inc. DS00001623B-page 51 CAP1126 6.29 Linked LED Transition Control Register The Linked LED Transition Control register controls the LED drive when the LED is linked to a capacitive touch sensor input. These controls work in conjunction with the INV_LINK_TRAN bit (see Section 6.6.2, "Configuration 2 - 44h") to create smooth transitions from host control to linked LEDs. Bit 1 - LED2_LTRAN - Determines the transition effect when LED2 is linked to CS2. • ‘0’ (default) - When the LED output control bit for LED2 is ‘1’, and then LED2 is linked to CS2 and no touch is detected, the LED will change states. • ‘1’ - If the INV_LINK_TRAN bit is ‘1’, when the LED output control bit for CS2 is ‘1’, and then CS2 is linked to LED2 and no touch is detected, the LED will not change states. In addition, the LED state will change when the sensor pad is touched. If the INV_LINK_TRAN bit is ‘0’, when the LED output control bit for CS2 is ‘1’, and then CS2 is linked to LED2 and no touch is detected, the LED will not change states. However, the LED state will not change when the sensor pad is touched. 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 LED2_LTRAN bit is set to ‘1’. Therefore, if breathe and pulse behaviors are used, set the INV_LINK_TRAN bit to ‘1’. Bit 0 - LED1_LTRAN - Determines the transition effect when LED1 is linked to CS1. 6.30 LED Mirror Control Register The LED Mirror Control Registers determine the meaning of duty cycle settings when polarity is non-inverted for each LED channel. When the polarity bit is set to ‘1’ (non-inverted), to obtain correct steps for LED ramping, pulse, and breathe behaviors, the min and max duty cycles need to be relative to 100%, rather than the default, which is relative to 0%. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’, the LED will be on and the CAP1126 LED pin is sinking the LED current. When the polarity bit is set to ‘1’, it is considered non-inverted. For systems using the opposite LED configuration, mirror controls would apply when the polarity bit is ‘0’. These bits are changed automatically if the corresponding LED Polarity bit is changed (unless the BLK_POL_MIR bit is set - see Section 6.6). Bit 1 - LED2_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. • ‘0’ (default) - The duty cycle settings are determined relative to 0% and are determined directly with the settings. • ‘1’ - The duty cycle settings are determined relative to 100%. Bit 0 - LED1_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. 6.31 LED Behavior Register TABLE 6-49: LINKED LED TRANSITION CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 77h R/W Linked LED Transition Control - ----- LED2_ LTRAN LED1_ LTRAN 00h TABLE 6-50: LED MIRROR CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 79h R/W LED Mirror Control ------ LED2_ MIR _ EN LED1_ MIR _ EN 00h TABLE 6-51: LED BEHAVIOR REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 81h R/W LED Behavior 1 - - - - LED2_CTL[1:0] LED1_CTL[1:0] 00h CAP1126 DS00001623B-page 52 2015 Microchip Technology Inc. The LED Behavior register controls the operation of LEDs. Each LED pin is controlled by a 2-bit field and the behavior is determined by whether the LED is linked to a capacitive touch sensor input or not. If the corresponding LED output is linked to a capacitive touch sensor input, the appropriate behavior will be enabled / disabled based on touches and releases. If the LED output is not associated with a capacitive touch sensor input, the appropriate behavior will be enabled / disabled by the LED Output Control register. If the respective LEDx_DR bit is set to a logic ‘1’, this will be associated as a “touch”, and if the LEDx_DR bit is set to a logic ‘0’, this will be associated as a “release”. Table 6-52, "LEDx_CTL Bit Decode" shows the behavior triggers. The defined behavior will activate when the Start Trigger is met and will stop when the Stop Trigger is met. Note the behavior of the Breathe Hold and Pulse Release option. The LED Polarity Control register will determine the non actuated state of the LED outputs (see Section 6.27, "LED Polarity Register"). APPLICATION NOTE: If an LED is not linked to a capacitive touch sensor input and is breathing (via the Breathe or Pulse behaviors), it must be unactuated and then re-actuated before changes to behavior are processed. For example, if the LED output is breathing and the Maximum duty cycle is changed, this change will not take effect until the LED output control register is set to ‘0’ and then re-set to ‘1’. APPLICATION NOTE: If an LED is not linked to the capacitive touch sensor input and configured to operate using Pulse 1 Behavior, then the circuitry will only be actuated when the corresponding output control bit is set. It will not check the bit condition until the Pulse 1 behavior is finished. The device will not remember if the bit was cleared and reset while it was actuated. APPLICATION NOTE: If an LED is actuated and not linked and the desired LED behavior is changed, this new behavior will take effect immediately; however, the first instance of the changed behavior may act incorrectly (e.g. if changed from Direct to Pulse 1, the LED output may ‘breathe’ 4 times and then end at minimum duty cycle). LED Behaviors will operate normally once the LED has been un-actuated and then re-actuated. APPLICATION NOTE: If an LED is actuated and it is switched from linked to a capacitive touch sensor input to unlinked (or vice versa), the LED will respond to the new command source immediately if the behavior was Direct or Breathe. For Pulse behaviors, it will complete the behavior already in progress. For example, if a linked LED was actuated by a touch and the control 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. Bits 3 - 2 - LED2_CTL[1:0] - Determines the behavior of LED2 as shown in Table 6-52. Bits 1 - 0 - LED1_CTL[1:0] - Determines the behavior of LED1 as shown in Table 6-52. 2015 Microchip Technology Inc. DS00001623B-page 53 CAP1126 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. 6.32 LED Pulse 1 Period Register The LED Pulse Period 1 register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 01b). The LSB represents 32ms so that a setting of 18h (24d) would represent a period of 768ms (24 x 32ms = 768ms). The total range is from 32ms to 4.064 seconds as shown in Table 6-54 with the default being 1024ms. 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. Bit 7 - ST_TRIG - Determines the start trigger for the LED Pulse behavior. • ‘0’ (default) - The LED will Pulse when a touch is detected or the drive bit is set. • ‘1’ - The LED will Pulse when a release is detected or the drive bit is cleared. TABLE 6-52: LEDX_CTL BIT DECODE LEDx_CTL [1:0] Operation Description Start TRigger Stop Trigger 1 0 0 0 Direct The LED is driven to the programmed state (active or inactive). See Figure 6-7 Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 0 1 Pulse 1 The LED will “Pulse” a programmed number of times. During each “Pulse” the LED will breathe up to the maximum brightness and back down to the minimum brightness so that the total “Pulse” period matches the programmed value. Touch or Release Detected or LED Output Control bit set or cleared (see Section 6.32) n/a 1 0 Pulse 2 The LED will “Pulse” when the start trigger is detected. When the stop trigger is detected, it will “Pulse” a programmable number of times then return to its minimum brightness. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 1 1 Breathe The LED will breathe. It will be driven with a duty cycle that ramps up from the programmed minimum duty cycle (default 0%) to the programmed maximum duty cycle duty cycle (default 100%) and then back down. Each ramp takes up 50% of the programmed period. The total period of each “breath” is determined by the LED Breathe Period controls - see Section 6.34. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared TABLE 6-53: LED PULSE 1 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 84h R/W LED Pulse 1 Period ST_ TRIG P1_ PER6 P1_ PER5 P1_ PER4 P1_ PER3 P1_ PER2 P1_ PER1 P1_ PER0 20h CAP1126 DS00001623B-page 54 2015 Microchip Technology Inc. The Pulse 1 operation is shown in Figure 6-1 when the LED output is configured for non-inverted polarity (LEDx_POL = 1) and in Figure 6-2 for inverted polarity (LEDx_POL = 0). . FIGURE 6-1: Pulse 1 Behavior with Non-Inverted Polarity FIGURE 6-2: Pulse 1 Behavior with Inverted Polarity TABLE 6-54: LED PULSE / BREATHE PERIOD EXAMPLE Setting (HEX) Setting (Decimal) Total Breathe / Pulse Period (MS) 00h 0 32 01h 1 32 02h 2 64 03h 3 96 . . . . . . . . . 7Dh 125 4000 Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected (100% - Pulse 1 Max Duty Cycle) * Brightness X pulses after touch or after release Pulse 1 Period (P1_PER) (100% - Pulse 1 Min Duty Cycle) * Brightness LED Brightness Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected Pulse 1 Min Duty Cycle * Brightness X pulses after touch or after release Pulse Period (P1_PER) Pulse 1 Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001623B-page 55 CAP1126 6.33 LED Pulse 2 Period Register The LED Pulse 2 Period register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 10b). 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 6-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 6-3 for non-inverted polarity (LEDx_POL = 1) and in Figure 6-4 for inverted polarity (LEDx_POL = 0). 7Eh 126 4032 7Fh 127 4064 TABLE 6-55: LED PULSE 2 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 85h R/W LED Pulse 2 Period - P2_ PER6 P2_ PER5 P2_ PER4 P2_ PER3 P2_ PER2 P2_ PER1 P2_ PER0 14h FIGURE 6-3: Pulse 2 Behavior with Non-Inverted Polarity TABLE 6-54: LED PULSE / BREATHE PERIOD EXAMPLE (CONTINUED) Setting (HEX) Setting (Decimal) Total Breathe / Pulse Period (MS) . . . Normal – untouched operation Normal – untouched operation Touch Detected (100% - Pulse 2 Min Duty Cycle) * Brightness (100% - Pulse 2 Max Duty Cycle) * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness CAP1126 DS00001623B-page 56 2015 Microchip Technology Inc. 6.34 LED Breathe Period Register The LED Breathe Period register determines the overall period of a breathe operation as determined by the LED_CTL registers (see Table 6-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 6-54) with a default of 2976ms. 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. 6.35 LED Configuration Register The LED Configuration register controls general LED behavior as well as the number of pulses that are sent for the PULSE LED output behavior. Bit 6 - RAMP_ALERT - Determines whether the device will assert the ALERT# pin when LEDs actuated by the LED Output Control register bits have finished their respective behaviors. Interrupts will only be generated if the LED activity is generated by writing the LED Output Control registers. Any LED activity associated with touch detection will not cause an interrupt to be generated when the LED behavior has been finished. • ‘0’ (default) - The ALERT# pin will not be asserted when LEDs actuated by the LED Output Control register have finished their programmed behaviors. • ‘1’ - The ALERT# pin will be asserted whenever any LED that is actuated by the LED Output Control register has finished its programmed behavior. Bits 5 - 3 - PULSE2_CNT[2:0] - Determines the number of pulses used for the Pulse 2 behavior as shown in Table 6-58. Bits 2 - 0 - PULSE1_CNT[2:0] - Determines the number of pulses used for the Pulse 1 behavior as shown in Table 6-58. FIGURE 6-4: Pulse 2 Behavior with Inverted Polarity TABLE 6-56: LED BREATHE PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 86h R/W LED Breathe Period - BR_ PER6 BR_ PER5 BR_ PER4 BR_ PER3 BR_ PER2 BR_ PER1 BR_ PER0 5Dh TABLE 6-57: LED CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 88h R/W LED Config - RAMP_ ALERT PULSE2_CNT[2:0] PULSE1_CNT[2:0] 04h Normal – untouched operation Normal – untouched operation Touch Detected Pulse 2 Max Duty Cycle * Brightness Pulse 2 Min Duty Cycle * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness . . . 2015 Microchip Technology Inc. DS00001623B-page 57 CAP1126 6.36 LED Duty Cycle Registers The LED Duty Cycle registers determine the minimum and maximum duty cycle settings used for the LED for each LED behavior. These settings affect the brightness of the LED when it is fully off and fully on. The LED driver duty cycle will ramp up from the minimum duty cycle to the maximum duty cycle and back down again. APPLICATION NOTE: When operating in Direct behavior mode, changes to the Duty Cycle settings will be applied immediately. When operating in Breathe, Pulse 1, or Pulse 2 modes, the LED must be unactuated and then re-actuated before changes to behavior are processed. Bits 7 - 4 - X_MAX_DUTY[3:0] - Determines the maximum PWM duty cycle for the LED drivers as shown in Table 6-60. Bits 3 - 0 - X_MIN_DUTY[3:0] - Determines the minimum PWM duty cycle for the LED drivers as shown in Table 6-60. TABLE 6-58: PULSEX_CNT DECODE PULSEX_CNT[2:0] Number of Breaths 21 0 0 0 0 1 (default - Pulse 2) 00 1 2 01 0 3 01 1 4 1 0 0 5 (default - Pulse 1) 10 1 6 11 0 7 11 1 8 TABLE 6-59: LED DUTY CYCLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 90h R/W LED Pulse 1 Duty Cycle P1_MAX_DUTY[3:0] P1_MIN_DUTY[3:0] F0h 91h R/W LED Pulse 2 Duty Cycle P2_MAX_DUTY[3:0] P2_MIN_DUTY[3:0] F0h 92h R/W LED Breathe Duty Cycle BR_MAX_DUTY[3:0] BR_MIN_DUTY[3:0] F0h 93h R/W Direct Duty Cycle DR_MAX_DUTY[3:0] DR_MIN_DUTY[3:0] F0h TABLE 6-60: LED DUTY CYCLE DECODE x_MAX/MIN_Duty [3:0] Maximum Duty Cycle Minimum Duty Cycle 3 21 0 0 0 0 0 7% 0% 0 0 0 1 9% 7% 0 0 1 0 11% 9% 0 0 1 1 14% 11% 0 1 0 0 17% 14% 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% CAP1126 DS00001623B-page 58 2015 Microchip Technology Inc. 6.37 LED Direct Ramp Rates Register The LED Direct Ramp Rates register control the rising and falling edge time of an LED that is configured to operate in Direct behavior mode. The rising edge time corresponds to the amount of time the LED takes to transition from its minimum duty cycle to its maximum duty cycle. Conversely, the falling edge time corresponds to the amount of time that the LED takes to transition from its maximum duty cycle to its minimum duty cycle. Bits 5 - 3 - RISE_RATE[2:0] - Determines the rising edge time of an LED when it transitions from its minimum drive state to its maximum drive state as shown in Table 6-62. Bits 2 - 0 - FALL_RATE[2:0] - Determines the falling edge time of an LED when it transitions from its maximum drive state to its minimum drive state as shown in Table 6-62. 6.38 LED Off Delay Register The LED Off Delay register determines the amount of time that an LED remains at its maximum duty cycle (or minimum as determined by the polarity controls) before it starts to ramp down. If the LED is operating in Breathe mode, this delay is applied at the top of each “breath”. If the LED is operating in the Direct mode, this delay is applied when the LED is unactuated. 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% TABLE 6-61: LED DIRECT RAMP RATES REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 94h R/W LED Direct Ramp Rates - - RISE_RATE[2:0] FALL_RATE[2:0] 00h TABLE 6-62: RISE / FALL RATE DECODE RISE_RATE/ FALL_RATE/ Bit Decode Rise / Fall Time (TRISE / TFALL) 21 0 00 0 0 0 0 1 250ms 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 TABLE 6-63: LED OFF DELAY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 95h R/W LED Off Delay Register - BR_OFF_DLY[2:0] DIR_OFF_DLY[3:0] 00h TABLE 6-60: LED DUTY CYCLE DECODE (CONTINUED) x_MAX/MIN_Duty [3:0] Maximum Duty Cycle Minimum Duty Cycle 3 21 0 2015 Microchip Technology Inc. DS00001623B-page 59 CAP1126 Bits 6 - 4 - BR_OFF_DLY[2:0] - Determines the Breathe behavior mode off delay, which is the amount of time an LED in Breathe behavior mode remains inactive after it finishes a breathe pulse (ramp on and ramp off), as shown in Figure 6- 5 (non-inverted polarity LEDx_POL = 1) and Figure 6-6 (inverted polarity LEDx_POL = 0). Available settings are shown in Table 6-64. FIGURE 6-5: Breathe Behavior with Non-Inverted Polarity FIGURE 6-6: Breathe Behavior with Inverted Polarity LED Actuated 100% - Breathe Max Min Cycle * Brightness 100% - Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) LED Actuated Breathe Max Duty Cycle * Brightness Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) CAP1126 DS00001623B-page 60 2015 Microchip Technology Inc. Bits 3 - 0 - DIR_OFF_DLY[3:0] - Determines the turn-off delay, as shown in Table 6-65, for all LEDs that are configured to operate in Direct behavior mode. The Direct behavior operation is determined by the combination of programmed Rise Time, Fall Time, Min and Max Duty cycles, Off Delay, and polarity. Figure 6-7 shows the behavior for non-inverted polarity (LEDx_POL = 1) while Figure 6- 8 shows the behavior for inverted polarity (LEDx_POL = 0). TABLE 6-64: BREATHE OFF DELAY SETTINGS BR_OFF_DLY [2:0] OFF Delay 2 10 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 FIGURE 6-7: Direct Behavior for Non-Inverted Polarity FIGURE 6-8: Direct Behavior for Inverted Polarity Normal – untouched operation RISE_RATE Setting (tRISE) (100% - Max Duty Cycle) * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation (100% - Min Duty Cycle) * Brightness LED Brightness Normal – untouched operation RISE_RATE Setting (tRISE) Min Duty Cycle * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001623B-page 61 CAP1126 6.39 Sensor Input Calibration Registers The Sensor Input Calibration registers hold the 10-bit value that represents the last calibration value. TABLE 6-65: OFF DELAY DECODE OFF Delay[3:0] Bit Decode OFF Delay (tOFF_DLY) 32 1 0 00 0 0 0 0 0 0 1 250ms 0 0 1 0 500ms 0 0 1 1 750ms 0 1 0 0 1s 0 1 0 1 1.25s 0 1 1 0 1.5s 0 1 1 1 2s 1 0 0 0 2.5s 1 0 0 1 3.0s 1 0 1 0 3.5s 1 0 1 1 4.0s 1 1 0 0 4.5s All others 5.0s TABLE 6-66: SENSOR INPUT CALIBRATION REGISTERS ADDR Register R/W B7 B6 B5 B4 B3 B2 B1 B0 Default B1h Sensor Input 1 Calibration R CAL1_9 CAL1_8 CAL1_7 CAL1_6 CAL1_5 CAL1_4 CAL1_3 CAL1_2 00h B2h Sensor Input 2 Calibration R CAL2_9 CAL2_8 CAL2_7 CAL2_6 CAL2_5 CAL2_4 CAL2_3 CAL2_2 00h B3h Sensor Input 3 Calibration R CAL3_9 CAL3_8 CAL3_7 CAL3_6 CAL3_5 CAL3_4 CAL3_3 CAL3_2 00h B4h Sensor Input 4 Calibration R CAL4_9 CAL4_8 CAL4_7 CAL4_6 CAL4_5 CAL4_4 CAL4_3 CAL4_2 00h B5h Sensor Input 5 Calibration R CAL5_9 CAL5_8 CAL5_7 CAL5_6 CAL5_5 CAL5_4 CAL5_3 CAL5_2 00h B6h Sensor Input 6 Calibration R CAL6_9 CAL6_8 CAL6_7 CAL6_6 CAL6_5 CAL6_4 CAL6_3 CAL6_2 00h B9h Sensor Input Calibration LSB 1 R CAL4_1 CAL4_0 CAL3_1 CAL3_0 CAL2_1 CAL2_0 CAL1_1 CAL1_0 00h BAh Sensor Input Calibration LSB 2 R - - - - CAL6_1 CAL6_0 CAL5_1 CAL5_0 00h CAP1126 DS00001623B-page 62 2015 Microchip Technology Inc. 6.40 Product ID Register The Product ID register stores a unique 8-bit value that identifies the device. 6.41 Manufacturer ID Register The Vendor ID register stores an 8-bit value that represents Microchip. 6.42 Revision Register The Revision register stores an 8-bit value that represents the part revision. TABLE 6-67: PRODUCT ID REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FDh R Product ID 0 1 0 1 0 0 1 1 53h TABLE 6-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 TABLE 6-69: REVISION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FFh R Revision 1 0 0 0 0 0 1 1 83h 2015 Microchip Technology Inc. DS00001623B-page 63 CAP1126 7.0 PACKAGE INFORMATION 7.1 CAP1126 Package Drawings Note: For the most current package drawings, see the Microchip Packaging Specification at: http://www.microchip.com/packaging. FIGURE 7-1: 16-Pin QFN 4mm x 4mm Package Drawing CAP1126 DS00001623B-page 64 2015 Microchip Technology Inc. FIGURE 7-2: 16-Pin QFN 4mm x 4mm Package Dimensions FIGURE 7-3: 16-Pin QFN 4mm x 4mm PCB Footprint 2015 Microchip Technology Inc. DS00001623B-page 65 CAP1126 7.2 Package Marking FIGURE 7-4: CAP1126 Package Markings C 1 26 - 1 Y WWN N N A RCC e3 TOP BOTTOM Bottom marking not allowed PB-FREE/GREEN SYMBOL (Matte Sn) Lines 1-3: Line 4: Center Horizontal Alignment Left Horizontal Alignment PIN 1 0.41 3x 0.56 Line 1 – SMSC Logo without circled R symbol Line 2 – Device ID, Version Line 3 – Year, Week, Alphanumeric Traceability Code Line 4 – Revision, Country Code 1 CAP1126 DS00001623B-page 66 2015 Microchip Technology Inc. APPENDIX A: DEVICE DELTA A.1 Delta from CAP1026 to CAP1126 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 6-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. Added filtering on RESET pin to prevent errant resets. 5. Updated controls so that the RESET pin assertion places the device into the lowest power state available and causes an interrupt when released. See Section 5.2, "RESET Pin". 6. Added 1 bit to the LED Off Delay register (see Section 6.38, "LED Off Delay Register") to extend times from 2s to 5s in 0.5s intervals. 7. Breathe behavior modified. A breathe off delay control was added to the LED Off Delay Register (see Section 6.38, "LED Off Delay Register") so the LEDs can be configured to remain inactive between breathes. 8. Added controls for the LED transition effects when linking LEDs to capacitive sensor inputs. See Section 6.29, "Linked LED Transition Control Register". 9. Added controls to “mirror” the LED duty cycle outputs so that when polarity changes, the LED brightness levels look right. These bits are automatically set when polarity is set. Added control to break this auto-set behavior. See Section 6.30, "LED Mirror Control Register". 10. Added Multiple Touch Pattern detection circuitry. See Section 6.15, "Multiple Touch Pattern Configuration Register". 11. Added General Status register to flag Multiple touches, Multiple Touch Pattern issues and general touch detections. See Section 6.2, "Status Registers". 12. Added bits 6 and 5 to the Recalibration Configuration register (2Fh - see Section 6.17, "Recalibration Configuration Register"). These bits control whether the accumulation of intermediate data and the consecutive negative delta counts counter are cleared when the noise status bit is set. 13. Added Configuration 2 register for LED linking controls, noise detection controls, and control to interrupt on press but not on release. Added control to change alert pin polarity. See Section 6.6, "Configuration Registers". 14. Updated Deep Sleep behavior so that device does not clear DSLEEP bit on received communications but will wake to communicate. 15. Changed PWM frequency for LED drivers. The PWM frequency was derived from the programmed breathe period and duty cycle settings and it ranged from ~4Hz to ~8000 Hz. The PWM frequency has been updated to be a fixed value of ~2000Hz. 16. Register delta: Table A.1 Register Delta From CAP1026 to CAP1126 Address Register Delta Delta Default 00h Page 31 Changed - Main Status / Control added bits 7-6 to control gain 00h 02h Page 32 New - General Status new register to store MTP, MULT, LED, RESET, and general TOUCH bits 00h 44h Page 35 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 38 Changed - Averaging Control updated register bits - moved SAMP_AVG[2:0] bits and added SAMP_- TIME bit 1. Default changed 39h 2Bh Page 41 New - Multiple Touch Pattern Configuration new register for Multiple Touch Pattern configuration - enable and threshold settings 80h 2015 Microchip Technology Inc. DS00001623B-page 67 CAP1126 2Dh Page 42 New - Multiple Touch Pattern Register new register for Multiple Touch Pattern detection circuitry - pattern or number of sensor inputs 3Fh 2Fh Page 43 Changed - Recalibration Configuration updated register - updated CAL_CFG bit decode to add a 128 averages setting and removed highest time setting. Default changed. Added bit 6 NO_CLR_INTD and bit 5 NO_CLR_NEG. 8Ah 38h Page 44 Changed - Sensor Input Noise Threshold updated register bits - removed bits 7 - 3 and consolidated all controls into bits 1 - 0. These bits will set the noise threshold for all channels. Default changed 01h 39h Removed - Noise Threshold Register 2 removed register n/a 41h Page 45 Changed - Standby Configuration updated register bits - moved STBY_AVG[2:0] bits and added STBY_- TIME bit 1. Default changed 39h 77h Page 51 New - Linked LED Transition Control new register to control transition effect when LED linked to sensor inputs 00h 79h Page 51 New - LED Mirror Control new register to control LED output mirroring for brightness control when polarity changed 00h 90h Page 57 Changed - LED Pulse 1 Duty Cycle changed bit decode to be more logarithmic F0h 91h Page 57 Changed - LED Pulse 2 Duty Cycle changed bit decode to be more logarithmic F0h 92h Page 57 Changed - LED Breathe Duty Cycle changed bit decode to be more logarithmic F0h 93h Page 57 Changed - LED Direct Duty Cycle changed bit decode to be more logarithmic F0h 95h Added controls - LED Off Delay Added bits 6-4 BR_OFF_DLY[2:0] Added bit 3 DIR_OFF_DLY[3] 00h FDh Page 62 Changed - Product ID Changed bit decode for CAP1126 53h Table A.1 Register Delta From CAP1026 to CAP1126 (continued) Address Register Delta Delta Default CAP1126 DS00001623B-page 68 2015 Microchip Technology Inc. APPENDIX B: DATA SHEET REVISION HISTORY Revision Section/Figure/Entry Correction DS00001623B (02-09-15) Features, Table 2-1, Table 2- 2, "Pin Types", Section 5.0, "General Description" References to BC-Link Interface, BC_DATA, BC_- CLK, BC-IRQ#, BC-Link bus have been removed Application Note under Table 2-6 [BC-Link] hidden in data sheet Table 3-2, "Electrical Specifications" BC-Link Timing Section hidden in data sheet Table 4-1 Protocol Used for 68K Pull Down Resistor changed from “BC-Link Communications” to “Reserved” Section 4.2.2, "SMBus Address and RD / WR Bit" Replaced “client address” with “slave address” in this section. Section 4.2.4, SMBus ACK and NACK Bits, Section 4.2.5, SMBus Stop Bit,Section 4.2.7, SMBus and I2C Compatibility Replaced “client” with “slave” in these sections. Table 4-4, "Read Byte Protocol" Heading changed from “Client Address” to “Slave Address” Table 6-1 Register Name for Register Address 77h changed from “LED Linked Transition Control” to “Linked LED Transition Control” Section 6.30 changed CS2 to LED2 Section 7.7 Package Marking Updated package drawing Appendix A: Device Delta changed 2Dh to 2Fh in item #12 Product Identification System Removed BC-Link references REV A REV A replaces previous SMSC version Rev. 1.32 (01-05-12) Rev. 1.32 (01-05-12) Table 3-2, "Electrical Specifications" Added conditions for tHD:DAT. Section 4.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.0 SMSC Dedicated Slave Devices in I 2C Systems.” Added: CAP1188 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. Section 6.4, "Sensor Input Delta Count Registers" Changed negative value cap from FFh to 80h. Rev. 1.31 (08-18-11) Section 4.3.3, "SMBus Send Byte" Added an application note: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Section 4.3.4, "SMBus Receive Byte" Added an application note: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Rev. 1.3 (05-18-11) Section 6.42, "Revision Register" Updated revision ID from 82h to 83h. Rev. 1.2 (02-10-11) Section A.8, "Delta from Rev B (Mask B0) to Rev C (Mask B1)" Added. Cover Corrected block diagram. ALERT#/BC_IRQ# is an output, not an input. 2015 Microchip Technology Inc. DS00001623B-page 69 CAP1126 Table 2-1, "Pin Description for CAP1126" Changed value in “Unused Connection” column for the ADDR_COMM pin from “Connect to Ground” to “n/a“. Table 3-2, "Electrical Specifications" PSR improvements made in functional revision B. Changed PSR spec from ±100 typ and ±200 max counts / V to ±3 and ±10 counts / V. Conditions updated. Section 5.5.2, "Recalibrating Sensor Inputs" Added more detail with subheadings for each type of recalibration. Section 6.6, "Configuration Registers" Added bit 5 BLK_PWR_CTRL to the Configuration 2 Register 44h. The TIMEOUT bit is set to ‘1’ by default for functional revision B and is set to ‘0’ by default for functional revision C. Section 6.42, "Revision Register" Updated revision ID in register FFh from 81h to 82h. Rev. 1.1 (11-17-10) Document Updated for functional revision B. See Section A.7, "Delta from Rev A (Mask A0) to Rev B (Mask B0)". Cover 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 Table 3-2, "Electrical Specifications" Conditions for Power Supply Rejection modified adding the following: Sampling time = 2.56ms Averaging = 1 Negative Delta Counts = Disabled All other parameters default Section 6.11, "Calibration Activate Register" Updated register description to indicate which re-calibration routine is used. Section 6.14, "Multiple Touch Configuration Register" Updated register description to indicate what will happen. Table 6-34, "CSx_BN_TH Bit Decode" Table heading changed from “Threshold Divide Setting” to “Percent Threshold Setting”. Rev. 1.0 (06-14-10) Initial release Revision Section/Figure/Entry Correction CAP1126 DS00001623B-page 70 2015 Microchip Technology Inc. THE MICROCHIP WEB SITE Microchip provides online support via our WWW site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQ), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com. Under “Support”, click on “Customer Change Notification” and follow the registration instructions. CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office • Field Application Engineer (FAE) • Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://www.microchip.com/support 2015 Microchip Technology Inc. DS00001623B-page 71 CAP1126 PRODUCT IDENTIFICATION SYSTEM To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PART NO. [X] - 1 - XXX - [X](1) l l l l Device Temperature Package Tape and Reel Range Option Example: Note 1: Tape and Reel identifier only appears in the catalog part number description. This identifier is used for ordering purposes and is not printed on the device package. Check with your Microchip Sales Office for package availability with the Tape and Reel option. Device: CAP1126 Temperature Range: Blank = 0°C to +85°C (Extended Commercial) Package: AP = QFN Tape and Reel Option: TR = Tape and Reel(1) CAP1126-1-AP-TR 16-pin QFN 4mm x 4mm (RoHS compliant) Six capacitive touch sensor inputs, Two LED drivers, Dedicated Wake, Reset, SMBus / BC-Link / SPI interfaces Reel size is 4,000 pieces CAP1126 DS00001623B-page 72 2015 Microchip Technology Inc. Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 9781632770332 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == 2015 Microchip Technology Inc. DS00001623B-page 73 AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Austin, TX Tel: 512-257-3370 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 ASIA/PACIFIC Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2943-5100 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 China - Dongguan Tel: 86-769-8702-9880 China - Hangzhou Tel: 86-571-8792-8115 Fax: 86-571-8792-8116 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 ASIA/PACIFIC China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 Taiwan - Kaohsiung Tel: 886-7-213-7828 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Dusseldorf Tel: 49-2129-3766400 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Germany - Pforzheim Tel: 49-7231-424750 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Poland - Warsaw Tel: 48-22-3325737 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Worldwide Sales and Service 01/27/15 2015 Microchip Technology Inc. DS00001622B-page 1 General Description The CAP1128, which incorporates RightTouch® technology, 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. The CAP1128 also contains two (2) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. The CAP1128 includes Multiple Pattern Touch recognition that allows the user to select a specific set of buttons to be touched simultaneously. If this pattern is detected, then a status bit is set and an interrupt generated. Additionally, the CAP1128 includes circuitry and support for enhanced sensor proximity detection. The CAP1128 offers multiple power states operating at low quiescent currents. In the Standby state of operation, one or more capacitive touch sensor inputs are active and all LEDs may be used. If a touch is detected, it will wake the system using the WAKE/SPI_MOSI pin. Deep Sleep is the lowest power state available, drawing 5uA (typical) of current. In this state, no sensor inputs are active. Driving the WAKE/SPI_MOSI pin or communications will wake the device. Applications • Desktop and Notebook PCs • LCD Monitors • Consumer Electronics • Appliances Features • Eight (8) Capacitive Touch Sensor Inputs - Programmable sensitivity - Automatic recalibration - Individual thresholds for each button • Proximity Detection • Multiple Button Pattern Detection • Calibrates for Parasitic Capacitance • Analog Filtering for System Noise Sources • Press and Hold feature for Volume-like Applications • Multiple Communication Interfaces - SMBus / I2C compliant interface - SPI communications - Pin selectable communications protocol and multiple slave addresses (SMBus / I2C only) • Low Power Operation - 5uA quiescent current in Deep Sleep - 50uA quiescent current in Standby (1 sensor input monitored) - Samples one or more channels in Standby • Two (2) LED Driver Outputs - Open Drain or Push-Pull - Programmable blink, breathe, and dimness controls - Can be linked to Capacitive Touch Sensor inputs • Dedicated Wake output flags touches in low power state • System RESET pin • Available in 20-pin 4mm x 4mm QFN RoHS compliant package CAP1128 8 Channel Capacitive Touch Sensor with 2 LED Drivers CAP1128 DS00001622B-page 2 2015 Microchip Technology Inc. TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com. We welcome your feedback. Most Current Data Sheet To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000000A is version A of document DS30000000). Errata An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: • Microchip’s Worldwide Web site; http://www.microchip.com • Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include -literature number) you are using. Customer Notification System Register on our web site at www.microchip.com to receive the most current information on all of our products. 2015 Microchip Technology Inc. DS00001622B-page 3 CAP1128 Table of Contents 1.0 Block Diagram ................................................................................................................................................................................. 4 2.0 Pin Description ................................................................................................................................................................................ 5 3.0 Electrical Specifications .................................................................................................................................................................. 9 4.0 Communications ........................................................................................................................................................................... 12 5.0 General Description ...................................................................................................................................................................... 23 6.0 Register Description ...................................................................................................................................................................... 29 7.0 Package Information ..................................................................................................................................................................... 67 Appendix A: Device Delta ................................................................................................................................................................... 72 Appendix B: Data Sheet Revision History ........................................................................................................................................... 74 The Microchip Web Site ...................................................................................................................................................................... 76 Customer Change Notification Service ............................................................................................................................................... 76 Customer Support ............................................................................................................................................................................... 76 Product Identification System ............................................................................................................................................................. 77 CAP1128 DS00001622B-page 4 2015 Microchip Technology Inc. 1.0 BLOCK DIAGRAM SMBus / BC-Link / SPI Slave Protocol SMCLK/ BC_CLK / SPI_CLK SMDATA / BC_DATA/ SPI_MSIO / SPI_MISO VDD GND ALERT# / BC_IRQ# Capacitive Touch Sensing Algorithm LED1 CS1 CS2 CS3 CS4 CS5 CS6 LED Driver, Breathe, and Dimness control WAKE / SPI_MOSI CS7 CS8 RESET ADDR_COMM SPI_CS# LED2 2015 Microchip Technology Inc. DS00001622B-page 5 CAP1128 2.0 PIN DESCRIPTION FIGURE 2-1: CAP1128 Pin Diagram (20-Pin QFN) TABLE 2-1: PIN DESCRIPTION FOR CAP1128 Pin Number Pin Name Pin Function Pin Type Unused Connection 1 SPI_CS# Active low chip-select for SPI bus DI (5V) Connect to Ground 2 WAKE / SPI_- MOSI WAKE - Active high wake / interrupt output Standby power state - requires pull-down resistor DO Pull-down WAKE - Active high wake input - requires pull-down Resistor resistor Deep Sleep power state DI SPI_MOSI - SPI Master-Out-Slave-In port when used in normal mode DI (5V) Connect to Ground 1 2 3 4 15 14 13 12 20 19 18 17 6 7 8 9 GND ALERT# / BC_IRQ# WAKE / SPI_MOSI SPI_CS# SMCLK / BC_CLK / SPI_CLK SMDAT / BC_DATA / SPI_MSIO / SPI_MISO CS7 RESET CS5 CS6 5 10 11 16 VDD CS1 CS2 CS4 CS8 CS3 N/C* LED1 LED2 ADDR_COMM CAP1128 20 pin QFN N/C* *N/C pins must be connected to ground CAP1128 DS00001622B-page 6 2015 Microchip Technology Inc. 3 SMDATA / SPI_MSIO / SPI_MISO SMDATA - Bi-directional, open-drain SMBus data - requires pull-up resistor DIOD (5V) n/a SPI_MSIO - SPI Master-Slave-In-Out bidirectional port when used in bi-directional mode DIO SPI_MISO - SPI Master-In-Slave-Out port when used in normal mode DO 4 SMCLK / SPI_- CLK SMCLK - SMBus clock input - requires pull-up resistor DI (5V) SPI_CLK - SPI clock input DI (5V) n/a 5 N/C Not Internally Connected n/a Connect to Ground 6 LED1 Open drain LED 1 driver (default) OD (5V) Connect to Ground Push-pull LED 1 driver DO leave open or connect to Ground 7 LED2 Open drain LED 2 driver (default) OD (5V) Connect to Ground Push-pull LED 2 driver DO leave open or connect to Ground 8 N/C Not Internally Connected n/a Connect to Ground 9 RESET Active high soft reset for system - resets all registers to default values. If not used, connect to ground. DI (5V) Connect to Ground 10 ALERT# ALERT# - Active low alert / interrupt output for SMBus alert or SPI interrupt OD (5V) Connect to Ground ALERT# - Active high push-pull alert / interrupt output for SMBus alert or SPI interrupt DO leave open 11 ADDR_COMM Address / communications select pin - pull-down resistor determines address / communications mechanism AI n/a 12 CS8 Capacitive Touch Sensor Input 8 AIO Connect to Ground 13 CS7 Capacitive Touch Sensor Input 7 AIO Connect to Ground 14 CS6 Capacitive Touch Sensor Input 6 AIO Connect to Ground 15 CS5 Capacitive Touch Sensor Input 5 AIO Connect to Ground 16 CS4 Capacitive Touch Sensor Input 4 AIO Connect to Ground TABLE 2-1: PIN DESCRIPTION FOR CAP1128 (CONTINUED) Pin Number Pin Name Pin Function Pin Type Unused Connection 2015 Microchip Technology Inc. DS00001622B-page 7 CAP1128 APPLICATION NOTE: When the ALERT# pinis configured as an active low output, it will be open drain. When it is configured as an active high output, it will be push-pull. APPLICATION NOTE: For the 5V tolerant pins that have a pull-up resistor, the pull-up voltage must not exceed 3.6V when the CAP1128 is unpowered. APPLICATION NOTE: The SPI_CS# pin should be grounded when SMBus, or I2C,communications are used. The pin types are described in Table 2-2. All pins labeled with (5V) are 5V tolerant. 17 CS3 Capacitive Touch Sensor Input 3 AIO Connect to Ground 18 CS2 Capacitive Touch Sensor Input 2 AIO Connect to Ground 19 CS1 Capacitive Touch Sensor Input 1 AIO Connect to Ground 20 VDD Positive Power supply Power n/a Bottom Pad GND Ground Power n/a TABLE 2-2: PIN TYPES Pin Type Description Power This pin is used to supply power or ground to the device. DI Digital Input - This pin is used as a digital input. This pin is 5V tolerant. AIO Analog Input / Output -This pin is used as an I/O for analog signals. DIOD Digital Input / Open Drain Output - This pin is used as a digital I/O. When it is used as an output, it is open drain and requires a pull-up resistor. This pin is 5V tolerant. OD Open Drain Digital Output - This pin is used as a digital output. It is open drain and requires a pull-up resistor. This pin is 5V tolerant. DO Push-pull Digital Output - This pin is used as a digital output and can sink and source current. DIO Push-pull Digital Input / Output - This pin is used as an I/O for digital signals. TABLE 2-1: PIN DESCRIPTION FOR CAP1128 (CONTINUED) Pin Number Pin Name Pin Function Pin Type Unused Connection CAP1128 DS00001622B-page 8 2015 Microchip Technology Inc. 3.0 ELECTRICAL SPECIFICATIONS Note 3-1 Stresses above those listed could cause permanent damage to the device. This is a stress rating only and functional operation of the device at any other condition above those indicated in the operation sections of this specification is not implied. Note 3-2 For the 5V tolerant pins that have a pull-up resistor, the voltage difference between V5VT_PIN and VDD must never exceed 3.6V. Note 3-3 The Package Power Dissipation specification assumes a recommended thermal via design consisting of a 3x3 matrix of 0.3mm (12mil) vias at 1.0mm pitch connected to the ground plane with a 2.5 x 2.5mm thermal landing. Note 3-4 Junction to Ambient (θJA) is dependent on the design of the thermal vias. Without thermal vias and a thermal landing, the θJA is approximately 60°C/W including localized PCB temperature increase. TABLE 3-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 3-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 20 pin QFN (see Note 3-3) 0.9 W Junction to Ambient (θJA) (see Note 3-4) 58 °C/W Operating Ambient Temperature Range -40 to 125 °C Storage Temperature Range -55 to 150 °C ESD Rating, All Pins, HBM 8000 V 2015 Microchip Technology Inc. DS00001622B-page 9 CAP1128 TABLE 3-2: ELECTRICAL SPECIFICATIONS 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 DC Power Supply Voltage VDD 3.0 3.3 3.6 V Supply Current ISTBY 120 170 uA Standby state active 1 sensor input monitored No LEDs active Default conditions (8 avg, 70ms cycle time) ISTBY 50 uA Standby state active 1 sensor input monitored No LEDs active 1 avg, 140ms cycle time, IDSLEEP 5 15 uA Deep Sleep state active LEDs at 100% or 0% Duty Cycle No communications TA < 40°C 3.135 < VDD < 3.465V IDD 500 600 uA Capacitive Sensing Active No LEDs active Capacitive Touch Sensor Inputs Maximum Base Capacitance CBASE 50 pF Pad untouched Minimum Detectable Capacitive Shift ΔCTOUCH 20 fF Pad touched - default conditions (1 avg, 35ms cycle time, 1x sensitivity) Recommended Cap Shift ΔCTOUCH 0.1 2 pF Pad touched - Not tested Power Supply Rejection PSR ±3 ±10 counts / V Untouched Current Counts Base Capacitance 5pF - 50pF Maximum sensitivity Negative Delta Counts disabled All other parameters default Timing RESET Pin Delay tRST_DLY 10 ms Time to communications ready tCOMM_DLY 15 ms Time to first conversion ready tCONV_DLY 170 200 ms LED Drivers Duty Cycle DUTYLED 0 100 % Programmable Drive Frequency fLED 2 kHz Sinking Current ISINK 24 mA VOL = 0.4 Sourcing Current ISOURCE 24 mA VOH = VDD - 0.4 Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered I/O Pins Output Low Voltage VOL 0.4 V ISINK_IO = 8mA Output High Voltage VOH VDD - 0.4 V ISOURCE_IO = 8mA CAP1128 DS00001622B-page 10 2015 Microchip Technology Inc. Note 3-5 The ALERT pin will not glitch high or low at power up if connected to VDD or another voltage. Note 3-6 The SMCLK and SMDATA pins will not glitch low at power up if connected to VDD or another voltage. Input High Voltage VIH 2.0 V Input Low Voltage VIL 0.8 V Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered RESET Pin Release to conversion ready tRESET 170 200 ms SMBus Timing Input Capacitance CIN 5 pF Clock Frequency fSMB 10 400 kHz Spike Suppression tSP 50 ns Bus Free Time Stop to Start tBUF 1.3 us Start Setup Time tSU:STA 0.6 us Start Hold Time tHD:STA 0.6 us Stop Setup Time tSU:STO 0.6 us Data Hold Time tHD:DAT 0 us When transmitting to the master Data Hold Time tHD:DAT 0.3 us When receiving from the master Data Setup Time tSU:DAT 0.6 us Clock Low Period tLOW 1.3 us Clock High Period tHIGH 0.6 us Clock / Data Fall Time tFALL 300 ns Min = 20+0.1CLOAD ns Clock / Data Rise Time tRISE 300 ns Min = 20+0.1CLOAD ns Capacitive Load CLOAD 400 pF per bus line SPI Timing Clock Period tP 250 ns Clock Low Period tLOW 0.4 x tP 0.6 x tP ns Clock High Period tHIGH 0.4 x tP 0.6 x tP ns Clock Rise / Fall time tRISE / tFALL 0.1 x tP ns Data Output Delay tD:CLK 10 ns Data Setup Time tSU:DAT 20 ns Data Hold Time tHD:DAT 20 ns SPI_CS# to SPI_CLK setup time tSU:CS 0 ns Wake Time tWAKE 10 20 us SPI_CS# asserted to CLK assert TABLE 3-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 2015 Microchip Technology Inc. DS00001622B-page 11 CAP1128 4.0 COMMUNICATIONS 4.1 Communications The CAP1128communicates using the 2-wire SMBus or I2C bus, the 2-wire proprietary BC-Link, or the SPI bus. If the proprietary BC-Link protocol is required for your application, please contact your Microchip representative for ordering instructions. 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 4-1. 4.1.1 SMBUS (I2C) COMMUNICATIONS When configured to communicate via the SMBus, the CAP1128 supports the following protocols: Send Byte, Receive Byte, Read Byte, Write Byte, Read Block, and Write Block. In addition, the device supports I2C formatting for block read and block write protocols. APPLICATION NOTE: For SMBus/I2C communications, the SPI_CS# pin is not used and should be grounded; any data presented to this pin will be ignored. See Section 4.2 and Section 4.3 for more information on the SMBus bus and protocols respectively. 4.1.2 SPI COMMUNICATIONS When configured to communicate via the SPI bus, the CAP1128supports both bi-directional 3-wire and normal 4-wire protocols and uses the SPI_CS# pin to enable communications. APPLICATION NOTE: See Section 4.5 and Section 4.6 for more information on the SPI bus and protocols respectively.Upon power up, the CAP1128 will not respond to any communications for up to 15ms. After this time, full functionality is available. 4.2 System Management Bus The CAP1128 communicates with a host controller, such as an SIO, through the SMBus. The SMBus is a two-wire serial communication protocol between a computer host and its peripheral devices. A detailed timing diagram is shown in Figure 4-1. Stretching of the SMCLK signal is supported; however, the CAP1128 will not stretch the clock signal. TABLE 4-1: ADDR_COMM PIN DECODE Pull-Down Resistor (+/- 5%) Protocol Used SMBus Address GND SPI Communications using Normal 4-wire Protocol Used n/a 56k SPI Communications using BiDirectional 3-wire Protocol Used n/a 68k Reserved n/a 82k SMBus / I2C 0101_100(r/w) 100k SMBus / I2C 0101_011(r/w) 120k SMBus / I2C 0101_010(r/w) 150k SMBus / I2C 0101_001(r/w) VDD SMBus / I2C 0101_000(r/w) CAP1128 DS00001622B-page 12 2015 Microchip Technology Inc. 4.2.1 SMBUS START BIT The SMBus Start bit is defined as a transition of the SMBus Data line from a logic ‘1’ state to a logic ‘0’ state while the SMBus Clock line is in a logic ‘1’ state. 4.2.2 SMBUS ADDRESS AND RD / WR BIT The SMBus Address Byte consists of the 7-bit slave address followed by the RD / WR indicator bit. If this RD / WR bit is a logic ‘0’, then the SMBus Host is writing data to the slave device. If this RD / WR bit is a logic ‘1’, then the SMBus Host is reading data from the slave device. See Table 4-1 for available SMBus addresses. 4.2.3 SMBUS DATA BYTES All SMBus Data bytes are sent most significant bit first and composed of 8-bits of information. 4.2.4 SMBUS ACK AND NACK BITS The SMBus slave will acknowledge all data bytes that it receives. This is done by the slave device pulling the SMBus Data line low after the 8th bit of each byte that is transmitted. This applies to both the Write Byte and Block Write protocols. The Host will NACK (not acknowledge) the last data byte to be received from the slave by holding the SMBus data line high after the 8th data bit has been sent. For the Block Read protocol, the Host will ACK each data byte that it receives except the last data byte. 4.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 CAP1128 detects an SMBus Stop bit and it has been communicating with the SMBus protocol, it will reset its slave interface and prepare to receive further communications. 4.2.6 SMBUS TIMEOUT The CAP1128 includes an SMBus timeout feature. Following a 30ms period of inactivity on the SMBus where the SMCLK pin is held low, the device will timeout and reset the SMBus interface. The timeout function defaults to disabled. It can be enabled by setting the TIMEOUT bit in the Configuration register (see Section 6.6, "Configuration Registers"). 4.2.7 SMBUS AND I2C COMPATIBILITY The major differences between SMBus and I2C devices are highlighted here. For more information, refer to the SMBus 2.0 and I2C specifications. For information on using the CAP1128 in an I2C system, refer to AN 14.0 Dedicated Slave Devices in I2C Systems. FIGURE 4-1: SMBus Timing Diagram SMDATA SMCLK TLOW TRISE THIGH TFALL TBUF THD:STA P S S - Start Condition P - Stop Condition THD:DAT TSU:DAT TSU:STA THD:STA P TSU:STO S 2015 Microchip Technology Inc. DS00001622B-page 13 CAP1128 1. CAP1128 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. 2. Minimum frequency for SMBus communications is 10kHz. 3. The SMBus slave protocol will reset if the clock is held at a logic ‘0’ for longer than 30ms. This timeout functionality is disabled by default in the CAP1128 and can be enabled by writing to the TIMEOUT bit. I2C does not have a timeout. 4. The SMBus slave protocol will reset if both the clock and data lines are held at a logic ‘1’ for longer than 200µs (idle condition). This function is disabled by default in the CAP1128 and can be enabled by writing to the TIMEOUT bit. I2C does not have an idle condition. 5. I2C devices do not support the Alert Response Address functionality (which is optional for SMBus). 6. I2C devices support block read and write differently. I2C protocol allows for unlimited number of bytes to be sent in either direction. The SMBus protocol requires that an additional data byte indicating number of bytes to read / write is transmitted. The CAP1128 supports I2C formatting only. 4.3 SMBus Protocols The CAP1128 is SMBus 2.0 compatible and supports Write Byte, Read Byte, Send Byte, and Receive Byte as valid protocols as shown below. All of the below protocols use the convention in Table 4-2. 4.3.1 SMBUS WRITE BYTE The Write Byte is used to write one byte of data to a specific register as shown in Table 4-3. 4.3.2 SMBUS READ BYTE The Read Byte protocol is used to read one byte of data from the registers as shown in Table 4-4. 4.3.3 SMBUS SEND BYTE The Send Byte protocol is used to set the internal address register pointer to the correct address location. No data is transferred during the Send Byte protocol as shown in Table 4-5. APPLICATION NOTE: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). TABLE 4-2: PROTOCOL FORMAT Data Sent to Device Data Sent to the HOst Data sent Data sent TABLE 4-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 TABLE 4-4: READ BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data NACK Stop 1->0 YYYY_YYY 0 0 XXh 0 1 ->0 YYYY_YYY 1 0 XXh 1 0 -> 1 TABLE 4-5: SEND BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Stop 1 -> 0 YYYY_YYY 0 0 XXh 0 0 -> 1 CAP1128 DS00001622B-page 14 2015 Microchip Technology Inc. 4.3.4 SMBUS RECEIVE BYTE The Receive Byte protocol is used to read data from a register when the internal register address pointer is known to be at the right location (e.g., set via Send Byte). This is used for consecutive reads of the same register as shown in Table 4-6. APPLICATION NOTE: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). 4.4 I2C Protocols The CAP1128 supports I2C Block Write and Block Read. The protocols listed below use the convention in Table 4-2. 4.4.1 BLOCK WRITE The Block Write is used to write multiple data bytes to a group of contiguous registers as shown in Table 4-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. 4.4.2 BLOCK READ The Block Read is used to read multiple data bytes from a group of contiguous registers as shown in Table 4-8. APPLICATION NOTE: When using the Block Read protocol, the internal address pointer will be automatically incremented after every data byte is received. It will wrap from FFh to 00h. 4.5 SPI Interface The SMBus has a predefined packet structure, the SPI does not. The SPI Bus can operate in two modes of operation, normal 4-wire mode and bi-directional 3-wire mode. All SPI commands consist of 8-bit packets sent to a specific slave device (identified by the CS pin). The SPI bus will latch data on the rising edge of the clock and the clock and data both idle high. All commands are supported via both operating modes. The supported commands are: Reset Serial interface, set address pointer, write command and read command. Note that all other codes received during the command phase are ignored and have no effect on the operation of the device. TABLE 4-6: RECEIVE BYTE PROTOCOL Start Slave Address RD ACK Register Data NACK Stop 1 -> 0 YYYY_YYY 1 0 XXh 1 0 -> 1 TABLE 4-7: BLOCK WRITE PROTOCOL Start Slave Address WR ACK Register Address ACK Register Data ACK 1 ->0 YYYY_YYY 0 0 XXh 0 XXh 0 Register Data ACK Register Data ACK . . . Register Data ACK Stop XXh 0 XXh 0 . . . XXh 0 0 -> 1 TABLE 4-8: BLOCK READ PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data 1->0 YYYY_YYY 0 0 XXh 0 1 ->0 YYYY_YYY 1 0 XXh ACK Register Data ACK Register Data ACK Register Data ACK . . . Register Data NACK Stop 0 XXh 0 XXh 0 XXh 0 . . . XXh 1 0 -> 1 2015 Microchip Technology Inc. DS00001622B-page 15 CAP1128 4.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 CAP1128 SPI_MOSI data line and reading data on the SPI_MISO data line. Both communications occur simultaneously which allows for larger throughput of data transactions. All basic transfers consist of two 8 bit transactions from the Master device while the slave device is simultaneously sending data at the current address pointer value. Data writes consist of two or more 8-bit transactions. The host sends a specific write command followed by the data to write the address pointer. Data reads consist of one or more 8-bit transactions. The host sends the specific read data command and continues clocking for as many data bytes as it wishes to receive. 4.5.2 SPI BI-DIRECTIONAL MODE In the bi-directional mode of operation, the SPI data signals are combined into the SPI_MSIO line, which is shared for data received by the device and transmitted by the device. The protocol uses a simple handshake and turn around sequence for data communications based on the number of clocks transmitted during each phase. All basic transfers consist of two 8 bit transactions. The first is an 8 bit command phase driven by the Master device. The second is by an 8 bit data phase driven by the Master for writes, and by the CAP1128 for read operations. The auto increment feature of the address pointer allows for successive reads or writes. The address pointer will return to 00h after reaching FFh. 4.5.3 SPI_CS# PIN The SPI Bus is a single master, multiple slave serial bus. Each slave has a dedicated CS pin (chip select) that the master asserts low to identify that the slave is being addressed. There are no formal addressing options. 4.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. 4.5.5 SPI TIMEOUT The CAP1128 does not detect any timeout conditions on the SPI bus. FIGURE 4-2: SPI Timing SPI_MSIO or SPI_MOSI or SPI_MISO SPI_CLK tLOW tRISE tHIGH tFALL tD:CLK tHD:DAT tSU:DAT tP 2015 Microchip Technology Inc. DS00001622B-page 16 CAP1128 4.6 Normal SPI Protocols When operating in normal mode, the SPI bus internal address pointer is incremented depending upon which command has been transmitted. Multiple commands may be transmitted sequentually so long as the SPI_CS# pin is asserted low. Figure 4-3 shows an example of this operation. 4.6.1 RESET INTERFACE Resets the Serial interface whenever two successive 7Ah codes are received. Regardless of the current phase of the transaction - command or data, the receipt of the successive reset commands resets the Serial communication interface only. All other functions are not affected by the reset operation. FIGURE 4-3: Example SPI Bus Communication - Normal Mode SPI_CS# SPI_MISO SPI_MOSI SPI Address Pointer SPI Data output buffer Register Address / Data 7Ah XXh (invalid) XXh (invalid) YYh (invalid) 7Ah 7Dh 41h YYh (invalid) 7Eh 66h XXh (invalid) 45h 7Dh 41h AAh (invalid) AAh (invalid) 7Fh 7Fh 55h (invalid) 66h 7Fh AAh 7Dh 43h 40h 78h 7Fh XXh (invalid) 7Fh 56h 40h / 56h 41h / 45h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 45h 40h / 56h 41h / 45h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 42h AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 55h 7Fh AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 66h 42h AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 44h 80h 40h 80h 40h 56h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 43h 55h 7Fh 7Fh 55h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 80h 45h 43h 46h 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 00h XXh Indicates SPI Address pointer incremented 2015 Microchip Technology Inc. DS00001622B-page 17 CAP1128 4.6.2 SET ADDRESS POINTER The Set Address Pointer command sets the Address pointer for subsequent reads and writes of data. The pointer is set on the rising edge of the final data bit. At the same time, the data that is to be read is fetched and loaded into the internal output buffer but is not transmitted. 4.6.3 WRITE DATA The Write Data protocol updates the contents of the register referenced by the address pointer. As the command is processed, the data to be read is fetched and loaded into the internal output buffer but not transmitted. Then, the register is updated with the data to be written. Finally, the address pointer is incremented. FIGURE 4-4: SPI Reset Interface Command - Normal Mode FIGURE 4-5: SPI Set Address Pointer Command - Normal Mode Master SPDOUT SPI_MOSI SPI_CS# SPI_CLK Reset - 7Ah Reset - 7Ah Invalid register data 00h – Internal Data buffer empty SPI_MISO Master Drives Slave Drives ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ Master SPDOUT SPI_MOSI Register Address SPI_CS# SPI_CLK Set Address Pointer – 7Dh SPI_MISO Unknown, Invalid Data Unknown, Invalid Data Master Drives Slave Drives Address pointer set ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ CAP1128 DS00001622B-page 18 2015 Microchip Technology Inc. 4.6.4 READ DATA The Read Data protocol is used to read data from the device. During the normal mode of operation, while the device is receiving data, the CAP1128 is simultaneously transmitting data to the host. For the Set Address commands and the Write Data commands, this data may be invalid and it is recommended that the Read Data command is used. FIGURE 4-6: SPI Write Command - Normal Mode FIGURE 4-7: SPI Read Command - Normal Mode Master SPDOUT SPI_MOSI Data to Write SPI_CS# SPI_CLK Write Command – 7Eh Unknown, Invalid Data Old Data at Current Address Pointer SPI_MISO Master Drives Slave Drives 1. Data written at current address pointer 2. Address pointer incremented Master SPDOUT SPI_MOSI Master Drives Slave Drives SPI_CLK First Read Command – 7Fh SPI_CS# SPI_MISO Invalid, Unknown Data * ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Subsequent Read Commands – 7F Data at Current Address Pointer Address Pointer Incremented ** ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ * The first read command after any other command will return invalid data for the first byte. Subsequent read commands will return the data at the Current Address Pointer ** The Address Pointer is incremented 8 clocks after the Read Command has been received. Therefore continually sending Read Commands will result in each command reporting new data. Once Read Commands have been finished, the last data byte will be read during the next 8 clocks for any command 2015 Microchip Technology Inc. DS00001622B-page 19 CAP1128 4.7 Bi-Directional SPI Protocols 4.7.1 RESET INTERFACE Resets the Serial interface whenever two successive 7Ah codes are received. Regardless of the current phase of the transaction - command or data, the receipt of the successive reset commands resets the Serial communication interface only. All other functions are not affected by the reset operation. 4.7.2 SET ADDRESS POINTER Sets the address pointer to the register to be accessed by a read or write command. This command overrides the autoincrementing of the address pointer. FIGURE 4-8: SPI Read Command - Normal Mode - Full FIGURE 4-9: SPI Reset Interface Command - Bi-directional Mode Master SPDOUT SPI_MOSI Master Drives Slave Drives SPI_CLK Read Command – 7Fh SPI_CS# Data at previously set register address = current address pointer SPI_MISO ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Data at previously set register address = current address pointer (SPI) XXh 1. Register Read Address updated to Current SPI Read Address pointer 1. Register data loaded into output buffer = data at current address pointer 1. Output buffer transmitted = data at previous address pointer + 1 = current address pointer 1. Register Read Address incremented = current address pointer + 1 1. SPI Read Address Incremented = new current address pointer 2. Register Read Address Incremented = current address pointer +1 Register Data loaded into Output buffer = data at current address pointer + 1 1. Output buffer transmitted = data at current address pointer + 1 2. Flag set to increment SPI Read Address at end of next 8 clocks ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Data at previously set register address = current address pointer (SPI) 1. Register data loaded into output buffer = data at current address pointer 1. Output buffer transmitted = data at previous register address pointer + 1 = current address pointer 1. Output buffer transmitted = data at current address pointer + 1 2. Flag set to increment SPI Read Address at end of next 8 clocks Subsequent Read Commands – 7Fh 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 Master SPDOUT SPI_MSIO SPI_CS# SPI_CLK Reset - 7Ah Reset - 7Ah ‘0’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ CAP1128 DS00001622B-page 20 2015 Microchip Technology Inc. 4.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. 4.7.4 READ DATA Reads data referenced by the address pointer. Performs auto increment of address pointer after the data is transferred to the Master. FIGURE 4-10: SPI Set Address Pointer Command - Bi-directional Mode FIGURE 4-11: SPI Write Data Command - Bi-directional Mode FIGURE 4-12: SPI Read Data Command - Bi-directional Mode Master SPDOUT SPI_MSIO Register Address SPI_CS# SPI_CLK Set Address Pointer – 7Dh ‘0’ ‘1’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Master SPDOUT SPI_MSIO Register Write Data SPI_CS# SPI_CLK Write Command – 7Eh ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ Master SPDOUT SPI_MSIO Master Drives Slave Drives Indeterminate Register Read Data SPI_CLK Read Command – 7Fh SPI_CS# ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ 2015 Microchip Technology Inc. DS00001622B-page 21 CAP1128 4.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 8051’s SFR space. Refer to documentation for the BC-Link compatible host controller for details on how to access the CAP1128 via the BCLink Interface. CAP1128 DS00001622B-page 22 2015 Microchip Technology Inc. 5.0 GENERAL DESCRIPTION The CAP1128 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. The CAP1128 also contains two (2) low side (or push-pull) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. Finally, the device contains a dedicated RESET pin to act as a soft reset by the system. The CAP1128 offers multiple power states. It operates at the lowest quiescent current during its Deep Sleep state. In the low power Standby state, it can monitor one or more channels and respond to communications normally. The device contains a wake pin (WAKE/SPI_MOSI) output to wake the system when a touch is detected in Standby and to wake the device from Deep Sleep. The device communicates with a host controller using the SPI bus, or via SMBus / I2C. The host controller may poll the device for updated information at any time or it may configure the device to flag an interrupt whenever a touch is detected on any sensor pad. A typical system diagram is shown in Figure 5-1. 2015 Microchip Technology Inc. DS00001622B-page 23 CAP1128 FIGURE 5-1: System Diagram for CAP1128 CAP1128 CS6 SMDATA / BC_DATA / SPI_MSIO / SPI_MISO SMCLK / BC_CLK / SPI_CLK VDD Embedded Controller ALERT# / BC_IRQ# CS4 CS2 3.3V – 5V CS5 CS3 CS1 WAKE / SPI_MOSI CS7 CS8 RESET SPI_CS# ADDR_COMM LED1 LED2 3.3V – 5V Touch Button Touch Button Touch Button Touch Button Touch Button Touch Button Touch Button Touch Button CAP1128 DS00001622B-page 24 2015 Microchip Technology Inc. 5.1 Power States The CAP1128 has three operating states depending on the status of the STBY and DSLEEP bits. When the device transitions between power states, previously detected touches (for inactive channels) are cleared and the status bits reset. 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 6.20 through Section 6.22). Interrupts will still be generated based on the active channels. The device will still respond to communications normally and can be returned to the Fully Active state of operation by clearing the STBY bit. 3. Deep Sleep - The device is in its lowest power state. It is not monitoring any capacitive sensor inputs and not driving any LEDs. All LEDs will be driven to their programmed non-actuated state and no PWM operations will be done. While in Deep Sleep, the device can be awakened by SMBus or SPI communications targeting the device. This will not cause the DSLEEP to be cleared so the device will return to Deep Sleep once all communications have stopped. If the device is not communicating via the 4-wire SPI bus, then during this state of operation, if the WAKE/SPI_MOSI pin is driven high by an external source, the device will clear the DSLEEP bit and return to Fully Active. APPLICATION NOTE: In the Deep Sleep state, the LED output will be either high or low and will not be PWM’d at the min or max duty cycle. 5.2 RESET Pin The RESET pin is an active high reset that is driven from an external source. While it is asserted high, all the internal blocks will be held in reset including the communications protocol used. No capacitive touch sensor inputs will be sampled and the LEDs will not be driven. All configuration settings will be reset to default states and all readings will be cleared. The device will be held in Deep Sleep that can only be removed by driving the RESET pin low. This will cause the RESET status bit to be set to a logic ‘1’ and generate an interrupt. 5.3 WAKE/SPI_MOSI Pin Operation The WAKE / SPI_MOSI pin is a multi-function pin depending on device operation. When the device is configured to communicate using the 4-wire SPI bus, this pin is an input. However, when the CAP1128 is placed in Standby and is not communicating using the 4-wire SPI protocol, the WAKE pin is an active high output. In this condition, the device will assert the WAKE/SPI_MOSI pin when a touch is detected on one of its sampled sensor inputs. The pin will remain asserted until the INT bit has been cleared and then it will be de-asserted. When the CAP1128 is placed in Deep Sleep and it is not communicating using the 4-wire SPI protocol, the WAKE/SPI_- MOSI pin is monitored by the device as an input. If the WAKE/SPI_MOSI pin is driven high by an external source, the CAP1128will clear the DSLEEP bit causing the device to return to Fully Active. When the device is placed in Deep Sleep, this pin is a High-Z input and must have a pull-down resistor to GND for proper operation. 5.4 LED Drivers The CAP1128 contains two (2) LED drivers. Each LED driver can be linked to its respective capacitive touch sensor input or it can be controlled by the host. Each LED driver can be configured to operate in one of the following modes with either push-pull or open drain drive. 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. This behavior may be actuated when a press is detected or when a release is detected. 3. Pulse 2 - The LED is configured to “Pulse” while actuated and then “Pulse” a programmable number of times with programmable rate and min / max brightness when the sensor pad is released. 2015 Microchip Technology Inc. DS00001622B-page 25 CAP1128 4. Breathe - The LED is configured to transition continuously ON-OFF-ON (i.e. to “Breathe”) with a programmable rate and min / max brightness. When an LED is not linked to a sensor and is actuated by the host, there’s an option to assert the ALERT# pin when the initiated LED behavior has completed. 5.4.1 LINKING LEDS TO CAPACITIVE TOUCH SENSOR INPUTS All LEDs can be linked to the corresponding capacitive touch sensor input so that when the sensor input detects a touch, the corresponding LED will be actuated at one of the programmed responses. 5.5 Capacitive Touch Sensing The CAP1128 contains eight (8) independent capacitive touch sensor inputs. Each sensor input has dynamic range to detect a change of capacitance due to a touch. Additionally, each sensor input can be configured to be automatically and routinely re-calibrated. 5.5.1 SENSING CYCLE Each capacitive touch sensor input has controls to be activated and included in the sensing cycle. When the device is active, it automatically initiates a sensing cycle and repeats the cycle every time it finishes. The cycle polls through each active sensor input starting with CS1 and extending through CS8. As each capacitive touch sensor input is polled, its measurement is compared against a baseline “Not Touched” measurement. If the delta measurement is large enough, a touch is detected and an interrupt is generated. The sensing cycle time is programmable (see Section 6.10, "Averaging and Sampling Configuration Register"). 5.5.2 RECALIBRATING SENSOR INPUTS There are various options for recalibrating the capacitive touch sensor inputs. Recalibration re-sets the Base Count Registers (Section 6.24, "Sensor Input Base Count Registers") which contain the “not touched” values used for touch detection comparisons. APPLICATION NOTE: The device will recalibrate all sensor inputs that were disabled when it transitions from Standby. Likewise, the device will recalibrate all sensor inputs when waking out of Deep Sleep. 5.5.2.1 Manual Recalibration The Calibration Activate Registers (Section 6.11, "Calibration Activate Register") force recalibration of selected sensor inputs. When a bit is set, the corresponding capacitive touch sensor input will be recalibrated (both analog and digital). The bit is automatically cleared once the recalibration routine has finished. 5.5.2.2 Automatic Recalibration Each sensor input is regularly recalibrated at a programmable rate (see Section 6.17, "Recalibration Configuration Register"). By default, the recalibration routine stores the average 64 previous measurements and periodically updates the base “not touched” setting for the capacitive touch sensor input. 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. Note: Automatic recalibration only works when the delta count is below the active sensor input threshold. It is disabled when a touch is detected. CAP1128 DS00001622B-page 26 2015 Microchip Technology Inc. 5.5.2.3 Negative Delta Count Recalibration It is possible that the device loses sensitivity to a touch. This may happen as a result of a noisy environment, an accidental recalibration during a touch, or other environmental changes. When this occurs, the base untouched sensor input may generate negative delta count values. The NEG_DELTA_CNT bits (see Section 6.17, "Recalibration Configuration Register") can be set to force a recalibration after a specified number of consecutive negative delta readings. 5.5.2.4 Delayed Recalibration It is possible that a “stuck button” occurs when something is placed on a button which causes a touch to be detected for a long period. By setting the MAX_DUR_EN bit (see Section 6.6, "Configuration Registers"), a recalibration can be forced when a touch is held on a button for longer than the duration specified in the MAX_DUR bits (see Section 6.8, "Sensor Input Configuration Register"). 5.5.3 PROXIMITY DETECTION Each sensor input can be configured to detect changes in capacitance due to proximity of a touch. This circuitry detects the change of capacitance that is generated as an object approaches, but does not physically touch, the enabled sensor pad(s). When a sensor input is selected to perform proximity detection, it will be sampled from 1x to 128x per sampling cycle. The larger the number of samples that are taken, the greater the range of proximity detection is available at the cost of an increased overall sampling time. 5.5.4 MULTIPLE TOUCH PATTERN DETECTION The multiple touch pattern (MTP) detection circuitry can be used to detect lid closure or other similar events. An event can be flagged based on either a minimum number of sensor inputs or on specific sensor inputs simultaneously exceeding an MTP threshold or having their Noise Flag Status Register bits set. An interrupt can also be generated. During an MTP event, all touches are blocked (see Section 6.15, "Multiple Touch Pattern Configuration Register"). 5.5.5 LOW FREQUENCY NOISE DETECTION Each sensor input has an EMI noise detector that will sense if low frequency noise is injected onto the input with sufficient power to corrupt the readings. If this occurs, the device will reject the corrupted sample and set the corresponding bit in the Noise Status register to a logic ‘1’. 5.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. 5.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. Whenever an interrupt is generated, the INT bit (see Section 6.1, "Main Control Register") is set. The ALERT# pin is cleared when the INT bit is cleared by the user. Additionally, when the INT bit is cleared by the user, status bits are only cleared if no touch is detected. 5.6.1 SENSOR INTERRUPT BEHAVIOR The sensor interrupts are generated in one of two ways: 1. An interrupt is generated when a touch is detected and, as a user selectable option, when a release is detected (by default - see Section 6.6). See Figure 5-3. 2. If the repeat rate is enabled then, so long as the touch is held, another interrupt will be generated based on the programmed repeat rate (see Figure 5-2). Note: During this recalibration, the device will not respond to touches. Note: Delayed recalibration only works when the delta count is above the active sensor input threshold. If enabled, it is invoked when a sensor pad touch is held longer than the MAX_DUR bit setting. 2015 Microchip Technology Inc. DS00001622B-page 27 CAP1128 When the repeat rate is enabled, the device uses an additional control called MPRESS that determines whether a touch is flagged as a simple “touch” or a “press and hold”. The MPRESS[3:0] bits set a minimum press timer. When the button is touched, the timer begins. If the sensor pad is released before the minimum press timer expires, it is flagged as a touch and an interrupt is generated upon release. If the sensor input detects a touch for longer than this timer value, it is flagged as a “press and hold” event. So long as the touch is held, interrupts will be generated at the programmed repeat rate and upon release (if enabled). APPLICATION NOTE: Figure 5-2 and Figure 5-3 show default operation which is to generate an interrupt upon sensor pad release and an active-low ALERT# pin. APPLICATION NOTE: The host may need to poll the device twice to determine that a release has been detected. FIGURE 5-2: Sensor Interrupt Behavior - Repeat Rate Enabled FIGURE 5-3: Sensor Interrupt Behavior - No Repeat Rate Enabled Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Min Press Setting (280ms) Interrupt on Touch Button Repeat Rate (175ms) Button Repeat Rate (175ms) Interrupt on Release (optional) ALERT# pin (active low) Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Interrupt on Touch Interrupt on Release (optional) ALERT# pin (active low) CAP1128 DS00001622B-page 28 2015 Microchip Technology Inc. 6.0 REGISTER DESCRIPTION The registers shown in Table 6-1 are accessible through the communications protocol. An entry of ‘-’ indicates that the bit is not used and will always read ‘0’. TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER Register Address R/W Register Name Function Default Value Page 00h R/W Main Control Controls general power states and power dissipation 00h Page 31 02h R General Status Stores general status bits 00h Page 32 03h R Sensor Input Status Returns the state of the sampled capacitive touch sensor inputs 00h Page 32 04h R LED Status Stores status bits for LEDs 00h Page 32 0Ah R Noise Flag Status Stores the noise flags for sensor inputs 00h Page 33 10h R Sensor Input 1 Delta Count Stores the delta count for CS1 00h Page 34 11h R Sensor Input 2 Delta Count Stores the delta count for CS2 00h Page 34 12h R Sensor Input 3 Delta Count Stores the delta count for CS3 00h Page 34 13h R Sensor Input 4 Delta Count Stores the delta count for CS4 00h Page 34 14h R Sensor Input 5 Delta Count Stores the delta count for CS5 00h Page 34 15h R Sensor Input 6 Delta Count Stores the delta count for CS6 00h Page 34 16h R Sensor Input 7 Delta Count Stores the delta count for CS7 00h Page 34 17h R Sensor Input 8 Delta Count Stores the delta count for CS8 00h Page 34 1Fh R/W Sensitivity Control Controls the sensitivity of the threshold and delta counts and data scaling of the base counts 2Fh Page 34 20h R/W Configuration Controls general functionality 20h Page 36 21h R/W Sensor Input Enable Controls whether the capacitive touch sensor inputs are sampled FFh Page 37 22h R/W Sensor Input Configuration Controls max duration and auto-repeat delay for sensor inputs operating in the full power state A4h Page 38 23h R/W Sensor Input Configuration 2 Controls the MPRESS controls for all sensor inputs 07h Page 39 24h R/W Averaging and Sampling Config Controls averaging and sampling window 39h Page 39 26h R/W Calibration Activate Forces re-calibration for capacitive touch sensor inputs 00h Page 41 27h R/W Interrupt Enable Enables Interrupts associated with capacitive touch sensor inputs FFh Page 41 28h R/W Repeat Rate Enable Enables repeat rate for all sensor inputs FFh Page 42 2Ah R/W Multiple Touch Configuration Determines the number of simultaneous touches to flag a multiple touch condition 80h Page 42 2015 Microchip Technology Inc. DS00001622B-page 29 CAP1128 2Bh R/W Multiple Touch Pattern Configuration Determines the multiple touch pattern (MTP) configuration 00h Page 43 2Dh R/W Multiple Touch Pattern Determines the pattern or number of sensor inputs used by the MTP circuitry FFh Page 44 2Fh R/W Recalibration Configuration Determines re-calibration timing and sampling window 8Ah Page 44 30h R/W Sensor Input 1 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 1 40h Page 46 31h R/W Sensor Input 2 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 2 40h Page 46 32h R/W Sensor Input 3 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 3 40h Page 46 33h R/W Sensor Input 4 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 4 40h Page 46 34h R/W Sensor Input 5 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 5 40h Page 46 35h R/W Sensor Input 6 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 6 40h Page 46 36h R/W Sensor Input 7 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 7 40h Page 46 37h R/W Sensor Input 8 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 8 40h 38h R/W Sensor Input Noise Threshold Stores controls for selecting the noise threshold for all sensor inputs 01h Page 46 Standby Configuration Registers 40h R/W Standby Channel Controls which sensor inputs are enabled while in standby 00h Page 47 41h R/W Standby Configuration Controls averaging and cycle time while in standby 39h Page 47 42h R/W Standby Sensitivity Controls sensitivity settings used while in standby 02h Page 48 43h R/W Standby Threshold Stores the touch detection threshold for active sensor inputs in standby 40h Page 49 44h R/W Configuration 2 Stores additional configuration controls for the device 40h Page 36 Base Count Registers 50h R Sensor Input 1 Base Count Stores the reference count value for sensor input 1 C8h Page 49 51h R Sensor Input 2 Base Count Stores the reference count value for sensor input 2 C8h Page 49 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page CAP1128 DS00001622B-page 30 2015 Microchip Technology Inc. 52h R Sensor Input 3 Base Count Stores the reference count value for sensor input 3 C8h Page 49 53h R Sensor Input 4 Base Count Stores the reference count value for sensor input 4 C8h Page 49 54h R Sensor Input 5 Base Count Stores the reference count value for sensor input 5 C8h Page 49 55h R Sensor Input 6 Base Count Stores the reference count value for sensor input 6 C8h Page 49 56h R Sensor Input 7 Base Count Stores the reference count value for sensor input 7 C8h Page 49 57h R Sensor Input 8 Base Count Stores the reference count value for sensor input 8 C8h Page 49 LED Controls 71h R/W LED Output Type Controls the output type for the LED outputs 00h Page 50 72h R/W Sensor Input LED Linking Controls linking of sensor inputs to LED channels 00h Page 50 73h R/W LED Polarity Controls the output polarity of LEDs 00h Page 50 74h R/W LED Output Control Controls the output state of the LEDs 00h Page 51 77h R/W Linked LED Transition Control Controls the transition when LEDs are linked to CS channels 00h Page 52 79h R/W LED Mirror Control Controls the mirroring of duty cycles for the LEDs 00h Page 53 81h R/W LED Behavior 1 Controls the behavior and response of LEDs 1 - 2 00h Page 53 84h R/W LED Pulse 1 Period Controls the period of each breathe during a pulse 20h Page 55 85h R/W LED Pulse 2 Period Controls the period of the breathing during breathe and pulse operation 14h Page 56 86h R/W LED Breathe Period Controls the period of an LED breathe operation 5Dh Page 57 88h R/W LED Config Controls LED configuration 04h Page 58 90h R/W LED Pulse 1 Duty Cycle Determines the min and max duty cycle for the pulse operation F0h Page 58 91h R/W LED Pulse 2 Duty Cycle Determines the min and max duty cycle for breathe and pulse operation F0h Page 58 92h R/W LED Breathe Duty Cycle Determines the min and max duty cycle for the breathe operation F0h Page 58 93h R/W LED Direct Duty Cycle Determines the min and max duty cycle for Direct mode LED operation F0h Page 58 94h R/W LED Direct Ramp Rates Determines the rising and falling edge ramp rates of the LEDs 00h Page 59 95h R/W LED Off Delay Determines the off delay for all LED behaviors 00h Page 60 B1h R Sensor Input 1 Calibration Stores the upper 8-bit calibration value for sensor input 1 00h Page 63 B2h R Sensor Input 2 Calibration Stores the upper 8-bit calibration value for sensor input 2 00h Page 63 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page 2015 Microchip Technology Inc. DS00001622B-page 31 CAP1128 During Power-On-Reset (POR), the default values are stored in the registers. A POR is initiated when power is first applied to the part and the voltage on the VDD supply surpasses the POR level as specified in the electrical characteristics. Any reads to undefined registers will return 00h. Writes to undefined registers will not have an effect. When a bit is “set”, this means that the user writes a logic ‘1’ to it. When a bit is “cleared”, this means that the user writes a logic ‘0’ to it. 6.1 Main Control Register The Main Control register controls the primary power state of the device. Bits 7 - 6 - GAIN[1:0] - Controls the gain used by the capacitive touch sensing circuitry. As the gain is increased, the effective sensitivity is likewise increased as a smaller delta capacitance is required to generate the same delta count values. The sensitivity settings may need to be adjusted along with the gain settings such that data overflow does not occur. APPLICATION NOTE: The gain settings apply to both Standby and Active states. B3h R Sensor Input 3 Calibration Stores the upper 8-bit calibration value for sensor input 3 00h Page 63 B4h R Sensor Input 4 Calibration Stores the upper 8-bit calibration value for sensor input 4 00h Page 63 B5h R Sensor Input 5 Calibration Stores the upper 8-bit calibration value for sensor input 5 00h Page 63 B6h R Sensor Input 6 Calibration Stores the upper 8-bit calibration value for sensor input 6 00h Page 63 B7h R Sensor Input 7 Calibration Stores the upper 8-bit calibration value for sensor input 7 00h Page 63 B8h R Sensor Input 8 Calibration Stores the upper 8-bit calibration value for sensor input 8 00h Page 63 B9h R Sensor Input Calibration LSB 1 Stores the 2 LSBs of the calibration value for sensor inputs 1 - 4 00h Page 63 BAh R Sensor Input Calibration LSB 2 Stores the 2 LSBs of the calibration value for sensor inputs 5 - 8 00h Page 63 FDh R Product ID Stores a fixed value that identifies each product 52h Page 63 FEh R Manufacturer ID Stores a fixed value that identifies Microchip 5Dh Page 64 FFh R Revision Stores a fixed value that represents the revision number 83h Page 64 TABLE 6-2: MAIN CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 00h R/W Main Control GAIN[1:0] STBY DSLEEP - - - INT 00h TABLE 6-3: GAIN BIT DECODE GAIN[1:0] Capacitive Touch Sensor Gain 1 0 0 0 1 01 2 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page CAP1128 DS00001622B-page 32 2015 Microchip Technology Inc. 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 6.20). The status registers will not be cleared until read. LEDs that are linked to capacitive touch sensor inputs will remain linked and active. Sensor inputs that are no longer sampled will flag a release and then remain in a non-touched state. LEDs that are manually controlled will be unaffected. • Bit 4 - DSLEEP - Enables Deep Sleep by deactivating all functions. This bit will be cleared when the WAKE pin is driven high. ‘0’ (default) - Sensor input scanning is active and LEDs are functional. • ‘1’ - All sensor input scanning is disabled. All LEDs are driven to their programmed non-actuated state and no PWM operations will be done. The status registers are automatically cleared and the INT bit is cleared. Bit 0 - INT - Indicates that there is an interrupt. When this bit is set, it asserts the ALERT# pin. If a channel detects a touch and its associated interrupt enable bit is not set to a logic ‘1’, no action is taken. This bit is cleared by writing a logic ‘0’ to it. When this bit is cleared, the ALERT# pin will be deasserted and all status registers will be cleared if the condition has been removed. If the WAKE/SPI_MOSI pin is asserted as a result of a touch detected while in Standby, it will likewise be deasserted when this bit is cleared. Note that the WAKE / SPI_MOSI pin is not driven when communicating via the 4-wire SPI protocol. • ‘0’ - No interrupt pending. • ‘1’ - A touch has been detected on one or more channels and the interrupt has been asserted. 6.2 Status Registers All status bits are cleared when the device enters the Deep Sleep (DSLEEP = ‘1’ - see Section 6.1). 6.2.1 GENERAL STATUS - 02H Bit 4 - LED - Indicates that one or more LEDs have finished their programmed activity. This bit is set if any bit in the LED Status register is set. Bit 3 - RESET - Indicates that the device has come out of reset. This bit is set when the device exits a POR state or when the RESET pin has been deasserted and qualified via the RESET pin filter (see Section 5.2). This bit will cause the INT bit to be set and is cleared when the INT bit is cleared. Bit 2 - MULT - Indicates that the device is blocking detected touches due to the Multiple Touch detection circuitry (see Section 6.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 6.15). This bit will cause the INT bit to be set if the MTP_ALERT bit is also set. This bit will not be cleared until the condition that caused it to be set has been removed. Bit 0 - TOUCH - Indicates that a touch was detected. This bit is set if any bit in the Sensor Input Status register is set. 10 4 11 8 TABLE 6-4: STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 02h R General Status - - - LED RESET MULT MTP TOUCH 00h 03h R Sensor Input Status CS8 CS7 CS6 CS5 CS4 CS3 CS2 CS1 00h 04h R LED Status - - - - - - LED2_ DN LED1_ DN 00h TABLE 6-3: GAIN BIT DECODE (CONTINUED) GAIN[1:0] Capacitive Touch Sensor Gain 1 0 2015 Microchip Technology Inc. DS00001622B-page 33 CAP1128 6.2.2 SENSOR INPUT STATUS - 03H The Sensor Input Status Register stores status bits that indicate a touch has been detected. A value of ‘0’ in any bit indicates that no touch has been detected. A value of ‘1’ in any bit indicates that a touch has been detected. All bits are cleared when the INT bit is cleared and if a touch on the respective capacitive touch sensor input is no longer present. If a touch is still detected, the bits will not be cleared (but this will not cause the interrupt to be asserted - see Section 6.6). Bit 7 - CS8 - Indicates that a touch was detected on Sensor Input 8. Bit 6 - CS7 - Indicates that a touch was detected on Sensor Input 7. Bit 5 - CS6 - Indicates that a touch was detected on Sensor Input 6. Bit 4 - CS5 - Indicates that a touch was detected on Sensor Input 5. Bit 3 - CS4 - Indicates that a touch was detected on Sensor Input 4. Bit 2 - CS3 - Indicates that a touch was detected on Sensor Input 3. Bit 1 - CS2 - Indicates that a touch was detected on Sensor Input 2. This sensor input can be linked to LED2. Bit 0 - CS1 - Indicates that a touch was detected on Sensor Input 1. This sensor input can be linked to LED1. 6.2.3 LED STATUS - 04H The LED Status Registers indicate when an LED has completed its configured behavior (see Section 6.31, "LED Behavior Register") after being actuated by the host (see Section 6.28, "LED Output Control Register"). These bits are ignored when the LED is linked to a capacitive sensor input. All LED Status bits are cleared when the INT bit is cleared. 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. 6.3 Noise Flag Status Registers The Noise Flag Status registers store status bits that are generated from the analog block if the detected noise is above the operating region of the analog detector or the RF noise detector. These bits indicate that the most recently received data from the sensor input is invalid and should not be used for touch detection. So long as the bit is set for a particular channel, the delta count value is reset to 00h and thus no touch is detected. These bits are not sticky and will be cleared automatically if the analog block does not report a noise error. APPLICATION NOTE: If the MTP detection circuitry is enabled, these bits count as sensor inputs above the MTP threshold (see Section 5.5.4, "Multiple Touch Pattern Detection") even if the corresponding delta count is not. If the corresponding delta count also exceeds the MTP threshold, it is not counted twice. APPLICATION NOTE: Regardless of the state of the Noise Status bits, if low frequency noise is detected on a sensor input, that sample will be discarded unless the DIS_ANA_NOISE bit is set. As well, if RF noise is detected on a sensor input, that sample will be discarded unless the DIS_RF_NOISE bit is set. TABLE 6-5: NOISE FLAG STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 0Ah R Noise Flag Status CS8_ NOISE CS7_ NOISE CS6_ NOISE CS5_ NOISE CS4_ NOISE CS3_ NOISE CS2_ NOISE CS1_ NOISE 00h CAP1128 DS00001622B-page 34 2015 Microchip Technology Inc. 6.4 Sensor Input Delta Count Registers 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. The count value represents a change in input due to the capacitance associated with a touch on one of the sensor inputs and is referenced to a calibrated base “Not Touched” count value. The delta is an instantaneous change and is updated once per sensor input per sensing cycle (see Section 5.5.1, "Sensing Cycle"). The value presented is a standard 2’s complement number. In addition, the value is capped at a value of 7Fh. A reading of 7Fh indicates that the sensitivity settings are too high and should be adjusted accordingly (see Section 6.5). The value is also capped at a negative value of 80h for negative delta counts which may result upon a release. 6.5 Sensitivity Control Register The Sensitivity Control register controls the sensitivity of a touch detection. Bits 6-4 DELTA_SENSE[2:0] - Controls the sensitivity of a touch detection. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the more sensitive settings, touches are detected for a smaller delta capacitance corresponding to a “lighter” touch. These settings are more sensitive to noise, however, and a noisy environment may flag more false touches with higher sensitivity levels. APPLICATION NOTE: A value of 128x is the most sensitive setting available. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely, a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). TABLE 6-6: SENSOR INPUT DELTA COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 10h R Sensor Input 1 Delta Count Sign 64 32 16 8 4 2 1 00h 11h R Sensor Input 2 Delta Count Sign 64 32 16 8 4 2 1 00h 12h R Sensor Input 3 Delta Count Sign 64 32 16 8 4 2 1 00h 13h R Sensor Input 4 Delta Count Sign 64 32 16 8 4 2 1 00h 14h R Sensor Input 5 Delta Count Sign 64 32 16 8 4 2 1 00h 15h R Sensor Input 6 Delta Count Sign 64 32 16 8 4 2 1 00h 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 TABLE 6-7: SENSITIVITY CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 1Fh R/W Sensitivity Control - DELTA_SENSE[2:0] BASE_SHIFT[3:0] 2Fh 2015 Microchip Technology Inc. DS00001622B-page 35 CAP1128 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. The scale factor represents the multiplier to the bit-weighting presented in these register descriptions. APPLICATION NOTE: The BASE_SHIFT[3:0] bits normally do not need to be updated. These settings will not affect touch detection or sensitivity. These bits are sometimes helpful in analyzing the Cap Sensing board performance and stability. TABLE 6-8: DELTA_SENSE BIT DECODE DELTA_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-9: BASE_SHIFT BIT DECODE BASE_SHIFT[3:0] Data Scaling Factor 32 1 0 0 0 0 0 1x 0 0 0 1 2x 0 0 1 0 4x 0 0 1 1 8x 0 1 0 0 16x 0 1 0 1 32x 0 1 1 0 64x 0 1 1 1 128x 1 0 0 0 256x All others 256x (default = 1111b) CAP1128 DS00001622B-page 36 2015 Microchip Technology Inc. 6.6 Configuration Registers The Configuration registers control general global functionality that affects the entire device. 6.6.1 CONFIGURATION - 20H Bit 7 - TIMEOUT - Enables the timeout and idle functionality of the SMBus protocol. • ‘0’ (default for Functional Revision C) - The SMBus timeout and idle functionality are disabled. The SMBus interface will not time out if the clock line is held low. Likewise, it will not reset if both the data and clock lines are held high for longer than 200us. This is used for I2C compliance. • ‘1’ (default for Functional Revision B) - The SMBus timeout and idle functionality are enabled. The SMBus interface will time out if the clock line is held low for longer than 30ms. Likewise, it will reset if both the data and clock lines are held high for longer than 200us. Bit 6 - WAKE_CFG - Configures the operation of the WAKE pin. • ‘0’ (default) - The WAKE pin is not asserted when a touch is detected while the device is in Standby. It will still be used to wake the device from Deep Sleep when driven high. • ‘1’ - The WAKE pin will be asserted high when a touch is detected while the device is in Standby. It will also be used to wake the device from Deep Sleep when driven high. Bit 5 - DIS_DIG_NOISE - Determines whether the digital noise threshold (see Section 6.19, "Sensor Input Noise Threshold Register") is used by the device. Setting this bit disables the feature. • ‘0’ - The digital noise threshold is used. If a delta count value exceeds the noise threshold but does not exceed the touch threshold, the sample is discarded and not used for the automatic re-calibration routine. • ‘1’ (default) - The noise threshold is disabled. Any delta count that is less than the touch threshold is used for the automatic re-calibration routine. Bit 4 - DIS_ANA_NOISE - Determines whether the analog noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If low frequency noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if low frequency noise is detected. Bit 3 - MAX_DUR_EN - Determines whether the maximum duration recalibration is enabled. • ‘0’ (default) - The maximum duration recalibration functionality is disabled. A touch may be held indefinitely and no re-calibration will be performed on any sensor input. • ‘1’ - The maximum duration recalibration functionality is enabled. If a touch is held for longer than the MAX_DUR bit settings, then the re-calibration routine will be restarted (see Section 6.8). 6.6.2 CONFIGURATION 2 - 44H Bit 7 - INV_LINK_TRAN - Determines the behavior of the Linked LED Transition controls (see Section 6.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. • ‘0’ - The ALERT# pin is active high and push-pull. • ‘1’ (default) - The ALERT# pin is active low and open drain. TABLE 6-10: CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 20h R/W Configuration TIMEOUT WAKE_ CFG DIS_ DIG_ NOISE DIS_ ANA_ NOISE MAX_ DUR_EN - -- A0h (Rev B) 20h (rev C) 44h R/W Configuration 2 INV_LINK_ TRAN ALT_ POL BLK_PWR_ CTRL BLK_POL_ MIR SHOW_ RF_ NOISE DIS_ RF_ NOISE - INT_ REL_n 40h 2015 Microchip Technology Inc. DS00001622B-page 37 CAP1128 Bit 5 - BLK_PWR_CTRL - Determines whether the device will reduce power consumption while waiting between conversion time completion and the end of the polling cycle. • ‘0’ (default) - The device will always power down as much as possible during the time between the end of the last conversion and the end of the polling cycle. • ‘1’ - The device will not power down the Cap Sensor during the time between the end of the last conversion and the end of the polling cycle. Bit 4 - BLK_POL_MIR - Determines whether the LED Mirror Control register bits are linked to the LED Polarity bits. Setting this bit blocks the normal behavior which is to automatically set and clear the LED Mirror Control bits when the LED Polarity bits are set or cleared. • ‘0’ (default) - When the LED Polarity controls are set, the corresponding LED Mirror control is automatically set. Likewise, when the LED Polarity controls are cleared, the corresponding LED Mirror control is also cleared. • ‘1’ - When the LED Polarity controls are set, the corresponding LED Mirror control is not automatically set. Bit 3 - SHOW_RF_NOISE - Determines whether the Noise Status bits will show RF Noise as the only input source. • ‘0’ (default) - The Noise Status registers will show both RF noise and low frequency EMI noise if either is detected on a capacitive touch sensor input. • ‘1’ - The Noise Status registers will only show RF noise if it is detected on a capacitive touch sensor input. EMI noise will still be detected and touches will be blocked normally; however, the status bits will not be updated. Bit 2 - DIS_RF_NOISE - Determines whether the RF noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If RF noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if RF noise is detected. Bit 0 - INT_REL_n - Controls the interrupt behavior when a release is detected on a button. • ‘0’ (default) - An interrupt is generated when a press is detected and again when a release is detected and at the repeat rate (if enabled - see Section 6.13). • ‘1’ - An interrupt is generated when a press is detected and at the repeat rate but not when a release is detected. 6.7 Sensor Input Enable Registers 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. Bit 7 - CS8_EN - Enables the CS8 input to be included during the sampling cycle. • ‘0’ - The CS8 input is not included in the sampling cycle. • ‘1’ (default) - The CS8 input is included in the sampling cycle. Bit 6 - CS7_EN - Enables the CS7 input to be included during the sampling cycle. Bit 5 - CS6_EN - Enables the CS6 input to be included during the sampling cycle. Bit 4 - CS5_EN - Enables the CS5 input to be included during the sampling cycle. Bit 3 - CS4_EN - Enables the CS4 input to be included during the sampling cycle. Bit 2 - CS3_EN - Enables the CS3 input to be included during the sampling cycle. Bit 1 - CS2_EN - Enables the CS2 input to be included during the sampling cycle. Bit 0 - CS1_EN - Enables the CS1 input to be included during the sampling cycle. TABLE 6-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 CAP1128 DS00001622B-page 38 2015 Microchip Technology Inc. 6.8 Sensor Input Configuration Register The Sensor Input Configuration Register controls timings associated with the Capacitive sensor inputs 1 - 8. Bits 7 - 4 - MAX_DUR[3:0] - (default 1010b) - Determines the maximum time that a sensor pad is allowed to be touched until the capacitive touch sensor input is recalibrated, as shown in Table 6-13. Bits 3 - 0 - RPT_RATE[3:0] - (default 0100b) Determines the time duration between interrupt assertions when auto repeat is enabled. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-14. TABLE 6-12: SENSOR INPUT CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 22h R/W Sensor Input Configuration MAX_DUR[3:0] RPT_RATE[3:0] A4h TABLE 6-13: MAX_DUR BIT DECODE MAX_DUR[3:0] Time Before Recalibration 32 1 0 0 0 0 0 560ms 0 0 0 1 840ms 0 0 1 0 1120ms 0 0 1 1 1400ms 0 1 0 0 1680ms 0 1 0 1 2240ms 0 1 1 0 2800ms 1 1 1 3360ms 1 0 0 0 3920ms 1 0 0 1 4480ms 1 0 1 0 5600ms (default) 1 0 1 1 6720ms 1 1 0 0 7840ms 1 1 0 1 8906ms 1 1 1 0 10080ms 1 1 1 1 11200ms TABLE 6-14: RPT_RATE BIT DECODE RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms (default) 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms 1 0 0 0 315ms 1 0 0 1 350ms 1 0 1 0 385ms 2015 Microchip Technology Inc. DS00001622B-page 39 CAP1128 6.9 Sensor Input Configuration 2 Register Bits 3 - 0 - M_PRESS[3:0] - (default 0111b) - Determines the minimum amount of time that sensor inputs configured to use auto repeat must detect a sensor pad touch to detect a “press and hold” event. If the sensor input detects a touch for longer than the M_PRESS[3:0] settings, a “press and hold” event is detected. If a sensor input detects a touch for less than or equal to the M_PRESS[3:0] settings, a touch event is detected. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-16. 6.10 Averaging and Sampling Configuration Register 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 TABLE 6-15: SENSOR INPUT CONFIGURATION 2 REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 23h R/W Sensor Input Configuration 2 - - - - M_PRESS[3:0] 07h TABLE 6-16: M_PRESS BIT DECODE M_PRESS[3:0] M_PRESS SETTINGS 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms (default) 1 0 0 0 315ms 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 TABLE 6-17: AVERAGING AND SAMPLING CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 24h R/W Averaging and Sampling Config AVG[2:0] SAMP_TIME[1:0] CYCLE_TIME [1:0] 39h TABLE 6-14: RPT_RATE BIT DECODE (CONTINUED) RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 CAP1128 DS00001622B-page 40 2015 Microchip Technology Inc. The Averaging and Sampling Configuration register controls the number of samples taken and the total sensor input cycle time for all active sensor inputs while the device is functioning in Active state. Bits 6 - 4 - AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-18. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. For example, if CS1, CS2, and CS3 are sampled during the sensor cycle, and the AVG[2:0] bits are set to take 4 samples per channel, then the full sensor cycle will be: CS1, CS1, CS1, CS1, CS2, CS2, CS2, CS2, CS3, CS3, CS3, CS3. Bits 3 - 2 - SAMP_TIME[1:0] - Determines the time to take a single sample as shown in Table 6-19. Bits 1 - 0 - CYCLE_TIME[1:0] - Determines the overall cycle time for all measured channels during normal operation as shown in Table 6-20. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, then the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. TABLE 6-18: AVG BIT DECODE AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-19: SAMP_TIME BIT DECODE SAMP_TIME[1:0] Sample Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-20: CYCLE_TIME BIT DECODE CYCLE_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms 2015 Microchip Technology Inc. DS00001622B-page 41 CAP1128 6.11 Calibration Activate Register The Calibration Activate register forces the respective sensor inputs to be re-calibrated affecting both the analog and digital blocks. During the re-calibration routine, the sensor inputs will not detect a press for up to 600ms and the Sensor Input Base Count register values will be invalid. During this time, any press on the corresponding sensor pads will invalidate the re-calibration. When finished, the CALX[9:0] bits will be updated (see Section 6.39). When the corresponding bit is set, the device will perform the calibration and the bit will be automatically cleared once the re-calibration routine has finished. Bit 7 - CS8_CAL - When set, the CS8 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 6 - CS7_CAL - When set, the CS7 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 5 - CS6_CAL - When set, the CS6 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 4 - CS5_CAL - When set, the CS5 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 3 - CS4_CAL - When set, the CS4 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 2 - CS3_CAL - When set, the CS3 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 1 - CS2_CAL - When set, the CS2 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 0 - CS1_CAL - When set, the CS1 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. 6.12 Interrupt Enable Register The Interrupt Enable register determines whether a sensor pad touch or release (if enabled) causes the interrupt pin to be asserted. Bit 7 - CS8_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS8 (associated with the CS8 status bit). • ‘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). Bit 5 - CS6_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS6 (associated with the CS6 status bit). Bit 4 - CS5_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS5 (associated with the CS5 status bit). Bit 3 - CS4_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS4 (associated with the CS4 status bit). TABLE 6-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 TABLE 6-22: INTERRUPT ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 27h R/W Interrupt Enable CS8_ INT_EN CS7_ INT_EN CS6_ INT_EN CS5_ INT_EN CS4_ INT_EN CS3_ INT_EN CS2_ INT_EN CS1_ INT_EN FFh CAP1128 DS00001622B-page 42 2015 Microchip Technology Inc. Bit 2 - CS3_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS3 (associated with the CS3 status bit). Bit 1 - CS2_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS2 (associated with the CS2 status bit). Bit 0 - CS1_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS1 (associated with the CS1 status bit). 6.13 Repeat Rate Enable Register The Repeat Rate Enable register enables the repeat rate of the sensor inputs as described in Section 5.6.1. Bit 7 - CS8_RPT_EN - Enables the repeat rate for capacitive touch sensor input 8. • ‘0’ - The repeat rate for CS8 is disabled. It will only generate an interrupt when a touch is detected and when a release is detected (if enabled) no matter how long the touch is held for. • ‘1’ (default) - The repeat rate for CS8 is enabled. In the case of a “touch” event, it will generate an interrupt when a touch is detected and a release is detected (as determined by the INT_REL_n bit - see Section 6.6). In the case of a “press and hold” event, it will generate an interrupt when a touch is detected and at the repeat rate so long as the touch is held. Bit 6 - CS7_RPT_EN - Enables the repeat rate for capacitive touch sensor input 7. Bit 5 - CS6_RPT_EN - Enables the repeat rate for capacitive touch sensor input 6. Bit 4 - CS5_RPT_EN - Enables the repeat rate for capacitive touch sensor input 5. Bit 3 - CS4_RPT_EN - Enables the repeat rate for capacitive touch sensor input 4. Bit 2 - CS3_RPT_EN - Enables the repeat rate for capacitive touch sensor input 3. Bit 1 - CS2_RPT_EN - Enables the repeat rate for capacitive touch sensor input 2. Bit 0 - CS1_RPT_EN - Enables the repeat rate for capacitive touch sensor input 1. 6.14 Multiple Touch Configuration Register The Multiple Touch Configuration register controls the settings for the multiple touch detection circuitry. These settings determine the number of simultaneous buttons that may be pressed before additional buttons are blocked and the MULT status bit is set. Bit 7 - MULT_BLK_EN - Enables the multiple button blocking circuitry. • ‘0’ - The multiple touch circuitry is disabled. The device will not block multiple touches. • ‘1’ (default) - The multiple touch circuitry is enabled. The device will flag the number of touches equal to programmed multiple touch threshold and block all others. It will remember which sensor inputs are valid and block all others until that sensor pad has been released. Once a sensor pad has been released, the N detected touches (determined via the cycle order of CS1 - CS8) will be flagged and all others blocked. Bits 3 - 2 - B_MULT_T[1:0] - Determines the number of simultaneous touches on all sensor pads before a Multiple Touch Event is detected and sensor inputs are blocked. The bit decode is given by Table 6-25. TABLE 6-23: REPEAT RATE ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 28h R/W Repeat Rate Enable CS8_ RPT_EN CS7_ RPT_EN CS6_ RPT_EN CS5_ RPT_EN CS4_ RPT_EN CS3_ RPT_EN CS2_ RPT_EN CS1_ RPT_EN FFh TABLE 6-24: MULTIPLE TOUCH CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Ah R/W Multiple Touch Config MULT_ BLK_ EN - - - B_MULT_T[1:0] - - 80h 2015 Microchip Technology Inc. DS00001622B-page 43 CAP1128 6.15 Multiple Touch Pattern Configuration Register The Multiple Touch Pattern Configuration register controls the settings for the multiple touch pattern detection circuitry. This circuitry works like the multiple touch detection circuitry with the following differences: 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. The MTP detection circuitry either will detect a specific pattern of sensor inputs as determined by the Multiple Touch Pattern register settings or it will use the Multiple Touch Pattern register settings to determine a minimum number of sensor inputs that will cause the MTP circuitry to flag an event. When using pattern recognition mode, if all of the sensor inputs set by the Multiple Touch Pattern register have a delta count greater than the MTP threshold or have their corresponding Noise Flag Status bits set, the MTP bit will be set. When using the absolute number mode, if the number of sensor inputs with thresholds above the MTP threshold or with Noise Flag Status bits set is equal to or greater than this number, the MTP bit will be set. 3. When an MTP event occurs, all touches are blocked and an interrupt is generated. 4. All sensor inputs will remain blocked so long as the requisite number of sensor inputs are above the MTP threshold or have Noise Flag Status bits set. Once this condition is removed, touch detection will be restored. Note that the MTP status bit is only cleared by writing a ‘0’ to the INT bit once the condition has been removed. Bit 7 - MTP_EN - Enables the multiple touch pattern detection circuitry. • ‘0’ (default) - The MTP detection circuitry is disabled. • ‘1’ - The MTP detection circuitry is enabled. Bits 3-2 - MTP_TH[1:0] - Determine the MTP threshold, as shown in Table 6-27. This threshold is a percentage of sensor input threshold (see Section 6.18, "Sensor Input Threshold Registers") when the device is in the Fully Active state or of the standby threshold (see Section 6.23, "Standby Threshold Register") when the device is in the Standby state. Bit 1 - COMP_PTRN - Determines whether the MTP detection circuitry will use the Multiple Touch Pattern register as a specific pattern of sensor inputs or as an absolute number of sensor inputs. • ‘0’ (default) - The MTP detection circuitry will use the Multiple Touch Pattern register bit settings as an absolute minimum number of sensor inputs that must be above the threshold or have Noise Flag Status bits set. The number will be equal to the number of bits set in the register. TABLE 6-25: B_MULT_T BIT DECODE B_MULT_T[1:0] Number of Simultaneous Touches 1 0 0 0 1 (default) 01 2 10 3 11 4 TABLE 6-26: MULTIPLE TOUCH PATTERN CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Bh R/W Multiple Touch Pattern Config MTP_ EN - - MTP_TH[1:0] COMP_ PTRN MTP_ ALERT 00h TABLE 6-27: MTP_TH BIT DECODE MTP_TH[1:0] Threshold Divide Setting 1 0 0 0 12.5% (default) 0 1 25% 1 0 37.5% 1 1 100% CAP1128 DS00001622B-page 44 2015 Microchip Technology Inc. • ‘1’ - The MTP detection circuitry will use pattern recognition. Each bit set in the Multiple Touch Pattern register indicates a specific sensor input that must have a delta count greater than the MTP threshold or have a Noise Flag Status bit set. If the criteria are met, the MTP status bit will be set. Bit 0 - MTP_ALERT - Enables an interrupt if an MTP event occurs. In either condition, the MTP status bit will be set. • ‘0’ (default) - If an MTP event occurs, the ALERT# pin is not asserted. • ‘1’ - If an MTP event occurs, the ALERT# pin will be asserted. 6.16 Multiple Touch Pattern Register The Multiple Touch Pattern register acts as a pattern to identify an expected sensor input profile for diagnostics or other significant events. There are two methods for how the Multiple Touch Pattern register is used: as specific sensor inputs or number of sensor input that must exceed the MTP threshold or have Noise Flag Status bits set. Which method is used is based on the COMP_PTRN bit (see Section 6.15). The methods are described below. 1. Specific Sensor Inputs: If, during a single polling cycle, the specific sensor inputs above the MTP threshold or with Noise Flag Status bits set match those bits set in the Multiple Touch Pattern register, an MTP event is flagged. 2. Number of Sensor Inputs: If, during a single polling cycle, the number of sensor inputs with a delta count above the MTP threshold or with Noise Flag Status bits set is equal to or greater than the number of pattern bits set, an MTP event is flagged. Bit 7 - CS8_PTRN - Determines whether CS8 is considered as part of the Multiple Touch Pattern. • ‘0’ - CS8 is not considered a part of the pattern. • ‘1’ - CS8 is considered a part of the pattern, or the absolute number of sensor inputs that must have a delta count greater than the MTP threshold or have the Noise Flag Status bit set is increased by 1. Bit 6 - CS7_PTRN - Determines whether CS7 is considered as part of the Multiple Touch Pattern. Bit 5 - CS6_PTRN - Determines whether CS6 is considered as part of the Multiple Touch Pattern. Bit 4 - CS5_PTRN - Determines whether CS5 is considered as part of the Multiple Touch Pattern. Bit 3 - CS4_PTRN - Determines whether CS4 is considered as part of the Multiple Touch Pattern. Bit 2 - CS3_PTRN - Determines whether CS3 is considered as part of the Multiple Touch Pattern. Bit 1 - CS2_PTRN - Determines whether CS2 is considered as part of the Multiple Touch Pattern. Bit 0 - CS1_PTRN - Determines whether CS1 is considered as part of the Multiple Touch Pattern. 6.17 Recalibration Configuration Register The Recalibration Configuration register controls the automatic re-calibration routine settings as well as advanced controls to program the Sensor Input Threshold register settings. 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). The individual Sensor TABLE 6-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 TABLE 6-29: RECALIBRATION CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Fh R/W Recalibration Configuration BUT_ LD_TH NO_ CLR_ INTD NO_ CLR_ NEG NEG_DELTA_ CNT[1:0] CAL_CFG[2:0] 8Ah 2015 Microchip Technology Inc. DS00001622B-page 45 CAP1128 Input X Threshold registers (Sensor Input 2 Threshold through Sensor Input 8 Threshold) can be individually updated at any time. Bit 6 - NO_CLR_INTD - Controls whether the accumulation of intermediate data is cleared if the noise status bit is set. • ‘0’ (default) - The accumulation of intermediate data is cleared if the noise status bit is set. • ‘1’ - The accumulation of intermediate data is not cleared if the noise status bit is set. APPLICATION NOTE: Bits 5 and 6 should both be set to the same value. Either both should be set to ‘0’ or both should be set to ‘1’. Bit 5 - NO_CLR_NEG - Controls whether the consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘0’ (default) - The consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘1’ - The consecutive negative delta counts counter is not cleared if the noise status bit is set. Bits 4 - 3 - NEG_DELTA_CNT[1:0] - Determines the number of negative delta counts necessary to trigger a digital recalibration as shown in Table 6-30. Bits 2 - 0 - CAL_CFG[2:0] - Determines the update time and number of samples of the automatic re-calibration routine. The settings apply to all sensor inputs universally (though individual sensor inputs can be configured to support re-calibration - see Section 6.11). Note 6-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 6-2 Update Time refers to the amount of time (in polling cycle periods) that elapses before the Base Count is updated. The time will depend upon the number of channels active, the averaging setting, and the programmed cycle time. TABLE 6-30: NEG_DELTA_CNT BIT DECODE NEG_DELTA_CNT[1:0] Number of Consecutive Negative Delta Count Values 1 0 00 8 0 1 16 (default) 1 0 32 1 1 None (disabled) TABLE 6-31: CAL_CFG BIT DECODE CAL_CFG[2:0] Recalibration Samples (see Note 6-1) Update Time (see Note 6-2) 210 0 0 0 16 16 0 0 1 32 32 0 1 0 64 64 (default) 0 1 1 128 128 1 0 0 256 256 1 0 1 256 1024 1 1 0 256 2048 1 1 1 256 4096 CAP1128 DS00001622B-page 46 2015 Microchip Technology Inc. 6.18 Sensor Input Threshold Registers The Sensor Input Threshold registers store the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. When the BUT_LD_TH bit is set (see Section 6.17 - bit 7), writing data to the Sensor Input 1 Threshold register will update all of the sensor input threshold registers (31h - 37h inclusive). 6.19 Sensor Input Noise Threshold Register The Sensor Input Noise Threshold register controls the value of a secondary internal threshold to detect noise and improve the automatic recalibration routine. If a capacitive touch sensor input exceeds the Sensor Input Noise Threshold but does not exceed the sensor input threshold, it is determined to be caused by a noise spike. That sample is not used by the automatic re-calibration routine. This feature can be disabled by setting the DIS_DIG_NOISE bit. Bits 1-0 - CS1_BN_TH[1:0] - Controls the noise threshold for all capacitive touch sensor inputs, as shown in Table 6-34. The threshold is proportional to the threshold setting. TABLE 6-32: SENSOR INPUT THRESHOLD REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 30h R/W Sensor Input 1 Threshold - 64 32 16 8 4 2 1 40h 31h R/W Sensor Input 2 Threshold - 64 32 16 8 4 2 1 40h 32h R/W Sensor Input 3 Threshold - 64 32 16 8 4 2 1 40h 33h R/W Sensor Input 4 Threshold - 64 32 16 8 4 2 1 40h 34h R/W Sensor Input 5 Threshold - 64 32 16 8 4 2 1 40h 35h R/W Sensor Input 6 Threshold - 64 32 16 8 4 2 1 40h 36h R/W Sensor Input 7 Threshold - 64 32 16 8 4 2 1 40h 37h R/W Sensor Input 8 Threshold - 64 32 16 8 4 2 1 40h TABLE 6-33: SENSOR INPUT NOISE THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 38h R/W Sensor Input Noise Threshold CS_BN_TH [1:0] 01h TABLE 6-34: CSX_BN_TH BIT DECODE CS_BN_TH[1:0] Percent Threshold Setting 1 0 0 0 25% 0 1 37.5% (default) 1 0 50% 1 1 62.5% 2015 Microchip Technology Inc. DS00001622B-page 47 CAP1128 6.20 Standby Channel Register The Standby Channel register controls which (if any) capacitive touch sensor inputs are active during Standby. Bit 7 - CS8_STBY - Controls whether the CS8 channel is active in Standby. • ‘0’ (default) - The CS8 channel not be sampled during Standby. • ‘1’ - The CS8 channel will be sampled during Standby. It will use the Standby threshold setting, and the standby averaging and sensitivity settings. Bit 6 - CS7_STBY - Controls whether the CS7 channel is active in Standby. Bit 5 - CS6_STBY - Controls whether the CS6 channel is active in Standby. Bit 4 - CS5_STBY - Controls whether the CS5 channel is active in Standby. 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. 6.21 Standby Configuration Register The Standby Configuration register controls averaging and cycle time for those sensor inputs that are active in Standby. This register is useful for detecting proximity on a small number of sensor inputs as it allows the user to change averaging and sample times on a limited number of sensor inputs and still maintain normal functionality in the fully active state. Bit 7 - AVG_SUM - Determines whether the active sensor inputs will average the programmed number of samples or whether they will accumulate for the programmed number of samples. • ‘0’ - (default) - The active sensor input delta count values will be based on the average of the programmed number of samples when compared against the threshold. • ‘1’ - The active sensor input delta count values will be based on the summation of the programmed number of samples when compared against the threshold. This bit should only be set when performing proximity detection as a physical touch will overflow the delta count registers and may result in false readings. Bits 6 - 4 - STBY_AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-37. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. TABLE 6-35: STANDBY CHANNEL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 40h R/W Standby Channel CS8_ STBY CS7_ STBY CS6_ STBY CS5_ STBY CS4_ STBY CS3_ STBY CS2_ STBY CS1_ STBY 00h TABLE 6-36: STANDBY CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 41h R/W Standby Configuration AVG_ SUM STBY_AVG[2:0] STBY_SAMP_ TIME[1:0] STBY_CY_TIME [1:0] 39h TABLE 6-37: STBY_AVG BIT DECODE STBY_AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 CAP1128 DS00001622B-page 48 2015 Microchip Technology Inc. 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 6-38. Bits 1 - 0 - STBY_CY_TIME[2:0] - Determines the overall cycle time for all measured channels during standby operation as shown in Table 6-39. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The STBY_AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. 6.22 Standby Sensitivity Register The Standby Sensitivity register controls the sensitivity for sensor inputs that are active in Standby. Bits 2 - 0 - STBY_SENSE[2:0] - Controls the sensitivity for sensor inputs that are active in Standby. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the 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. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-38: STBY_SAMP_TIME BIT DECODE STBY_SAMP_TIME[1:0] Sampling Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-39: STBY_CY_TIME BIT DECODE STBY_CY_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms TABLE 6-40: STANDBY SENSITIVITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 42h R/W Standby Sensitivity - - - - - STBY_SENSE[2:0] 02h TABLE 6-37: STBY_AVG BIT DECODE (CONTINUED) STBY_AVG[2:0] Number of Samples Taken per Measurement 2 10 2015 Microchip Technology Inc. DS00001622B-page 49 CAP1128 of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 6.23 Standby Threshold Register The Standby Threshold register stores the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. 6.24 Sensor Input Base Count Registers The Sensor Input Base Count registers store the calibrated “Not Touched” input value from the capacitive touch sensor inputs. These registers are periodically updated by the re-calibration routine. TABLE 6-41: STBY_SENSE BIT DECODE STBY_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-42: STANDBY THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 43h R/W Standby Threshold - 64 32 16 8 4 2 1 40h TABLE 6-43: SENSOR INPUT BASE COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 50h R Sensor Input 1 Base Count 128 64 32 16 8 4 2 1 C8h 51h R Sensor Input 2 Base Count 128 64 32 16 8 4 2 1 C8h 52h R Sensor Input 3 Base Count 128 64 32 16 8 4 2 1 C8h 53h R Sensor Input 4 Base Count 128 64 32 16 8 4 2 1 C8h 54h R Sensor Input 5 Base Count 128 64 32 16 8 4 2 1 C8h 55h R Sensor Input 6 Base Count 128 64 32 16 8 4 2 1 C8h 56h R Sensor Input 7 Base Count 128 64 32 16 8 4 2 1 C8h 57h R Sensor Input 8 Base Count 128 64 32 16 8 4 2 1 C8h CAP1128 DS00001622B-page 50 2015 Microchip Technology Inc. The routine uses an internal adder to add the current count value for each reading to the sum of the previous readings until sample size has been reached. At this point, the upper 16 bits are taken and used as the Sensor Input Base Count. The internal adder is then reset and the re-calibration routine continues. The data presented is determined by the BASE_SHIFT[3:0] bits (see Section 6.5). 6.25 LED Output Type Register The LED Output Type register controls the type of output for the LED pins. Each pin is controlled by a single bit. Refer to application note 21.4 CAP1128Family LED Configuration Options for more information about implementing LEDs. Bit 1 - LED2_OT - Determines the output type of the LED2 pin. • ‘0’ (default) - The LED2 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. • ‘1’ - The LED2 pin is a push-pull output. When driving a logic ‘1’, the pin is driven high. When driving a logic ‘0’, the pin is driven low. Bit 0 - LED1_OT - Determines the output type of the LED1 pin. 6.26 Sensor Input LED Linking Register The Sensor Input LED Linking register controls whether a capacitive touch sensor input is linked to an LED output. If the corresponding bit is set, then the appropriate LED output will change states defined by the LED Behavior controls (see Section 6.31) in response to the capacitive touch sensor input. 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. • ‘0’ (default) - The LED 2 output is not associated with the CS2 input. If a touch is detected on the CS2 input, the LED will not automatically be actuated. The LED is enabled and controlled via the LED Output Control register (see Section 6.28) and the LED Behavior registers (see Section 6.31). • ‘1’ - The LED 2 output is associated with the CS2 input. If a touch is detected on the CS2 input, the LED will be actuated and behave as defined in Table 6-52. Bit 0 - CS1_LED1 - Links the LED1 output to a detected touch on the CS1 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. 6.27 LED Polarity Register The LED Polarity register controls the logical polarity of the LED outputs. When these bits are set or cleared, the corresponding LED Mirror controls are also set or cleared (unless the BLK_POL_MIR bit is set - see Section 6.6, "Configuration Registers"). Table 6-48, "LED Polarity Behavior" shows the interaction between the polarity controls, output controls, and relative brightness. TABLE 6-44: LED OUTPUT TYPE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 71h R/W LED Output Type ----- - LED2_ OT LED1_ OT 00h TABLE 6-45: SENSOR INPUT LED LINKING REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 72h R/W Sensor Input LED Linking - - - - - - CS2_ LED2 CS1_ LED1 00h TABLE 6-46: LED POLARITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 73h R/W LED Polarity - - - - - - LED2_ POL LED1_ POL 00h 2015 Microchip Technology Inc. DS00001622B-page 51 CAP1128 APPLICATION NOTE: The polarity controls determine the final LED pin drive. A touch on a linked capacitive touch sensor input is treated in the same way as the LED Output Control bit being set to a logic ‘1’. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’ then the LED will be on and that the CAP1128 LED pin is sinking the LED current. Conversely, if the LED pin is driven to a logic ‘1’, the LED will be off and there is no current flow. See Figure 5-1, "System Diagram for CAP1128". APPLICATION NOTE: This application note applies when the LED polarity is inverted (LEDx_POL = ‘0’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘0’ state in. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven low (i.e. maximum % of time that the LED is on) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven low (i.e. minimum % of time that the LED is on). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at the minimum duty cycle setting. Breathe operations will ramp the duty cycle from the minimum duty cycle to the maximum duty cycle. APPLICATION NOTE: This application note applies when the LED polarity is non-inverted (LEDx_POL = ‘1’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘1’ state. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven high (i.e. maximum % of time that the LED is off) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven high (i.e. minimum % of time that the LED is off). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at 100 minus the minimum duty cycle setting. Breathe operations will ramp the duty cycle from 100 minus the minimum duty cycle to 100 minus the maximum duty cycle. APPLICATION NOTE: The LED Mirror controls (see Section 6.30, "LED Mirror Control Register") work with the polarity controls with respect to LED brightness but will not have a direct effect on the output pin drive. Bit 1 - LED2_POL - Determines the polarity of the LED2 output. • ‘0’ (default) - The LED2 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 LED2 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. Bit 0 - LED1_POL - Determines the polarity of the LED1 output. 6.28 LED Output Control Register The LED Output Control Register controls the output state of the LED pins that are not linked to sensor inputs. The LED Polarity Control Register will determine the non actuated state of the LED pins. The actuated LED behavior is determined by the LED behavior controls (see Section 6.31, "LED Behavior Register"). TABLE 6-47: LED OUTPUT CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 74h R/W LED Output Control --- - -- LED2_ DR LED1_ DR 00h Note: If an LED is linked to a sensor input in the Sensor Input LED Linking Register (Section 6.26, "Sensor Input LED Linking Register"), the corresponding bit in the LED Output Control Register is ignored (i.e. a linked LED cannot be host controlled). CAP1128 DS00001622B-page 52 2015 Microchip Technology Inc. Table 6-48 shows the interaction between the polarity controls, output controls, and relative brightness. Bit 1 - LED2_DR - Determines whether LED2 output is driven high or low. • ‘0’ (default) - The LED2 output is driven at the minimum duty cycle or not actuated. • ‘1’ - The LED2 output is High Z or driven at the maximum duty cycle or actuated. Bit 0 - LED1_DR - Determines whether LED1 output is driven high or low. 6.29 Linked LED Transition Control Register The Linked LED Transition Control register controls the LED drive when the LED is linked to a capacitive touch sensor input. These controls work in conjunction with the INV_LINK_TRAN bit (see Section 6.6.2, "Configuration 2 - 44h") to create smooth transitions from host control to linked LEDs. Bit 1 - LED2_LTRAN - Determines the transition effect when LED2 is linked to CS2. • ‘0’ (default) - When the LED output control bit for LED2 is ‘1’, and then LED2 is linked to CS2 and no touch is detected, the LED will change states. • ‘1’ - If the INV_LINK_TRAN bit is ‘1’, when the LED output control bit for CS2 is ‘1’, and then CS2 is linked to LED2 and no touch is detected, the LED will not change states. In addition, the LED state will change when the sensor pad is touched. If the INV_LINK_TRAN bit is ‘0’, when the LED output control bit for CS2 is ‘1’, and then CS2 is linked to LED2 and no touch is detected, the LED will not change states. However, the LED state will not change when the sensor pad is touched. 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 LED2_LTRAN bit is set to ‘1’. Therefore, if breathe and pulse behaviors are used, set the INV_LINK_TRAN bit to ‘1’. TABLE 6-48: LED POLARITY BEHAVIOR LED Output Control Register or Touch Polarity Max Duty Min Duty Brightness LED Appearance 0 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. Brightness ramps from min duty cycle to max duty cycle according to LED behavior 0 non-inverted (‘1’) not used minimum % of time that the LED is off (logic 1) maximum brightness at 100 minus min duty cycle. on at 100 - min duty cycle 1 non-inverted (‘1’) maximum % of time that the LED is off (logic 1) minimum % of time that the LED is off (logic 1) For Direct behavior, maximum brightness is 100 minus max duty cycle. When breathing, max brightness is 100 minus min duty cycle. Brightness ramps from 100 - min duty cycle to 100 - max duty cycle. according to LED behavior TABLE 6-49: LINKED LED TRANSITION CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 77h R/W Linked LED Transition Control - ----- LED2_ LTRAN LED1_ LTRAN 00h 2015 Microchip Technology Inc. DS00001622B-page 53 CAP1128 Bit 0 - LED1_LTRAN - Determines the transition effect when LED1 is linked to CS1. 6.30 LED Mirror Control Register The LED Mirror Control Registers determine the meaning of duty cycle settings when polarity is non-inverted for each LED channel. When the polarity bit is set to ‘1’ (non-inverted), to obtain correct steps for LED ramping, pulse, and breathe behaviors, the min and max duty cycles need to be relative to 100%, rather than the default, which is relative to 0%. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’, the LED will be on and the CAP1128 LED pin is sinking the LED current. When the polarity bit is set to ‘1’, it is considered non-inverted. For systems using the opposite LED configuration, mirror controls would apply when the polarity bit is ‘0’. These bits are changed automatically if the corresponding LED Polarity bit is changed (unless the BLK_POL_MIR bit is set - see Section 6.6). Bit 1 - LED2_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. • ‘0’ (default) - The duty cycle settings are determined relative to 0% and are determined directly with the settings. • ‘1’ - The duty cycle settings are determined relative to 100%. Bit 0 - LED1_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. 6.31 LED Behavior Register The LED Behavior register controls the operation of LEDs. Each LED pin is controlled by a 2-bit field and the behavior is determined by whether the LED is linked to a capacitive touch sensor input or not. If the corresponding LED output is linked to a capacitive touch sensor input, the appropriate behavior will be enabled / disabled based on touches and releases. If the LED output is not associated with a capacitive touch sensor input, the appropriate behavior will be enabled / disabled by the LED Output Control register. If the respective LEDx_DR bit is set to a logic ‘1’, this will be associated as a “touch”, and if the LEDx_DR bit is set to a logic ‘0’, this will be associated as a “release”. Table 6-52, "LEDx_CTL Bit Decode" shows the behavior triggers. The defined behavior will activate when the Start Trigger is met and will stop when the Stop Trigger is met. Note the behavior of the Breathe Hold and Pulse Release option. The LED Polarity Control register will determine the non actuated state of the LED outputs (see Section 6.27, "LED Polarity Register"). APPLICATION NOTE: If an LED is not linked to a capacitive touch sensor input and is breathing (via the Breathe or Pulse behaviors), it must be unactuated and then re-actuated before changes to behavior are processed. For example, if the LED output is breathing and the Maximum duty cycle is changed, this change will not take effect until the LED output control register is set to ‘0’ and then re-set to ‘1’. APPLICATION NOTE: If an LED is not linked to the capacitive touch sensor input and configured to operate using Pulse 1 Behavior, then the circuitry will only be actuated when the corresponding output control bit is set. It will not check the bit condition until the Pulse 1 behavior is finished. The device will not remember if the bit was cleared and reset while it was actuated. TABLE 6-50: LED MIRROR CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 79h R/W LED Mirror Control ------ LED2_ MIR _ EN LED1_ MIR _ EN 00h TABLE 6-51: LED BEHAVIOR REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 81h R/W LED Behavior 1 - - - - LED2_CTL[1:0] LED1_CTL[1:0] 00h CAP1128 DS00001622B-page 54 2015 Microchip Technology Inc. APPLICATION NOTE: If an LED is actuated and not linked and the desired LED behavior is changed, this new behavior will take effect immediately; however, the first instance of the changed behavior may act incorrectly (e.g. if changed from Direct to Pulse 1, the LED output may ‘breathe’ 4 times and then end at minimum duty cycle). LED Behaviors will operate normally once the LED has been un-actuated and then re-actuated. APPLICATION NOTE: If an LED is actuated and it is switched from linked to a capacitive touch sensor input to unlinked (or vice versa), the LED will respond to the new command source immediately if the behavior was Direct or Breathe. For Pulse behaviors, it will complete the behavior already in progress. For example, if a linked LED was actuated by a touch and the control 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. Bits 3 - 2 - LED2_CTL[1:0] - Determines the behavior of LED2 as shown in Table 6-52. Bits 1 - 0 - LED1_CTL[1:0] - Determines the behavior of LED1 as shown in Table 6-52. 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. TABLE 6-52: LEDX_CTL BIT DECODE LEDx_CTL [1:0] Operation Description Start TRigger Stop Trigger 1 0 0 0 Direct The LED is driven to the programmed state (active or inactive). See Figure 6-7 Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 0 1 Pulse 1 The LED will “Pulse” a programmed number of times. During each “Pulse” the LED will breathe up to the maximum brightness and back down to the minimum brightness so that the total “Pulse” period matches the programmed value. Touch or Release Detected or LED Output Control bit set or cleared (see Section 6.32) n/a 1 0 Pulse 2 The LED will “Pulse” when the start trigger is detected. When the stop trigger is detected, it will “Pulse” a programmable number of times then return to its minimum brightness. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 1 1 Breathe The LED will breathe. It will be driven with a duty cycle that ramps up from the programmed minimum duty cycle (default 0%) to the programmed maximum duty cycle duty cycle (default 100%) and then back down. Each ramp takes up 50% of the programmed period. The total period of each “breath” is determined by the LED Breathe Period controls - see Section 6.34. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 2015 Microchip Technology Inc. DS00001622B-page 55 CAP1128 6.32 LED Pulse 1 Period Register The LED Pulse Period 1 register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 01b). The LSB represents 32ms so that a setting of 18h (24d) would represent a period of 768ms (24 x 32ms = 768ms). The total range is from 32ms to 4.064 seconds as shown in Table 6-54 with the default being 1024ms. 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. Bit 7 - ST_TRIG - Determines the start trigger for the LED Pulse behavior. • ‘0’ (default) - The LED will Pulse when a touch is detected or the drive bit is set. • ‘1’ - The LED will Pulse when a release is detected or the drive bit is cleared. The Pulse 1 operation is shown in Figure 6-1 when the LED output is configured for non-inverted polarity (LEDx_POL = 1) and in Figure 6-2 for inverted polarity (LEDx_POL = 0). . TABLE 6-53: LED PULSE 1 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 84h R/W LED Pulse 1 Period ST_ TRIG P1_ PER6 P1_ PER5 P1_ PER4 P1_ PER3 P1_ PER2 P1_ PER1 P1_ PER0 20h FIGURE 6-1: Pulse 1 Behavior with Non-Inverted Polarity Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected (100% - Pulse 1 Max Duty Cycle) * Brightness X pulses after touch or after release Pulse 1 Period (P1_PER) (100% - Pulse 1 Min Duty Cycle) * Brightness LED Brightness CAP1128 DS00001622B-page 56 2015 Microchip Technology Inc. 6.33 LED Pulse 2 Period Register The LED Pulse 2 Period register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 10b). 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 6-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 6-3 for non-inverted polarity (LEDx_POL = 1) and in Figure 6-4 for inverted polarity (LEDx_POL = 0). FIGURE 6-2: Pulse 1 Behavior with Inverted Polarity TABLE 6-54: LED PULSE / BREATHE PERIOD EXAMPLE Setting (HEX) Setting (Decimal) Total Breathe / Pulse Period (MS) 00h 0 32 01h 1 32 02h 2 64 03h 3 96 . . . . . . . . . 7Dh 125 4000 7Eh 126 4032 7Fh 127 4064 TABLE 6-55: LED PULSE 2 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 85h R/W LED Pulse 2 Period - P2_ PER6 P2_ PER5 P2_ PER4 P2_ PER3 P2_ PER2 P2_ PER1 P2_ PER0 14h Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected Pulse 1 Min Duty Cycle * Brightness X pulses after touch or after release Pulse Period (P1_PER) Pulse 1 Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001622B-page 57 CAP1128 6.34 LED Breathe Period Register The LED Breathe Period register determines the overall period of a breathe operation as determined by the LED_CTL registers (see Table 6-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 6-54) with a default of 2976ms. 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. FIGURE 6-3: Pulse 2 Behavior with Non-Inverted Polarity FIGURE 6-4: Pulse 2 Behavior with Inverted Polarity TABLE 6-56: LED BREATHE PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 86h R/W LED Breathe Period - BR_ PER6 BR_ PER5 BR_ PER4 BR_ PER3 BR_ PER2 BR_ PER1 BR_ PER0 5Dh . . . Normal – untouched operation Normal – untouched operation Touch Detected (100% - Pulse 2 Min Duty Cycle) * Brightness (100% - Pulse 2 Max Duty Cycle) * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness Normal – untouched operation Normal – untouched operation Touch Detected Pulse 2 Max Duty Cycle * Brightness Pulse 2 Min Duty Cycle * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness . . . CAP1128 DS00001622B-page 58 2015 Microchip Technology Inc. 6.35 LED Configuration Register The LED Configuration register controls general LED behavior as well as the number of pulses that are sent for the PULSE LED output behavior. Bit 6 - RAMP_ALERT - Determines whether the device will assert the ALERT# pin when LEDs actuated by the LED Output Control register bits have finished their respective behaviors. Interrupts will only be generated if the LED activity is generated by writing the LED Output Control registers. Any LED activity associated with touch detection will not cause an interrupt to be generated when the LED behavior has been finished. • ‘0’ (default) - The ALERT# pin will not be asserted when LEDs actuated by the LED Output Control register have finished their programmed behaviors. • ‘1’ - The ALERT# pin will be asserted whenever any LED that is actuated by the LED Output Control register has finished its programmed behavior. Bits 5 - 3 - PULSE2_CNT[2:0] - Determines the number of pulses used for the Pulse 2 behavior as shown in Table 6-58. Bits 2 - 0 - PULSE1_CNT[2:0] - Determines the number of pulses used for the Pulse 1 behavior as shown in Table 6-58. 6.36 LED Duty Cycle Registers The LED Duty Cycle registers determine the minimum and maximum duty cycle settings used for the LED for each LED behavior. These settings affect the brightness of the LED when it is fully off and fully on. The LED driver duty cycle will ramp up from the minimum duty cycle to the maximum duty cycle and back down again. APPLICATION NOTE: When operating in Direct behavior mode, changes to the Duty Cycle settings will be applied immediately. When operating in Breathe, Pulse 1, or Pulse 2 modes, the LED must be unactuated and then re-actuated before changes to behavior are processed. TABLE 6-57: LED CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 88h R/W LED Config - RAMP_ ALERT PULSE2_CNT[2:0] PULSE1_CNT[2:0] 04h TABLE 6-58: PULSEX_CNT DECODE PULSEX_CNT[2:0] Number of Breaths 21 0 0 0 0 1 (default - Pulse 2) 00 1 2 01 0 3 01 1 4 1 0 0 5 (default - Pulse 1) 10 1 6 11 0 7 11 1 8 TABLE 6-59: LED DUTY CYCLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 90h R/W LED Pulse 1 Duty Cycle P1_MAX_DUTY[3:0] P1_MIN_DUTY[3:0] F0h 91h R/W LED Pulse 2 Duty Cycle P2_MAX_DUTY[3:0] P2_MIN_DUTY[3:0] F0h 92h R/W LED Breathe Duty Cycle BR_MAX_DUTY[3:0] BR_MIN_DUTY[3:0] F0h 93h R/W Direct Duty Cycle DR_MAX_DUTY[3:0] DR_MIN_DUTY[3:0] F0h 2015 Microchip Technology Inc. DS00001622B-page 59 CAP1128 Bits 7 - 4 - X_MAX_DUTY[3:0] - Determines the maximum PWM duty cycle for the LED drivers as shown in Table 6-60. Bits 3 - 0 - X_MIN_DUTY[3:0] - Determines the minimum PWM duty cycle for the LED drivers as shown in Table 6-60. 6.37 LED Direct Ramp Rates Register The LED Direct Ramp Rates register control the rising and falling edge time of an LED that is configured to operate in Direct behavior mode. The rising edge time corresponds to the amount of time the LED takes to transition from its minimum duty cycle to its maximum duty cycle. Conversely, the falling edge time corresponds to the amount of time that the LED takes to transition from its maximum duty cycle to its minimum duty cycle. Bits 5 - 3 - RISE_RATE[2:0] - Determines the rising edge time of an LED when it transitions from its minimum drive state to its maximum drive state as shown in Table 6-62. Bits 2 - 0 - FALL_RATE[2:0] - Determines the falling edge time of an LED when it transitions from its maximum drive state to its minimum drive state as shown in Table 6-62. TABLE 6-60: LED DUTY CYCLE DECODE x_MAX/MIN_Duty [3:0] Maximum Duty Cycle Minimum Duty Cycle 3 21 0 0 0 0 0 7% 0% 0 0 0 1 9% 7% 0 0 1 0 11% 9% 0 0 1 1 14% 11% 0 1 0 0 17% 14% 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% TABLE 6-61: LED DIRECT RAMP RATES REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 94h R/W LED Direct Ramp Rates - - RISE_RATE[2:0] FALL_RATE[2:0] 00h TABLE 6-62: RISE / FALL RATE DECODE RISE_RATE/ FALL_RATE/ Bit Decode Rise / Fall Time (TRISE / TFALL) 21 0 00 0 0 0 0 1 250ms 0 1 0 500ms 0 1 1 750ms 1 0 0 1s 1 0 1 1.25s CAP1128 DS00001622B-page 60 2015 Microchip Technology Inc. 6.38 LED Off Delay Register The LED Off Delay register determines the amount of time that an LED remains at its maximum duty cycle (or minimum as determined by the polarity controls) before it starts to ramp down. If the LED is operating in Breathe mode, this delay is applied at the top of each “breath”. If the LED is operating in the Direct mode, this delay is applied when the LED is unactuated. Bits 6 - 4 - BR_OFF_DLY[2:0] - Determines the Breathe behavior mode off delay, which is the amount of time an LED in Breathe behavior mode remains inactive after it finishes a breathe pulse (ramp on and ramp off), as shown in Figure 6- 5 (non-inverted polarity LEDx_POL = 1) and Figure 6-6 (inverted polarity LEDx_POL = 0). Available settings are shown in Table 6-64. 1 1 0 1.5s 1 1 1 2s TABLE 6-63: LED OFF DELAY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 95h R/W LED Off Delay Register - BR_OFF_DLY[2:0] DIR_OFF_DLY[3:0] 00h FIGURE 6-5: Breathe Behavior with Non-Inverted Polarity TABLE 6-62: RISE / FALL RATE DECODE (CONTINUED) RISE_RATE/ FALL_RATE/ Bit Decode Rise / Fall Time (TRISE / TFALL) 21 0 LED Actuated 100% - Breathe Max Min Cycle * Brightness 100% - Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) 2015 Microchip Technology Inc. DS00001622B-page 61 CAP1128 Bits 3 - 0 - DIR_OFF_DLY[3:0] - Determines the turn-off delay, as shown in Table 6-65, for all LEDs that are configured to operate in Direct behavior mode. The Direct behavior operation is determined by the combination of programmed Rise Time, Fall Time, Min and Max Duty cycles, Off Delay, and polarity. Figure 6-7 shows the behavior for non-inverted polarity (LEDx_POL = 1) while Figure 6- 8 shows the behavior for inverted polarity (LEDx_POL = 0). FIGURE 6-6: Breathe Behavior with Inverted Polarity TABLE 6-64: BREATHE OFF DELAY SETTINGS BR_OFF_DLY [2:0] OFF Delay 2 10 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 LED Actuated Breathe Max Duty Cycle * Brightness Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) CAP1128 DS00001622B-page 62 2015 Microchip Technology Inc. FIGURE 6-7: Direct Behavior for Non-Inverted Polarity FIGURE 6-8: Direct Behavior for Inverted Polarity TABLE 6-65: OFF DELAY DECODE OFF Delay[3:0] Bit Decode OFF Delay (tOFF_DLY) 32 1 0 00 0 0 0 0 0 0 1 250ms 0 0 1 0 500ms 0 0 1 1 750ms 0 1 0 0 1s 0 1 0 1 1.25s 0 1 1 0 1.5s 0 1 1 1 2s 1 0 0 0 2.5s 1 0 0 1 3.0s 1 0 1 0 3.5s 1 0 1 1 4.0s 1 1 0 0 4.5s All others 5.0s Normal – untouched operation RISE_RATE Setting (tRISE) (100% - Max Duty Cycle) * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation (100% - Min Duty Cycle) * Brightness LED Brightness Normal – untouched operation RISE_RATE Setting (tRISE) Min Duty Cycle * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001622B-page 63 CAP1128 6.39 Sensor Input Calibration Registers The Sensor Input Calibration registers hold the 10-bit value that represents the last calibration value. 6.40 Product ID Register The Product ID register stores a unique 8-bit value that identifies the device. 6.41 Manufacturer ID Register The Vendor ID register stores an 8-bit value that represents Microchip. TABLE 6-66: SENSOR INPUT CALIBRATION REGISTERS ADDR Register R/W B7 B6 B5 B4 B3 B2 B1 B0 Default B1h Sensor Input 1 Calibration R CAL1_9 CAL1_8 CAL1_7 CAL1_6 CAL1_5 CAL1_4 CAL1_3 CAL1_2 00h B2h Sensor Input 2 Calibration R CAL2_9 CAL2_8 CAL2_7 CAL2_6 CAL2_5 CAL2_4 CAL2_3 CAL2_2 00h B3h Sensor Input 3 Calibration R CAL3_9 CAL3_8 CAL3_7 CAL3_6 CAL3_5 CAL3_4 CAL3_3 CAL3_2 00h B4h Sensor Input 4 Calibration R CAL4_9 CAL4_8 CAL4_7 CAL4_6 CAL4_5 CAL4_4 CAL4_3 CAL4_2 00h B5h Sensor Input 5 Calibration R CAL5_9 CAL5_8 CAL5_7 CAL5_6 CAL5_5 CAL5_4 CAL5_3 CAL5_2 00h B6h Sensor Input 6 Calibration R CAL6_9 CAL6_8 CAL6_7 CAL6_6 CAL6_5 CAL6_4 CAL6_3 CAL6_2 00h B7h Sensor Input 7 Calibration R CAL7_9 CAL7_8 CAL7_7 CAL7_6 CAL7_5 CAL7_4 CAL7_3 CAL7_2 00h B8h Sensor Input 8 Calibration R CAL8_9 CAL8_8 CAL8_7 CAL8_6 CAL8_5 CAL8_4 CAL8_3 CAL8_2 00h B9h Sensor Input Calibration LSB 1 R CAL4_1 CAL4_0 CAL3_1 CAL3_0 CAL2_1 CAL2_0 CAL1_1 CAL1_0 00h BAh Sensor Input Calibration LSB 2 R CAL8_1 CAL8_0 CAL7_1 CAL7_0 CAL6_1 CAL6_0 CAL5_1 CAL5_0 00h TABLE 6-67: PRODUCT ID REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FDh R Product ID 0 1 0 1 0 0 1 0 52h TABLE 6-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 CAP1128 DS00001622B-page 64 2015 Microchip Technology Inc. 6.42 Revision Register The Revision register stores an 8-bit value that represents the part revision. TABLE 6-69: REVISION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FFh R Revision 1 0 0 0 0 0 1 1 83h 2015 Microchip Technology Inc. DS00001622B-page 65 CAP1128 7.0 PACKAGE INFORMATION 7.1 CAP1128 Package Drawings Note: For the most current package drawings, see the Microchip Packaging Specification at: http://www.microchip.com/packaging. FIGURE 7-1: 20-Pin QFN 4mm x 4mm Package Drawing CAP1128 DS00001622B-page 66 2015 Microchip Technology Inc. FIGURE 7-2: 20-Pin QFN 4mm x 4mm Package Dimensions FIGURE 7-3: 20-Pin QFN 4mm x 4mm PCB Drawing 2015 Microchip Technology Inc. DS00001622B-page 67 CAP1128 7.2 Package Marking FIGURE 7-4: CAP1128 Package Markings C 1 28 - 1 Y WWN N N A RCC e3 TOP BOTTOM Bottom marking not allowed PB-FREE/GREEN SYMBOL (Matte Sn) Lines 1-3: Line 4: Center Horizontal Alignment Left Horizontal Alignment PIN 1 0.41 3x 0.56 Line 1 – SMSC Logo without circled R symbol Line 2 – Device ID, Version Line 3 – Year, Week, Alphanumeric Traceability Code Line 4 – Revision, Country Code 1 CAP1128 DS00001622B-page 68 2015 Microchip Technology Inc. APPENDIX A: DEVICE DELTA A.1 Delta from CAP1028 to CAP1128 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 6-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. Added filtering on RESET pin to prevent errant resets. 5. Updated controls so that the RESET pin assertion places the device into the lowest power state available and causes an interrupt when released. See Section 5.2, "RESET Pin". 6. Added 1 bit to the LED Off Delay register (see Section 6.38, "LED Off Delay Register") to extend times from 2s to 5s in 0.5s intervals. 7. Breathe behavior modified. A breathe off delay control was added to the LED Off Delay Register (see Section 6.38, "LED Off Delay Register") so the LEDs can be configured to remain inactive between breathes. 8. Added controls for the LED transition effects when linking LEDs to capacitive sensor inputs. See Section 6.29, "Linked LED Transition Control Register". 9. Added controls to “mirror” the LED duty cycle outputs so that when polarity changes, the LED brightness levels look right. These bits are automatically set when polarity is set. Added control to break this auto-set behavior. See Section 6.30, "LED Mirror Control Register". 10. Added Multiple Touch Pattern detection circuitry. See Section 6.15, "Multiple Touch Pattern Configuration Register". 11. Added General Status register to flag Multiple touches, Multiple Touch Pattern issues and general touch detections. See Section 6.2, "Status Registers". 12. Added bits 6 and 5 to the Recalibration Configuration register (2Fh - see Section 6.17, "Recalibration Configuration Register"). These bits control whether the accumulation of intermediate data and the consecutive negative delta counts counter are cleared when the noise status bit is set. 13. Added Configuration 2 register for LED linking controls, noise detection controls, and control to interrupt on press but not on release. Added control to change alert pin polarity. See Section 6.6, "Configuration Registers". 14. Updated Deep Sleep behavior so that device does not clear DSLEEP bit on received communications but will wake to communicate. 15. Changed PWM frequency for LED drivers. The PWM frequency was derived from the programmed breathe period and duty cycle settings and it ranged from ~4Hz to ~8000 Hz. The PWM frequency has been updated to be a fixed value of ~2000Hz. 16. Register delta: Table A.1 Register Delta From CAP1028 to CAP1128 Address Register Delta Delta Default 00h Page 31 Changed - Main Status / Control added bits 7-6 to control gain 00h 02h Page 32 New - General Status new register to store MTP, MULT, LED, RESET, and general TOUCH bits 00h 44h Page 36 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 39 Changed - Averaging Control updated register bits - moved SAMP_AVG[2:0] bits and added SAMP_- TIME bit 1. Default changed 39h 2Bh Page 43 New - Multiple Touch Pattern Configuration new register for Multiple Touch Pattern configuration - enable and threshold settings 80h 2015 Microchip Technology Inc. DS00001622B-page 69 CAP1128 2Dh Page 44 New - Multiple Touch Pattern Register new register for Multiple Touch Pattern detection circuitry - pattern or number of sensor inputs FFh 2Fh Page 44 Changed - Recalibration Configuration updated register - updated CAL_CFG bit decode to add a 128 averages setting and removed highest time setting. Default changed. Added bit 6 NO_CLR_INTD and bit 5 NO_CLR_NEG. 8Ah 38h Page 46 Changed - Sensor Input Noise Threshold updated register bits - removed bits 7 - 3 and consolidated all controls into bits 1 - 0. These bits will set the noise threshold for all channels. Default changed 01h 39h Removed - Noise Threshold Register 2 removed register n/a 41h Page 47 Changed - Standby Configuration updated register bits - moved STBY_AVG[2:0] bits and added STBY_- TIME bit 1. Default changed 39h 77h Page 52 New - Linked LED Transition Control new register to control transition effect when LED linked to sensor inputs 00h 79h Page 53 New - LED Mirror Control new register to control LED output mirroring for brightness control when polarity changed 00h 90h Page 58 Changed - LED Pulse 1 Duty Cycle changed bit decode to be more logarithmic F0h 91h Page 58 Changed - LED Pulse 2 Duty Cycle changed bit decode to be more logarithmic F0h 92h Page 58 Changed - LED Breathe Duty Cycle changed bit decode to be more logarithmic F0h 93h Page 58 Changed - LED Direct Duty Cycle changed bit decode to be more logarithmic F0h 95h Added controls - LED Off Delay Added bits 6-4 BR_OFF_DLY[2:0] Added bit 3 DIR_OFF_DLY[3] 00h FDh Page 63 Changed - Product ID Changed bit decode for CAP1128 52h Table A.1 Register Delta From CAP1028 to CAP1128 (continued) Address Register Delta Delta Default CAP1128 DS00001622B-page 70 2015 Microchip Technology Inc. APPENDIX B: DATA SHEET REVISION HISTORY Revision Section/Figure/Entry Correction DS00001622B (02-09-15) Features, Table 2-1, Table 2- 2, "Pin Types", Section 5.0, "General Description" References to BC-Link Interface, BC_DATA, BC_- CLK, BC-IRQ#, BC-Link bus have been removed Application Note under Table 2-6 [BC-Link] hidden in data sheet Table 3-2, "Electrical Specifications" BC-Link Timing Section hidden in data sheet Table 4-1 Protocol Used for 68K Pull Down Resistor changed from “BC-Link Communications” to “Reserved” Section 4.2.2, "SMBus Address and RD / WR Bit" Replaced “client address” with “slave address” in this section. Section 4.2.4, SMBus ACK and NACK Bits, Section 4.2.5, SMBus Stop Bit,Section 4.2.7, SMBus and I2C Compatibility Replaced “client” with “slave” in these sections. Table 4-4, "Read Byte Protocol" Heading changed from “Client Address” to “Slave Address” Table 6-1 Register Name for Register Address 77h changed from “LED Linked Transition Control” to “Linked LED Transition Control” Section 6.30 changed CS2 to LED2 Section 7.7 Package Marking Updated package drawing Appendix A: Device Delta changed 2Dh to 2Fh in item #12 Product Identification System Removed BC-Link references REV A REV A replaces previous SMSC version Rev. 1.32 (01-05-12) Rev. 1.32 (01-05-12) Table 3-2, "Electrical Specifications" Added conditions for tHD:DAT. Section 4.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.0 SMSC Dedicated Slave Devices in I 2C Systems.” Added: CAP1188 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. Section 6.4, "Sensor Input Delta Count Registers" Changed negative value cap from FFh to 80h. Rev. 1.31 (08-18-11) Section 4.3.3, "SMBus Send Byte" Added an application note: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Section 4.3.4, "SMBus Receive Byte" Added an application note: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Rev. 1.3 (05-18-11) Section 6.42, "Revision Register" Updated revision ID from 82h to 83h. Rev. 1.2 (02-10-11) Section A.8, "Delta from Rev B (Mask B0) to Rev C (Mask B1)" Added. Table 2-1, "Pin Description for CAP1128" Changed value in “Unused Connection” column for the ADDR_COMM pin from “Connect to Ground” to “n/a“. 2015 Microchip Technology Inc. DS00001622B-page 71 CAP1128 Table 3-2, "Electrical Specifications" PSR improvements made in functional revision B. Changed PSR spec from ±100 typ and ±200 max counts / V to ±3 and ±10 counts / V. Conditions updated. Section 5.5.2, "Recalibrating Sensor Inputs" Added more detail with subheadings for each type of recalibration. Section 6.6, "Configuration Registers" Added bit 5 BLK_PWR_CTRL to the Configuration 2 Register 44h. The TIMEOUT bit is set to ‘1’ by default for functional revision B and is set to ‘0’ by default for functional revision C. Section 6.42, "Revision Register" Updated revision ID in register FFh from 81h to 82h. Rev. 1.1 (11-17-10) Document Updated for functional revision B. See Section A.7, "Delta from Rev A (Mask A0) to Rev B (Mask B0)". Cover 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 Table 3-2, "Electrical Specifications" Conditions for Power Supply Rejection modified adding the following: Sampling time = 2.56ms Averaging = 1 Negative Delta Counts = Disabled All other parameters default Section 6.11, "Calibration Activate Register" Updated register description to indicate which re-calibration routine is used. Section 6.14, "Multiple Touch Configuration Register" Updated register description to indicate what will happen. Table 6-34, "CSx_BN_TH Bit Decode" Table heading changed from “Threshold Divide Setting” to “Percent Threshold Setting”. Rev. 1.0 (06-14-10) Initial release Revision Section/Figure/Entry Correction CAP1128 DS00001622B-page 72 2015 Microchip Technology Inc. THE MICROCHIP WEB SITE Microchip provides online support via our WWW site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQ), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com. Under “Support”, click on “Customer Change Notification” and follow the registration instructions. CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office • Field Application Engineer (FAE) • Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://www.microchip.com/support 2015 Microchip Technology Inc. DS00001622B-page 73 CAP1128 PRODUCT IDENTIFICATION SYSTEM To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PART NO. [X] - 1 - XXX - [X](1) l l l l Device Temperature Package Tape and Reel Range Option Example: Note 1: Tape and Reel identifier only appears in the catalog part number description. This identifier is used for ordering purposes and is not printed on the device package. Check with your Microchip Sales Office for package availability with the Tape and Reel option. Device: CAP1128 Temperature Range: Blank = 0°C to +85°C (Extended Commercial) Package: BP = QFN Tape and Reel Option: TR = Tape and Reel(1) CAP1128-1-BP-TR 20-pin QFN 4mm x 4mm (RoHS compliant) Eight capacitive touch sensor inputs, Two LED drivers, Dedicated Wake, Reset, SMBus / BC-Link / SPI interfaces Reel size is 4,000 pieces CAP1128 DS00001622B-page 74 2015 Microchip Technology Inc. Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 9781632770325 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == 2015 Microchip Technology Inc. DS00001622B-page 75 AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Austin, TX Tel: 512-257-3370 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 ASIA/PACIFIC Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2943-5100 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 China - Dongguan Tel: 86-769-8702-9880 China - Hangzhou Tel: 86-571-8792-8115 Fax: 86-571-8792-8116 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 ASIA/PACIFIC China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 Taiwan - Kaohsiung Tel: 886-7-213-7828 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Dusseldorf Tel: 49-2129-3766400 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Germany - Pforzheim Tel: 49-7231-424750 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Poland - Warsaw Tel: 48-22-3325737 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Worldwide Sales and Service 01/27/15Au format texte
2015 Microchip Technology Inc. DS00001621B-page 1 General Description The CAP1166, which incorporates RightTouch® technology, is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains six (6) 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. The CAP1166 also contains six (6) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. The CAP1166 includes Multiple Pattern Touch recognition that allows the user to select a specific set of buttons to be touched simultaneously. If this pattern is detected, then a status bit is set and an interrupt generated. Additionally, the CAP1166 includes circuitry and support for enhanced sensor proximity detection. The CAP1166 offers multiple power states operating at low quiescent currents. In the Standby state of operation, one or more capacitive touch sensor inputs are active and all LEDs may be used. If a touch is detected, it will wake the system using the WAKE/SPI_MOSI pin. Deep Sleep is the lowest power state available, drawing 5uA (typical) of current. In this state, no sensor inputs are active. Driving the WAKE/SPI_MOSI pin or communications will wake the device. Applications • Desktop and Notebook PCs • LCD Monitors • Consumer Electronics • Appliances Features • Six (6) Capacitive Touch Sensor Inputs - Programmable sensitivity - Automatic recalibration - Individual thresholds for each button • Proximity Detection • Multiple Button Pattern Detection • Calibrates for Parasitic Capacitance • Analog Filtering for System Noise Sources • Press and Hold feature for Volume-like Applications • Multiple Communication Interfaces - SMBus / I2C compliant interface - SPI communications - Pin selectable communications protocol and multiple slave addresses (SMBus / I2C only) • Low Power Operation - 5uA quiescent current in Deep Sleep - 50uA quiescent current in Standby (1 sensor input monitored) - Samples one or more channels in Standby • Six (6) LED Driver Outputs - Open Drain or Push-Pull - Programmable blink, breathe, and dimness controls - Can be linked to Capacitive Touch Sensor inputs • Dedicated Wake output flags touches in low power state • System RESET pin • Available in 20-pin 4mm x 4mm QFN or 24-pin SSOP RoHS compliant package CAP1166 6 Channel Capacitive Touch Sensor with 6 LED Drivers CAP1166 DS00001621B-page 2 2015 Microchip Technology Inc. TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com. We welcome your feedback. Most Current Data Sheet To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000000A is version A of document DS30000000). Errata An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: • Microchip’s Worldwide Web site; http://www.microchip.com • Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include -literature number) you are using. Customer Notification System Register on our web site at www.microchip.com to receive the most current information on all of our products. 2015 Microchip Technology Inc. DS00001621B-page 3 CAP1166 Table of Contents 1.0 Block Diagram ................................................................................................................................................................................. 4 2.0 Pin Description ................................................................................................................................................................................ 5 3.0 Electrical Specifications .................................................................................................................................................................. 9 4.0 Communications ........................................................................................................................................................................... 12 5.0 General Description ...................................................................................................................................................................... 23 6.0 Register Description ...................................................................................................................................................................... 29 7.0 Package Information ..................................................................................................................................................................... 67 Appendix A: Device Delta ................................................................................................................................................................... 72 Appendix B: Data Sheet Revision History ........................................................................................................................................... 74 The Microchip Web Site ...................................................................................................................................................................... 76 Customer Change Notification Service ............................................................................................................................................... 76 Customer Support ............................................................................................................................................................................... 76 Product Identification System ............................................................................................................................................................. 77 2015 Microchip Technology Inc. DS00001621B-page 4 CAP1166 1.0 BLOCK DIAGRAM SMBus / BC-Link or SPI Slave Protocol SMCLK / BC_CLK / SPI_CLK SMDATA BC_DATA / SPI_MSIO/ SPI_MISO VDD GND ALERT# / BC_IRQ# Capacitive Touch Sensing Algorithm LED1 CS1 CS2 CS3 CS4 CS5 CS6 LED Driver, Breathe, and Dimness control RESET WAKE / SPI_MOSI ADDR_COMM SPI_CS# LED2 LED3 LED4 LED5 LED6 CAP1166 DS00001621B-page 5 2015 Microchip Technology Inc. 2.0 PIN DESCRIPTION FIGURE 2-1: CAP1166 Pin Diagram (20-Pin QFN) 1 2 3 4 15 14 13 12 20 19 18 17 6 7 8 9 5 10 11 16 CAP1166 20 pin QFN GND LED2 LED3 LED4 LED5 LED6 SMCLK / BC_CLK / SPI_CLK WAKE / SPI_MOSI SPI_CS# LED1 SMDATA / BC_DATA / SPI_MSIO / SPI_MISO RESET CS1 CS2 CS3 CS6 CS5 ADDR_COMM CS4 ALERT# / BC_IRQ# VDD 2015 Microchip Technology Inc. DS00001621B-page 6 CAP1166 FIGURE 2-2: CAP1166 Pin Diagram (24-pin SSOP) TABLE 2-1: PIN DESCRIPTION FOR CAP1166 Pin Number (QFN 20) Pin Number (SSOP 24) Pin Name Pin Function Pin Type Unused Connection 1 4 SPI_CS# Active low chip-select for SPI bus DI (5V) Connect to Ground 2 5 WAKE / SPI_- MOSI WAKE - Active high wake / interrupt output Standby power state - requires pull-down resistor WAKE - Active high wake input - requires pull-down resistor Deep Sleep power state DO Pull-down Resistor DI SPI_MOSI - SPI Master-Out-Slave-In port when used in normal mode DI (5V) Connect to GND CAP1166 24 SSOP 24 23 22 21 20 17 19 18 16 13 15 14 1 2 3 4 5 8 6 7 9 12 10 11 CS1 RESET SPI_CS# WAKE / SPI_MOSI SMDATA /SPI_MSIO / SPI_MISO SMCLK / SPI_CLK LED1 LED2 LED3 GND LED4 GND LED5 LED6 ALERT# / BC_IRQ# ADDR_COMM CS6 CS5 CS4 CS3 CS2 VDD N/C N/C CAP1166 DS00001621B-page 7 2015 Microchip Technology Inc. 3 6 SMDATA / SPI_MSIO / SPI_MISO SMDATA - Bi-directional, open-drain SMBus data - requires pull-up resistor DIOD (5V) n/a SPI_MSIO - SPI Master-Slave-In-Out bidirectional port when used in bi-directional mode DIO SPI_MISO - SPI Master-In-Slave-Out port when used in normal mode DO 4 8 SMCLK / SPI_CLK SMCLK - SMBus clock input - requires pull-up resistor DI (5V) SPI_CLK - SPI clock input DI (5V) n/a 5 9 LED1 Open drain LED 1 driver (default) OD (5V) Connect to Ground Push-pull LED 1 driver DO leave open or connect to Ground 6 10 LED2 Open drain LED 2 driver (default) OD (5V) Connect to Ground Push-pull LED 2 driver DO leave open or connect to Ground 7 11 LED3 Open drain LED 3 driver (default) OD (5V) Connect to Ground Push-pull LED 3 driver DO leave open or connect to Ground 8 13 LED4 Open drain LED 4 driver (default) OD (5V) Connect to Ground Push-pull LED 4 driver DO leave open or connect to Ground 9 15 LED5 Open drain LED 5 driver (default) OD (5V) Connect to Ground Push-pull LED 5 driver DO leave open or connect to Ground 10 16 LED6 Open drain LED 6 driver (default) OD (5V) Connect to Ground Push-pull LED 6 driver DO leave open or connect to Ground TABLE 2-1: PIN DESCRIPTION FOR CAP1166 (CONTINUED) Pin Number (QFN 20) Pin Number (SSOP 24) Pin Name Pin Function Pin Type Unused Connection 2015 Microchip Technology Inc. DS00001621B-page 8 CAP1166 APPLICATION NOTE: When the ALERT# pinis configured as an active low output, it will be open drain. When it is configured as an active high output, it will be push-pull. APPLICATION NOTE: For the 5V tolerant pins that have a pull-up resistor, the pull-up voltage must not exceed 3.6V when the CAP1166 is unpowered. APPLICATION NOTE: The SPI_CS# pin should be grounded when SMBus, or I2C,communications are used. The pin types are described in Table 2-2. All pins labeled with (5V) are 5V tolerant. 11 17 ALERT# ALERT# - Active low alert / interrupt output for SMBus alert or SPI interrupt - requires pull-up resistor (default) OD (5V) Connect to GND ALERT# - Active high push-pull alert / interrupt output for SMBus alert or SPI interrupt DO High-Z 12 18 ADDR_ COMM Address / communications select pin - pull-down resistor determines address / communications mechanism AI n/a 13 19 CS6 Capacitive Touch Sensor Input 6 AIO Connect to Ground 14 20 CS5 Capacitive Touch Sensor Input 5 AIO Connect to Ground 15 21 CS4 Capacitive Touch Sensor Input 4 AIO Connect to Ground 16 22 CS3 Capacitive Touch Sensor Input 3 AIO Connect to Ground 17 23 CS2 Capacitive Touch Sensor Input 2 AIO Connect to Ground 18 24 CS1 Capacitive Touch Sensor Input 1 AIO Connect to Ground 19 1 VDD Positive Power supply Power n/a 20 1 RESET Active high soft reset for system - resets all registers to default values. If not used, connect to ground. DI (5V) Connect to Ground Bottom Pad 12 GND Ground Power n/a 14 GND Ground Power n/a TABLE 2-1: PIN DESCRIPTION FOR CAP1166 (CONTINUED) Pin Number (QFN 20) Pin Number (SSOP 24) Pin Name Pin Function Pin Type Unused Connection CAP1166 DS00001621B-page 9 2015 Microchip Technology Inc. TABLE 2-2: PIN TYPES Pin Type Description Power This pin is used to supply power or ground to the device. DI Digital Input - This pin is used as a digital input. This pin is 5V tolerant. AIO Analog Input / Output -This pin is used as an I/O for analog signals. DIOD Digital Input / Open Drain Output - This pin is used as a digital I/O. When it is used as an output, it is open drain and requires a pull-up resistor. This pin is 5V tolerant. OD Open Drain Digital Output - This pin is used as a digital output. It is open drain and requires a pull-up resistor. This pin is 5V tolerant. DO Push-pull Digital Output - This pin is used as a digital output and can sink and source current. DIO Push-pull Digital Input / Output - This pin is used as an I/O for digital signals. 2015 Microchip Technology Inc. DS00001621B-page 10 CAP1166 3.0 ELECTRICAL SPECIFICATIONS Note 3-1 Stresses above those listed could cause permanent damage to the device. This is a stress rating only and functional operation of the device at any other condition above those indicated in the operation sections of this specification is not implied. Note 3-2 For the 5V tolerant pins that have a pull-up resistor, the voltage difference between V5VT_PIN and VDD must never exceed 3.6V. Note 3-3 The Package Power Dissipation specification assumes a recommended thermal via design consisting of a 3x3 matrix of 0.3mm (12mil) vias at 1.0mm pitch connected to the ground plane with a 2.5 x 2.5mm thermal landing. Note 3-4 Junction to Ambient (θJA) is dependent on the design of the thermal vias. Without thermal vias and a thermal landing, the θJA is approximately 60°C/W including localized PCB temperature increase. TABLE 3-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 3-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 20 pin QFN (see Note 3-3) 0.9 W Junction to Ambient (θJA) (see Note 3-4) 58 °C/W Operating Ambient Temperature Range -40 to 125 °C Storage Temperature Range -55 to 150 °C ESD Rating, All Pins, HBM 8000 V CAP1166 DS00001621B-page 11 2015 Microchip Technology Inc. TABLE 3-2: ELECTRICAL SPECIFICATIONS 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 DC Power Supply Voltage VDD 3.0 3.3 3.6 V Supply Current ISTBY 120 170 uA Standby state active 1 sensor input monitored No LEDs active Default conditions (8 avg, 70ms cycle time) ISTBY 50 uA Standby state active 1 sensor input monitored No LEDs active 1 avg, 140ms cycle time, IDSLEEP 5 15 uA Deep Sleep state active LEDs at 100% or 0% Duty Cycle No communications TA < 40°C 3.135 < VDD < 3.465V IDD 500 600 uA Capacitive Sensing Active No LEDs active Capacitive Touch Sensor Inputs Maximum Base Capacitance CBASE 50 pF Pad untouched Minimum Detectable Capacitive Shift ΔCTOUCH 20 fF Pad touched - default conditions (1 avg, 35ms cycle time, 1x sensitivity) Recommended Cap Shift ΔCTOUCH 0.1 2 pF Pad touched - Not tested Power Supply Rejection PSR ±3 ±10 counts / V Untouched Current Counts Base Capacitance 5pF - 50pF Maximum sensitivity Negative Delta Counts disabled All other parameters default Timing RESET Pin Delay tRST_DLY 10 ms Time to communications ready tCOMM_DLY 15 ms Time to first conversion ready tCONV_DLY 170 200 ms LED Drivers Duty Cycle DUTYLED 0 100 % Programmable Drive Frequency fLED 2 kHz Sinking Current ISINK 24 mA VOL = 0.4 Sourcing Current ISOURCE 24 mA VOH = VDD - 0.4 Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered I/O Pins Output Low Voltage VOL 0.4 V ISINK_IO = 8mA Output High Voltage VOH VDD - 0.4 V ISOURCE_IO = 8mA 2015 Microchip Technology Inc. DS00001621B-page 12 CAP1166 Note 3-5 The ALERT pin will not glitch high or low at power up if connected to VDD or another voltage. Note 3-6 The SMCLK and SMDATA pins will not glitch low at power up if connected to VDD or another voltage. Input High Voltage VIH 2.0 V Input Low Voltage VIL 0.8 V Leakage Current ILEAK ±5 uA powered or unpowered TA < 85°C pull-up voltage < 3.6V if unpowered RESET Pin Release to conversion ready tRESET 170 200 ms SMBus Timing Input Capacitance CIN 5 pF Clock Frequency fSMB 10 400 kHz Spike Suppression tSP 50 ns Bus Free Time Stop to Start tBUF 1.3 us Start Setup Time tSU:STA 0.6 us Start Hold Time tHD:STA 0.6 us Stop Setup Time tSU:STO 0.6 us Data Hold Time tHD:DAT 0 us When transmitting to the master Data Hold Time tHD:DAT 0.3 us When receiving from the master Data Setup Time tSU:DAT 0.6 us Clock Low Period tLOW 1.3 us Clock High Period tHIGH 0.6 us Clock / Data Fall Time tFALL 300 ns Min = 20+0.1CLOAD ns Clock / Data Rise Time tRISE 300 ns Min = 20+0.1CLOAD ns Capacitive Load CLOAD 400 pF per bus line SPI Timing Clock Period tP 250 ns Clock Low Period tLOW 0.4 x tP 0.6 x tP ns Clock High Period tHIGH 0.4 x tP 0.6 x tP ns Clock Rise / Fall time tRISE / tFALL 0.1 x tP ns Data Output Delay tD:CLK 10 ns Data Setup Time tSU:DAT 20 ns Data Hold Time tHD:DAT 20 ns SPI_CS# to SPI_CLK setup time tSU:CS 0 ns Wake Time tWAKE 10 20 us SPI_CS# asserted to CLK assert TABLE 3-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 2015 Microchip Technology Inc. DS00001621B-page 13 CAP1166 4.0 COMMUNICATIONS 4.1 Communications The CAP1166communicates using the 2-wire SMBus or I2C bus, the 2-wire proprietary BC-Link, or the SPI bus. If the proprietary BC-Link protocol is required for your application, please contact your Microchip representative for ordering instructions. 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 4-1. 4.1.1 SMBUS (I2C) COMMUNICATIONS When configured to communicate via the SMBus, the CAP1166 supports the following protocols: Send Byte, Receive Byte, Read Byte, Write Byte, Read Block, and Write Block. In addition, the device supports I2C formatting for block read and block write protocols. APPLICATION NOTE: For SMBus/I2C communications, the SPI_CS# pin is not used and should be grounded; any data presented to this pin will be ignored. See Section 4.2 and Section 4.3 for more information on the SMBus bus and protocols respectively. 4.1.2 SPI COMMUNICATIONS When configured to communicate via the SPI bus, the CAP1166supports both bi-directional 3-wire and normal 4-wire protocols and uses the SPI_CS# pin to enable communications. APPLICATION NOTE: See Section 4.5 and Section 4.6 for more information on the SPI bus and protocols respectively.Upon power up, the CAP1166 will not respond to any communications for up to 15ms. After this time, full functionality is available. 4.2 System Management Bus The CAP1166 communicates with a host controller, such as an SIO, through the SMBus. The SMBus is a two-wire serial communication protocol between a computer host and its peripheral devices. A detailed timing diagram is shown in Figure 4-1. Stretching of the SMCLK signal is supported; however, the CAP1166 will not stretch the clock signal. TABLE 4-1: ADDR_COMM PIN DECODE Pull-Down Resistor (+/- 5%) Protocol Used SMBus Address GND SPI Communications using Normal 4-wire Protocol Used n/a 56k SPI Communications using BiDirectional 3-wire Protocol Used n/a 68k Reserved n/a 82k SMBus / I2C 0101_100(r/w) 100k SMBus / I2C 0101_011(r/w) 120k SMBus / I2C 0101_010(r/w) 150k SMBus / I2C 0101_001(r/w) VDD SMBus / I2C 0101_000(r/w) CAP1166 DS00001621B-page 14 2015 Microchip Technology Inc. 4.2.1 SMBUS START BIT The SMBus Start bit is defined as a transition of the SMBus Data line from a logic ‘1’ state to a logic ‘0’ state while the SMBus Clock line is in a logic ‘1’ state. 4.2.2 SMBUS ADDRESS AND RD / WR BIT The SMBus Address Byte consists of the 7-bit slave address followed by the RD / WR indicator bit. If this RD / WR bit is a logic ‘0’, then the SMBus Host is writing data to the slave device. If this RD / WR bit is a logic ‘1’, then the SMBus Host is reading data from the slave device. See Table 4-1 for available SMBus addresses. 4.2.3 SMBUS DATA BYTES All SMBus Data bytes are sent most significant bit first and composed of 8-bits of information. 4.2.4 SMBUS ACK AND NACK BITS The SMBus slave will acknowledge all data bytes that it receives. This is done by the slave device pulling the SMBus Data line low after the 8th bit of each byte that is transmitted. This applies to both the Write Byte and Block Write protocols. The Host will NACK (not acknowledge) the last data byte to be received from the slave by holding the SMBus data line high after the 8th data bit has been sent. For the Block Read protocol, the Host will ACK each data byte that it receives except the last data byte. 4.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 CAP1166 detects an SMBus Stop bit and it has been communicating with the SMBus protocol, it will reset its slave interface and prepare to receive further communications. 4.2.6 SMBUS TIMEOUT The CAP1166 includes an SMBus timeout feature. Following a 30ms period of inactivity on the SMBus where the SMCLK pin is held low, the device will timeout and reset the SMBus interface. The timeout function defaults to disabled. It can be enabled by setting the TIMEOUT bit in the Configuration register (see Section 6.6, "Configuration Registers"). 4.2.7 SMBUS AND I2C COMPATIBILITY The major differences between SMBus and I2C devices are highlighted here. For more information, refer to the SMBus 2.0 and I2C specifications. For information on using the CAP1166 in an I2C system, refer to AN 14.0 Dedicated Slave Devices in I2C Systems. FIGURE 4-1: SMBus Timing Diagram SMDATA SMCLK TLOW TRISE THIGH TFALL TBUF THD:STA P S S - Start Condition P - Stop Condition THD:DAT TSU:DAT TSU:STA THD:STA P TSU:STO S 2015 Microchip Technology Inc. DS00001621B-page 15 CAP1166 1. CAP1166 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. 2. Minimum frequency for SMBus communications is 10kHz. 3. The SMBus slave protocol will reset if the clock is held at a logic ‘0’ for longer than 30ms. This timeout functionality is disabled by default in the CAP1166 and can be enabled by writing to the TIMEOUT bit. I2C does not have a timeout. 4. The SMBus slave protocol will reset if both the clock and data lines are held at a logic ‘1’ for longer than 200µs (idle condition). This function is disabled by default in the CAP1166 and can be enabled by writing to the TIMEOUT bit. I2C does not have an idle condition. 5. I2C devices do not support the Alert Response Address functionality (which is optional for SMBus). 6. I2C devices support block read and write differently. I2C protocol allows for unlimited number of bytes to be sent in either direction. The SMBus protocol requires that an additional data byte indicating number of bytes to read / write is transmitted. The CAP1166 supports I2C formatting only. 4.3 SMBus Protocols The CAP1166 is SMBus 2.0 compatible and supports Write Byte, Read Byte, Send Byte, and Receive Byte as valid protocols as shown below. All of the below protocols use the convention in Table 4-2. 4.3.1 SMBUS WRITE BYTE The Write Byte is used to write one byte of data to a specific register as shown in Table 4-3. 4.3.2 SMBUS READ BYTE The Read Byte protocol is used to read one byte of data from the registers as shown in Table 4-4. 4.3.3 SMBUS SEND BYTE The Send Byte protocol is used to set the internal address register pointer to the correct address location. No data is transferred during the Send Byte protocol as shown in Table 4-5. APPLICATION NOTE: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). TABLE 4-2: PROTOCOL FORMAT Data Sent to Device Data Sent to the HOst Data sent Data sent TABLE 4-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 TABLE 4-4: READ BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data NACK Stop 1->0 YYYY_YYY 0 0 XXh 0 1 ->0 YYYY_YYY 1 0 XXh 1 0 -> 1 TABLE 4-5: SEND BYTE PROTOCOL Start Slave Address WR ACK Register Address ACK Stop 1 -> 0 YYYY_YYY 0 0 XXh 0 0 -> 1 CAP1166 DS00001621B-page 16 2015 Microchip Technology Inc. 4.3.4 SMBUS RECEIVE BYTE The Receive Byte protocol is used to read data from a register when the internal register address pointer is known to be at the right location (e.g., set via Send Byte). This is used for consecutive reads of the same register as shown in Table 4-6. APPLICATION NOTE: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). 4.4 I2C Protocols The CAP1166 supports I2C Block Write and Block Read. The protocols listed below use the convention in Table 4-2. 4.4.1 BLOCK WRITE The Block Write is used to write multiple data bytes to a group of contiguous registers as shown in Table 4-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. 4.4.2 BLOCK READ The Block Read is used to read multiple data bytes from a group of contiguous registers as shown in Table 4-8. APPLICATION NOTE: When using the Block Read protocol, the internal address pointer will be automatically incremented after every data byte is received. It will wrap from FFh to 00h. 4.5 SPI Interface The SMBus has a predefined packet structure, the SPI does not. The SPI Bus can operate in two modes of operation, normal 4-wire mode and bi-directional 3-wire mode. All SPI commands consist of 8-bit packets sent to a specific slave device (identified by the CS pin). The SPI bus will latch data on the rising edge of the clock and the clock and data both idle high. All commands are supported via both operating modes. The supported commands are: Reset Serial interface, set address pointer, write command and read command. Note that all other codes received during the command phase are ignored and have no effect on the operation of the device. TABLE 4-6: RECEIVE BYTE PROTOCOL Start Slave Address RD ACK Register Data NACK Stop 1 -> 0 YYYY_YYY 1 0 XXh 1 0 -> 1 TABLE 4-7: BLOCK WRITE PROTOCOL Start Slave Address WR ACK Register Address ACK Register Data ACK 1 ->0 YYYY_YYY 0 0 XXh 0 XXh 0 Register Data ACK Register Data ACK . . . Register Data ACK Stop XXh 0 XXh 0 . . . XXh 0 0 -> 1 TABLE 4-8: BLOCK READ PROTOCOL Start Slave Address WR ACK Register Address ACK Start Slave Address RD ACK Register Data 1->0 YYYY_YYY 0 0 XXh 0 1 ->0 YYYY_YYY 1 0 XXh ACK Register Data ACK Register Data ACK Register Data ACK . . . Register Data NACK Stop 0 XXh 0 XXh 0 XXh 0 . . . XXh 1 0 -> 1 2015 Microchip Technology Inc. DS00001621B-page 17 CAP1166 4.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 CAP1166 SPI_MOSI data line and reading data on the SPI_MISO data line. Both communications occur simultaneously which allows for larger throughput of data transactions. All basic transfers consist of two 8 bit transactions from the Master device while the slave device is simultaneously sending data at the current address pointer value. Data writes consist of two or more 8-bit transactions. The host sends a specific write command followed by the data to write the address pointer. Data reads consist of one or more 8-bit transactions. The host sends the specific read data command and continues clocking for as many data bytes as it wishes to receive. 4.5.2 SPI BI-DIRECTIONAL MODE In the bi-directional mode of operation, the SPI data signals are combined into the SPI_MSIO line, which is shared for data received by the device and transmitted by the device. The protocol uses a simple handshake and turn around sequence for data communications based on the number of clocks transmitted during each phase. All basic transfers consist of two 8 bit transactions. The first is an 8 bit command phase driven by the Master device. The second is by an 8 bit data phase driven by the Master for writes, and by the CAP1166 for read operations. The auto increment feature of the address pointer allows for successive reads or writes. The address pointer will return to 00h after reaching FFh. 4.5.3 SPI_CS# PIN The SPI Bus is a single master, multiple slave serial bus. Each slave has a dedicated CS pin (chip select) that the master asserts low to identify that the slave is being addressed. There are no formal addressing options. 4.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. 4.5.5 SPI TIMEOUT The CAP1166 does not detect any timeout conditions on the SPI bus. FIGURE 4-2: SPI Timing SPI_MSIO or SPI_MOSI or SPI_MISO SPI_CLK tLOW tRISE tHIGH tFALL tD:CLK tHD:DAT tSU:DAT tP 2015 Microchip Technology Inc. DS00001621B-page 18 CAP1166 4.6 Normal SPI Protocols When operating in normal mode, the SPI bus internal address pointer is incremented depending upon which command has been transmitted. Multiple commands may be transmitted sequentually so long as the SPI_CS# pin is asserted low. Figure 4-3 shows an example of this operation. 4.6.1 RESET INTERFACE Resets the Serial interface whenever two successive 7Ah codes are received. Regardless of the current phase of the transaction - command or data, the receipt of the successive reset commands resets the Serial communication interface only. All other functions are not affected by the reset operation. FIGURE 4-3: Example SPI Bus Communication - Normal Mode SPI_CS# SPI_MISO SPI_MOSI SPI Address Pointer SPI Data output buffer Register Address / Data 7Ah XXh (invalid) XXh (invalid) YYh (invalid) 7Ah 7Dh 41h YYh (invalid) 7Eh 66h XXh (invalid) 45h 7Dh 41h AAh (invalid) AAh (invalid) 7Fh 7Fh 55h (invalid) 66h 7Fh AAh 7Dh 43h 40h 78h 7Fh XXh (invalid) 7Fh 56h 40h / 56h 41h / 45h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 45h 40h / 56h 41h / 45h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 42h AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 55h 7Fh AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 41h 66h 42h AAh 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 44h 80h 40h 80h 40h 56h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 43h 55h 7Fh 7Fh 55h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h /78h 80h 45h 43h 46h 78h 40h / 56h 41h / 66h 42h / AAh 43h / 55h 44h / 80h 45h / 43h 46h / 78h 00h XXh Indicates SPI Address pointer incremented 2015 Microchip Technology Inc. DS00001621B-page 19 CAP1166 4.6.2 SET ADDRESS POINTER The Set Address Pointer command sets the Address pointer for subsequent reads and writes of data. The pointer is set on the rising edge of the final data bit. At the same time, the data that is to be read is fetched and loaded into the internal output buffer but is not transmitted. 4.6.3 WRITE DATA The Write Data protocol updates the contents of the register referenced by the address pointer. As the command is processed, the data to be read is fetched and loaded into the internal output buffer but not transmitted. Then, the register is updated with the data to be written. Finally, the address pointer is incremented. FIGURE 4-4: SPI Reset Interface Command - Normal Mode FIGURE 4-5: SPI Set Address Pointer Command - Normal Mode Master SPDOUT SPI_MOSI SPI_CS# SPI_CLK Reset - 7Ah Reset - 7Ah Invalid register data 00h – Internal Data buffer empty SPI_MISO Master Drives Slave Drives ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘1’ ‘0’ Master SPDOUT SPI_MOSI Register Address SPI_CS# SPI_CLK Set Address Pointer – 7Dh SPI_MISO Unknown, Invalid Data Unknown, Invalid Data Master Drives Slave Drives Address pointer set ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ CAP1166 DS00001621B-page 20 2015 Microchip Technology Inc. 4.6.4 READ DATA The Read Data protocol is used to read data from the device. During the normal mode of operation, while the device is receiving data, the CAP1166 is simultaneously transmitting data to the host. For the Set Address commands and the Write Data commands, this data may be invalid and it is recommended that the Read Data command is used. FIGURE 4-6: SPI Write Command - Normal Mode FIGURE 4-7: SPI Read Command - Normal Mode Master SPDOUT SPI_MOSI Data to Write SPI_CS# SPI_CLK Write Command – 7Eh Unknown, Invalid Data Old Data at Current Address Pointer SPI_MISO Master Drives Slave Drives 1. Data written at current address pointer 2. Address pointer incremented Master SPDOUT SPI_MOSI Master Drives Slave Drives SPI_CLK First Read Command – 7Fh SPI_CS# SPI_MISO Invalid, Unknown Data * ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Subsequent Read Commands – 7F Data at Current Address Pointer Address Pointer Incremented ** ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ * The first read command after any other command will return invalid data for the first byte. Subsequent read commands will return the data at the Current Address Pointer ** The Address Pointer is incremented 8 clocks after the Read Command has been received. Therefore continually sending Read Commands will result in each command reporting new data. Once Read Commands have been finished, the last data byte will be read during the next 8 clocks for any command 2015 Microchip Technology Inc. DS00001621B-page 21 CAP1166 4.7 Bi-Directional SPI Protocols 4.7.1 RESET INTERFACE Resets the Serial interface whenever two successive 7Ah codes are received. Regardless of the current phase of the transaction - command or data, the receipt of the successive reset commands resets the Serial communication interface only. All other functions are not affected by the reset operation. 4.7.2 SET ADDRESS POINTER Sets the address pointer to the register to be accessed by a read or write command. This command overrides the autoincrementing of the address pointer. FIGURE 4-8: SPI Read Command - Normal Mode - Full FIGURE 4-9: SPI Reset Interface Command - Bi-directional Mode Master SPDOUT SPI_MOSI Master Drives Slave Drives SPI_CLK Read Command – 7Fh SPI_CS# Data at previously set register address = current address pointer SPI_MISO ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Data at previously set register address = current address pointer (SPI) XXh 1. Register Read Address updated to Current SPI Read Address pointer 1. Register data loaded into output buffer = data at current address pointer 1. Output buffer transmitted = data at previous address pointer + 1 = current address pointer 1. Register Read Address incremented = current address pointer + 1 1. SPI Read Address Incremented = new current address pointer 2. Register Read Address Incremented = current address pointer +1 Register Data loaded into Output buffer = data at current address pointer + 1 1. Output buffer transmitted = data at current address pointer + 1 2. Flag set to increment SPI Read Address at end of next 8 clocks ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Data at previously set register address = current address pointer (SPI) 1. Register data loaded into output buffer = data at current address pointer 1. Output buffer transmitted = data at previous register address pointer + 1 = current address pointer 1. Output buffer transmitted = data at current address pointer + 1 2. Flag set to increment SPI Read Address at end of next 8 clocks Subsequent Read Commands – 7Fh 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 Master SPDOUT SPI_MSIO SPI_CS# SPI_CLK Reset - 7Ah Reset - 7Ah ‘0’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ CAP1166 DS00001621B-page 22 2015 Microchip Technology Inc. 4.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. 4.7.4 READ DATA Reads data referenced by the address pointer. Performs auto increment of address pointer after the data is transferred to the Master. FIGURE 4-10: SPI Set Address Pointer Command - Bi-directional Mode FIGURE 4-11: SPI Write Data Command - Bi-directional Mode FIGURE 4-12: SPI Read Data Command - Bi-directional Mode Master SPDOUT SPI_MSIO Register Address SPI_CS# SPI_CLK Set Address Pointer – 7Dh ‘0’ ‘1’ ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ Master SPDOUT SPI_MSIO Register Write Data SPI_CS# SPI_CLK Write Command – 7Eh ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘0’ Master SPDOUT SPI_MSIO Master Drives Slave Drives Indeterminate Register Read Data SPI_CLK Read Command – 7Fh SPI_CS# ‘0’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ 2015 Microchip Technology Inc. DS00001621B-page 23 CAP1166 4.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 8051’s SFR space. Refer to documentation for the BC-Link compatible host controller for details on how to access the CAP1166 via the BCLink Interface. 2015 Microchip Technology Inc. DS00001621B-page 24 CAP1166 5.0 GENERAL DESCRIPTION The CAP1166 is a multiple channel Capacitive Touch sensor with multiple power LED drivers. It contains six (6) 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. The CAP1166 also contains six (6) low side (or push-pull) LED drivers that offer full-on / off, variable rate blinking, dimness controls, and breathing. Each of the LED drivers may be linked to one of the sensor inputs to be actuated when a touch is detected. As well, each LED driver may be individually controlled via a host controller. Finally, the device contains a dedicated RESET pin to act as a soft reset by the system. The CAP1166 offers multiple power states. It operates at the lowest quiescent current during its Deep Sleep state. In the low power Standby state, it can monitor one or more channels and respond to communications normally. The device contains a wake pin (WAKE/SPI_MOSI) output to wake the system when a touch is detected in Standby and to wake the device from Deep Sleep. The device communicates with a host controller using the SPI bus, or via SMBus / I2C. The host controller may poll the device for updated information at any time or it may configure the device to flag an interrupt whenever a touch is detected on any sensor pad. A typical system diagram is shown in Figure 5-1. CAP1166 DS00001621B-page 25 2015 Microchip Technology Inc. 5.1 Power States The CAP1166 has three operating states depending on the status of the STBY and DSLEEP bits. When the device transitions between power states, previously detected touches (for inactive channels) are cleared and the status bits reset. 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 6.20 through Section 6.22). Interrupts will still be generated based on the active channels. The device will still respond to communications normally and can be returned to the Fully FIGURE 5-1: System Diagram for CAP1166 CAP1166 CS4 SMDATA / BC_DATA / SPI_MSIO / SPI_MISO SMCLK / BC_CLK / SPI_CLK VDD Embedded Controller ALERT# / BC_IRQ# CS5 CS6 3.3V – 5V CS3 CS2 CS1 WAKE / SPI_MOSI RESET SPI_CS# ADDR_COMM LED6 LED5 LED4 LED1 LED2 LED3 3.3V – 5V Touch Button Touch Button Touch Button Touch Button Touch Button Touch Button 2015 Microchip Technology Inc. DS00001621B-page 26 CAP1166 Active state of operation by clearing the STBY bit. 3. Deep Sleep - The device is in its lowest power state. It is not monitoring any capacitive sensor inputs and not driving any LEDs. All LEDs will be driven to their programmed non-actuated state and no PWM operations will be done. While in Deep Sleep, the device can be awakened by SMBus or SPI communications targeting the device. This will not cause the DSLEEP to be cleared so the device will return to Deep Sleep once all communications have stopped. If the device is not communicating via the 4-wire SPI bus, then during this state of operation, if the WAKE/SPI_MOSI pin is driven high by an external source, the device will clear the DSLEEP bit and return to Fully Active. APPLICATION NOTE: In the Deep Sleep state, the LED output will be either high or low and will not be PWM’d at the min or max duty cycle. 5.2 RESET Pin The RESET pin is an active high reset that is driven from an external source. While it is asserted high, all the internal blocks will be held in reset including the communications protocol used. No capacitive touch sensor inputs will be sampled and the LEDs will not be driven. All configuration settings will be reset to default states and all readings will be cleared. The device will be held in Deep Sleep that can only be removed by driving the RESET pin low. This will cause the RESET status bit to be set to a logic ‘1’ and generate an interrupt. 5.3 WAKE/SPI_MOSI Pin Operation The WAKE / SPI_MOSI pin is a multi-function pin depending on device operation. When the device is configured to communicate using the 4-wire SPI bus, this pin is an input. However, when the CAP1166 is placed in Standby and is not communicating using the 4-wire SPI protocol, the WAKE pin is an active high output. In this condition, the device will assert the WAKE/SPI_MOSI pin when a touch is detected on one of its sampled sensor inputs. The pin will remain asserted until the INT bit has been cleared and then it will be de-asserted. When the CAP1166 is placed in Deep Sleep and it is not communicating using the 4-wire SPI protocol, the WAKE/SPI_- MOSI pin is monitored by the device as an input. If the WAKE/SPI_MOSI pin is driven high by an external source, the CAP1166will clear the DSLEEP bit causing the device to return to Fully Active. When the device is placed in Deep Sleep, this pin is a High-Z input and must have a pull-down resistor to GND for proper operation. 5.4 LED Drivers The CAP1166 contains six (6) LED drivers. Each LED driver can be linked to its respective capacitive touch sensor input or it can be controlled by the host. Each LED driver can be configured to operate in one of the following modes with either push-pull or open drain drive. 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. This behavior may be actuated when a press is detected or when a release is detected. 3. Pulse 2 - The LED is configured to “Pulse” while actuated and then “Pulse” a programmable number of times with programmable rate and min / max brightness when the sensor pad is released. 4. Breathe - The LED is configured to transition continuously ON-OFF-ON (i.e. to “Breathe”) with a programmable rate and min / max brightness. When an LED is not linked to a sensor and is actuated by the host, there’s an option to assert the ALERT# pin when the initiated LED behavior has completed. 5.4.1 LINKING LEDS TO CAPACITIVE TOUCH SENSOR INPUTS All LEDs can be linked to the corresponding capacitive touch sensor input so that when the sensor input detects a touch, the corresponding LED will be actuated at one of the programmed responses. CAP1166 DS00001621B-page 27 2015 Microchip Technology Inc. 5.5 Capacitive Touch Sensing The CAP1166 contains six (6) independent capacitive touch sensor inputs. Each sensor input has dynamic range to detect a change of capacitance due to a touch. Additionally, each sensor input can be configured to be automatically and routinely re-calibrated. 5.5.1 SENSING CYCLE Each capacitive touch sensor input has controls to be activated and included in the sensing cycle. When the device is active, it automatically initiates a sensing cycle and repeats the cycle every time it finishes. The cycle polls through each active sensor input starting with CS1 and extending through CS6. As each capacitive touch sensor input is polled, its measurement is compared against a baseline “Not Touched” measurement. If the delta measurement is large enough, a touch is detected and an interrupt is generated. The sensing cycle time is programmable (see Section 6.10, "Averaging and Sampling Configuration Register"). 5.5.2 RECALIBRATING SENSOR INPUTS There are various options for recalibrating the capacitive touch sensor inputs. Recalibration re-sets the Base Count Registers (Section 6.24, "Sensor Input Base Count Registers") which contain the “not touched” values used for touch detection comparisons. APPLICATION NOTE: The device will recalibrate all sensor inputs that were disabled when it transitions from Standby. Likewise, the device will recalibrate all sensor inputs when waking out of Deep Sleep. 5.5.2.1 Manual Recalibration The Calibration Activate Registers (Section 6.11, "Calibration Activate Register") force recalibration of selected sensor inputs. When a bit is set, the corresponding capacitive touch sensor input will be recalibrated (both analog and digital). The bit is automatically cleared once the recalibration routine has finished. 5.5.2.2 Automatic Recalibration Each sensor input is regularly recalibrated at a programmable rate (see Section 6.17, "Recalibration Configuration Register"). By default, the recalibration routine stores the average 64 previous measurements and periodically updates the base “not touched” setting for the capacitive touch sensor input. 5.5.2.3 Negative Delta Count Recalibration It is possible that the device loses sensitivity to a touch. This may happen as a result of a noisy environment, an accidental recalibration during a touch, or other environmental changes. When this occurs, the base untouched sensor input may generate negative delta count values. The NEG_DELTA_CNT bits (see Section 6.17, "Recalibration Configuration Register") can be set to force a recalibration after a specified number of consecutive negative delta readings. 5.5.2.4 Delayed Recalibration It is possible that a “stuck button” occurs when something is placed on a button which causes a touch to be detected for a long period. By setting the MAX_DUR_EN bit (see Section 6.6, "Configuration Registers"), a recalibration can be forced when a touch is held on a button for longer than the duration specified in the MAX_DUR bits (see Section 6.8, "Sensor Input Configuration Register"). 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. Note: Automatic recalibration only works when the delta count is below the active sensor input threshold. It is disabled when a touch is detected. Note: During this recalibration, the device will not respond to touches. 2015 Microchip Technology Inc. DS00001621B-page 28 CAP1166 5.5.3 PROXIMITY DETECTION Each sensor input can be configured to detect changes in capacitance due to proximity of a touch. This circuitry detects the change of capacitance that is generated as an object approaches, but does not physically touch, the enabled sensor pad(s). When a sensor input is selected to perform proximity detection, it will be sampled from 1x to 128x per sampling cycle. The larger the number of samples that are taken, the greater the range of proximity detection is available at the cost of an increased overall sampling time. 5.5.4 MULTIPLE TOUCH PATTERN DETECTION The multiple touch pattern (MTP) detection circuitry can be used to detect lid closure or other similar events. An event can be flagged based on either a minimum number of sensor inputs or on specific sensor inputs simultaneously exceeding an MTP threshold or having their Noise Flag Status Register bits set. An interrupt can also be generated. During an MTP event, all touches are blocked (see Section 6.15, "Multiple Touch Pattern Configuration Register"). 5.5.5 LOW FREQUENCY NOISE DETECTION Each sensor input has an EMI noise detector that will sense if low frequency noise is injected onto the input with sufficient power to corrupt the readings. If this occurs, the device will reject the corrupted sample and set the corresponding bit in the Noise Status register to a logic ‘1’. 5.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. 5.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. Whenever an interrupt is generated, the INT bit (see Section 6.1, "Main Control Register") is set. The ALERT# pin is cleared when the INT bit is cleared by the user. Additionally, when the INT bit is cleared by the user, status bits are only cleared if no touch is detected. 5.6.1 SENSOR INTERRUPT BEHAVIOR The sensor interrupts are generated in one of two ways: 1. An interrupt is generated when a touch is detected and, as a user selectable option, when a release is detected (by default - see Section 6.6). See Figure 5-3. 2. If the repeat rate is enabled then, so long as the touch is held, another interrupt will be generated based on the programmed repeat rate (see Figure 5-2). When the repeat rate is enabled, the device uses an additional control called MPRESS that determines whether a touch is flagged as a simple “touch” or a “press and hold”. The MPRESS[3:0] bits set a minimum press timer. When the button is touched, the timer begins. If the sensor pad is released before the minimum press timer expires, it is flagged as a touch and an interrupt is generated upon release. If the sensor input detects a touch for longer than this timer value, it is flagged as a “press and hold” event. So long as the touch is held, interrupts will be generated at the programmed repeat rate and upon release (if enabled). APPLICATION NOTE: Figure 5-2 and Figure 5-3 show default operation which is to generate an interrupt upon sensor pad release and an active-low ALERT# pin. APPLICATION NOTE: The host may need to poll the device twice to determine that a release has been detected. Note: Delayed recalibration only works when the delta count is above the active sensor input threshold. If enabled, it is invoked when a sensor pad touch is held longer than the MAX_DUR bit setting. CAP1166 DS00001621B-page 29 2015 Microchip Technology Inc. FIGURE 5-2: Sensor Interrupt Behavior - Repeat Rate Enabled FIGURE 5-3: Sensor Interrupt Behavior - No Repeat Rate Enabled Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Min Press Setting (280ms) Interrupt on Touch Button Repeat Rate (175ms) Button Repeat Rate (175ms) Interrupt on Release (optional) ALERT# pin (active low) Touch Detected INT bit Button Status Write to INT bit Polling Cycle (35ms) Interrupt on Touch Interrupt on Release (optional) ALERT# pin (active low) 2015 Microchip Technology Inc. DS00001621B-page 30 CAP1166 6.0 REGISTER DESCRIPTION The registers shown in Table 6-1 are accessible through the communications protocol. An entry of ‘-’ indicates that the bit is not used and will always read ‘0’. TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER Register Address R/W Register Name Function Default Value Page 00h R/W Main Control Controls general power states and power dissipation 00h Page 33 02h R General Status Stores general status bits 00h Page 34 03h R Sensor Input Status Returns the state of the sampled capacitive touch sensor inputs 00h Page 34 04h R LED Status Stores status bits for LEDs 00h Page 34 0Ah R Noise Flag Status Stores the noise flags for sensor inputs 00h Page 35 10h R Sensor Input 1 Delta Count Stores the delta count for CS1 00h Page 35 11h R Sensor Input 2 Delta Count Stores the delta count for CS2 00h Page 35 12h R Sensor Input 3 Delta Count Stores the delta count for CS3 00h Page 35 13h R Sensor Input 4 Delta Count Stores the delta count for CS4 00h Page 35 14h R Sensor Input 5 Delta Count Stores the delta count for CS5 00h Page 35 15h R Sensor Input 6 Delta Count Stores the delta count for CS6 00h Page 35 1Fh R/W Sensitivity Control Controls the sensitivity of the threshold and delta counts and data scaling of the base counts 2Fh Page 36 20h R/W Configuration Controls general functionality 20h Page 37 21h R/W Sensor Input Enable Controls whether the capacitive touch sensor inputs are sampled 3Fh Page 38 22h R/W Sensor Input Configuration Controls max duration and auto-repeat delay for sensor inputs operating in the full power state A4h Page 39 23h R/W Sensor Input Configuration 2 Controls the MPRESS controls for all sensor inputs 07h Page 40 24h R/W Averaging and Sampling Config Controls averaging and sampling window 39h Page 41 26h R/W Calibration Activate Forces re-calibration for capacitive touch sensor inputs 00h Page 42 27h R/W Interrupt Enable Enables Interrupts associated with capacitive touch sensor inputs 3Fh Page 42 28h R/W Repeat Rate Enable Enables repeat rate for all sensor inputs 3Fh Page 43 2Ah R/W Multiple Touch Configuration Determines the number of simultaneous touches to flag a multiple touch condition 80h Page 43 2Bh R/W Multiple Touch Pattern Configuration Determines the multiple touch pattern (MTP) configuration 00h Page 44 CAP1166 DS00001621B-page 31 2015 Microchip Technology Inc. 2Dh R/W Multiple Touch Pattern Determines the pattern or number of sensor inputs used by the MTP circuitry 3Fh Page 45 2Fh R/W Recalibration Configuration Determines re-calibration timing and sampling window 8Ah Page 45 30h R/W Sensor Input 1 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 1 40h Page 47 31h R/W Sensor Input 2 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 2 40h Page 47 32h R/W Sensor Input 3 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 3 40h Page 47 33h R/W Sensor Input 4 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 4 40h Page 47 34h R/W Sensor Input 5 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 5 40h Page 47 35h R/W Sensor Input 6 Threshold Stores the delta count threshold to determine a touch for Capacitive Touch Sensor Input 6 40h Page 47 38h R/W Sensor Input Noise Threshold Stores controls for selecting the noise threshold for all sensor inputs 01h Page 47 Standby Configuration Registers 40h R/W Standby Channel Controls which sensor inputs are enabled while in standby 00h Page 47 41h R/W Standby Configuration Controls averaging and cycle time while in standby 39h Page 48 42h R/W Standby Sensitivity Controls sensitivity settings used while in standby 02h Page 49 43h R/W Standby Threshold Stores the touch detection threshold for active sensor inputs in standby 40h Page 50 44h R/W Configuration 2 Stores additional configuration controls for the device 40h Page 37 Base Count Registers 50h R Sensor Input 1 Base Count Stores the reference count value for sensor input 1 C8h Page 50 51h R Sensor Input 2 Base Count Stores the reference count value for sensor input 2 C8h Page 50 52h R Sensor Input 3 Base Count Stores the reference count value for sensor input 3 C8h Page 50 53h R Sensor Input 4 Base Count Stores the reference count value for sensor input 4 C8h Page 50 54h R Sensor Input 5 Base Count Stores the reference count value for sensor input 5 C8h Page 50 55h R Sensor Input 6 Base Count Stores the reference count value for sensor input 6 C8h Page 50 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page 2015 Microchip Technology Inc. DS00001621B-page 32 CAP1166 LED Controls 71h R/W LED Output Type Controls the output type for the LED outputs 00h Page 50 72h R/W Sensor Input LED Linking Controls linking of sensor inputs to LED channels 00h Page 51 73h R/W LED Polarity Controls the output polarity of LEDs 00h Page 51 74h R/W LED Output Control Controls the output state of the LEDs 00h Page 52 77h R/W Linked LED Transition Control Controls the transition when LEDs are linked to CS channels 00h Page 53 79h R/W LED Mirror Control Controls the mirroring of duty cycles for the LEDs 00h Page 54 81h R/W LED Behavior 1 Controls the behavior and response of LEDs 1 - 4 00h Page 55 82h R/W LED Behavior 2 Controls the behavior and response of LEDs 5 - 6 00h Page 55 84h R/W LED Pulse 1 Period Controls the period of each breathe during a pulse 20h Page 56 85h R/W LED Pulse 2 Period Controls the period of the breathing during breathe and pulse operation 14h Page 58 86h R/W LED Breathe Period Controls the period of an LED breathe operation 5Dh Page 59 88h R/W LED Config Controls LED configuration 04h Page 59 90h R/W LED Pulse 1 Duty Cycle Determines the min and max duty cycle for the pulse operation F0h Page 60 91h R/W LED Pulse 2 Duty Cycle Determines the min and max duty cycle for breathe and pulse operation F0h Page 60 92h R/W LED Breathe Duty Cycle Determines the min and max duty cycle for the breathe operation F0h Page 60 93h R/W LED Direct Duty Cycle Determines the min and max duty cycle for Direct mode LED operation F0h Page 60 94h R/W LED Direct Ramp Rates Determines the rising and falling edge ramp rates of the LEDs 00h Page 61 95h R/W LED Off Delay Determines the off delay for all LED behaviors 00h Page 61 B1h R Sensor Input 1 Calibration Stores the upper 8-bit calibration value for sensor input 1 00h Page 64 B2h R Sensor Input 2 Calibration Stores the upper 8-bit calibration value for sensor input 2 00h Page 64 B3h R Sensor Input 3 Calibration Stores the upper 8-bit calibration value for sensor input 3 00h Page 64 B4h R Sensor Input 4 Calibration Stores the upper 8-bit calibration value for sensor input 4 00h Page 64 B5h R Sensor Input 5 Calibration Stores the upper 8-bit calibration value for sensor input 5 00h Page 64 B6h R Sensor Input 6 Calibration Stores the upper 8-bit calibration value for sensor input 6 00h Page 64 B9h R Sensor Input Calibration LSB 1 Stores the 2 LSBs of the calibration value for sensor inputs 1 - 4 00h Page 64 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page CAP1166 DS00001621B-page 33 2015 Microchip Technology Inc. During Power-On-Reset (POR), the default values are stored in the registers. A POR is initiated when power is first applied to the part and the voltage on the VDD supply surpasses the POR level as specified in the electrical characteristics. Any reads to undefined registers will return 00h. Writes to undefined registers will not have an effect. When a bit is “set”, this means that the user writes a logic ‘1’ to it. When a bit is “cleared”, this means that the user writes a logic ‘0’ to it. 6.1 Main Control Register The Main Control register controls the primary power state of the device. Bits 7 - 6 - GAIN[1:0] - Controls the gain used by the capacitive touch sensing circuitry. As the gain is increased, the effective sensitivity is likewise increased as a smaller delta capacitance is required to generate the same delta count values. The sensitivity settings may need to be adjusted along with the gain settings such that data overflow does not occur. APPLICATION NOTE: The gain settings apply to both Standby and Active states. 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 6.20). The status registers will not be cleared until read. LEDs that are linked to capacitive touch sensor inputs will remain linked and active. Sensor inputs that are no longer sampled will flag a release and then remain in a non-touched state. LEDs that are manually controlled will be unaffected. • Bit 4 - DSLEEP - Enables Deep Sleep by deactivating all functions. This bit will be cleared when the WAKE pin is driven high. ‘0’ (default) - Sensor input scanning is active and LEDs are functional. • ‘1’ - All sensor input scanning is disabled. All LEDs are driven to their programmed non-actuated state and no PWM operations will be done. The status registers are automatically cleared and the INT bit is cleared. Bit 0 - INT - Indicates that there is an interrupt. When this bit is set, it asserts the ALERT# pin. If a channel detects a touch and its associated interrupt enable bit is not set to a logic ‘1’, no action is taken. BAh R Sensor Input Calibration LSB 2 Stores the 2 LSBs of the calibration value for sensor inputs 5 - 6 00h Page 64 FDh R Product ID Stores a fixed value that identifies each product 51h Page 65 FEh R Manufacturer ID Stores a fixed value that identifies Microchip 5Dh Page 65 FFh R Revision Stores a fixed value that represents the revision number 83h Page 65 TABLE 6-2: MAIN CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 00h R/W Main Control GAIN[1:0] STBY DSLEEP - - - INT 00h TABLE 6-3: GAIN BIT DECODE GAIN[1:0] Capacitive Touch Sensor Gain 1 0 0 0 1 01 2 10 4 11 8 TABLE 6-1: REGISTER SET IN HEXADECIMAL ORDER (CONTINUED) Register Address R/W Register Name Function Default Value Page 2015 Microchip Technology Inc. DS00001621B-page 34 CAP1166 This bit is cleared by writing a logic ‘0’ to it. When this bit is cleared, the ALERT# pin will be deasserted and all status registers will be cleared if the condition has been removed. If the WAKE/SPI_MOSI pin is asserted as a result of a touch detected while in Standby, it will likewise be deasserted when this bit is cleared. Note that the WAKE / SPI_MOSI pin is not driven when communicating via the 4-wire SPI protocol. • ‘0’ - No interrupt pending. • ‘1’ - A touch has been detected on one or more channels and the interrupt has been asserted. 6.2 Status Registers All status bits are cleared when the device enters the Deep Sleep (DSLEEP = ‘1’ - see Section 6.1). 6.2.1 GENERAL STATUS - 02H Bit 4 - LED - Indicates that one or more LEDs have finished their programmed activity. This bit is set if any bit in the LED Status register is set. Bit 3 - RESET - Indicates that the device has come out of reset. This bit is set when the device exits a POR state or when the RESET pin has been deasserted and qualified via the RESET pin filter (see Section 5.2). This bit will cause the INT bit to be set and is cleared when the INT bit is cleared. Bit 2 - MULT - Indicates that the device is blocking detected touches due to the Multiple Touch detection circuitry (see Section 6.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 6.15). This bit will cause the INT bit to be set if the MTP_ALERT bit is also set. This bit will not be cleared until the condition that caused it to be set has been removed. Bit 0 - TOUCH - Indicates that a touch was detected. This bit is set if any bit in the Sensor Input Status register is set. 6.2.2 SENSOR INPUT STATUS - 03H The Sensor Input Status Register stores status bits that indicate a touch has been detected. A value of ‘0’ in any bit indicates that no touch has been detected. A value of ‘1’ in any bit indicates that a touch has been detected. All bits are cleared when the INT bit is cleared and if a touch on the respective capacitive touch sensor input is no longer present. If a touch is still detected, the bits will not be cleared (but this will not cause the interrupt to be asserted - see Section 6.6). Bit 5 - CS6 - Indicates that a touch was detected on Sensor Input 6. This sensor input can be linked to LED6. Bit 4 - CS5 - Indicates that a touch was detected on Sensor Input 5. This sensor input can be linked to LED5. Bit 3 - CS4 - Indicates that a touch was detected on Sensor Input 4. This sensor input can be linked to LED4. Bit 2 - CS3 - Indicates that a touch was detected on Sensor Input 3. This sensor input can be linked to LED3. Bit 1 - CS2 - Indicates that a touch was detected on Sensor Input 2. This sensor input can be linked to LED2. Bit 0 - CS1 - Indicates that a touch was detected on Sensor Input 1. This sensor input can be linked to LED1. 6.2.3 LED STATUS - 04H The LED Status Registers indicate when an LED has completed its configured behavior (see Section 6.31, "LED Behavior Registers") after being actuated by the host (see Section 6.28, "LED Output Control Register"). These bits are ignored when the LED is linked to a capacitive sensor input. All LED Status bits are cleared when the INT bit is cleared. Bit 5 - LED6_DN - Indicates that LED6 has finished its behavior after being actuated by the host. Bit 4 - LED5_DN - Indicates that LED5 has finished its behavior after being actuated by the host. TABLE 6-4: STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 02h R General Status - - - LED RESET MULT MTP TOUCH 00h 03h R Sensor Input Status - - CS6 CS5 CS4 CS3 CS2 CS1 00h 04h R LED Status - - LED6_ DN LED5_ DN LED4_ DN LED3_ DN LED2_ DN LED1_ DN 00h CAP1166 DS00001621B-page 35 2015 Microchip Technology Inc. Bit 3 - LED4_DN - Indicates that LED4 has finished its behavior after being actuated by the host. 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. 6.3 Noise Flag Status Registers The Noise Flag Status registers store status bits that are generated from the analog block if the detected noise is above the operating region of the analog detector or the RF noise detector. These bits indicate that the most recently received data from the sensor input is invalid and should not be used for touch detection. So long as the bit is set for a particular channel, the delta count value is reset to 00h and thus no touch is detected. These bits are not sticky and will be cleared automatically if the analog block does not report a noise error. APPLICATION NOTE: If the MTP detection circuitry is enabled, these bits count as sensor inputs above the MTP threshold (see Section 5.5.4, "Multiple Touch Pattern Detection") even if the corresponding delta count is not. If the corresponding delta count also exceeds the MTP threshold, it is not counted twice. APPLICATION NOTE: Regardless of the state of the Noise Status bits, if low frequency noise is detected on a sensor input, that sample will be discarded unless the DIS_ANA_NOISE bit is set. As well, if RF noise is detected on a sensor input, that sample will be discarded unless the DIS_RF_NOISE bit is set. 6.4 Sensor Input Delta Count Registers 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. The count value represents a change in input due to the capacitance associated with a touch on one of the sensor inputs and is referenced to a calibrated base “Not Touched” count value. The delta is an instantaneous change and is updated once per sensor input per sensing cycle (see Section 5.5.1, "Sensing Cycle"). The value presented is a standard 2’s complement number. In addition, the value is capped at a value of 7Fh. A reading of 7Fh indicates that the sensitivity settings are too high and should be adjusted accordingly (see Section 6.5). The value is also capped at a negative value of 80h for negative delta counts which may result upon a release. TABLE 6-5: NOISE FLAG STATUS REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 0Ah R Noise Flag Status - - CS6_ NOISE CS5_ NOISE CS4_ NOISE CS3_ NOISE CS2_ NOISE CS1_ NOISE 00h TABLE 6-6: SENSOR INPUT DELTA COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 10h R Sensor Input 1 Delta Count Sign 64 32 16 8 4 2 1 00h 11h R Sensor Input 2 Delta Count Sign 64 32 16 8 4 2 1 00h 12h R Sensor Input 3 Delta Count Sign 64 32 16 8 4 2 1 00h 13h R Sensor Input 4 Delta Count Sign 64 32 16 8 4 2 1 00h 14h R Sensor Input 5 Delta Count Sign 64 32 16 8 4 2 1 00h 15h R Sensor Input 6 Delta Count Sign 64 32 16 8 4 2 1 00h 2015 Microchip Technology Inc. DS00001621B-page 36 CAP1166 6.5 Sensitivity Control Register The Sensitivity Control register controls the sensitivity of a touch detection. Bits 6-4 DELTA_SENSE[2:0] - Controls the sensitivity of a touch detection. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the more sensitive settings, touches are detected for a smaller delta capacitance corresponding to a “lighter” touch. These settings are more sensitive to noise, however, and a noisy environment may flag more false touches with higher sensitivity levels. APPLICATION NOTE: A value of 128x is the most sensitive setting available. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely, a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). 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. The scale factor represents the multiplier to the bit-weighting presented in these register descriptions. APPLICATION NOTE: The BASE_SHIFT[3:0] bits normally do not need to be updated. These settings will not affect touch detection or sensitivity. These bits are sometimes helpful in analyzing the Cap Sensing board performance and stability. TABLE 6-7: SENSITIVITY CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 1Fh R/W Sensitivity Control - DELTA_SENSE[2:0] BASE_SHIFT[3:0] 2Fh TABLE 6-8: DELTA_SENSE BIT DECODE DELTA_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 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) TABLE 6-9: BASE_SHIFT BIT DECODE BASE_SHIFT[3:0] Data Scaling Factor 32 1 0 0 0 0 0 1x 0 0 0 1 2x 0 0 1 0 4x 0 0 1 1 8x 0 1 0 0 16x 0 1 0 1 32x 0 1 1 0 64x CAP1166 DS00001621B-page 37 2015 Microchip Technology Inc. 6.6 Configuration Registers The Configuration registers control general global functionality that affects the entire device. 6.6.1 CONFIGURATION - 20H Bit 7 - TIMEOUT - Enables the timeout and idle functionality of the SMBus protocol. • ‘0’ (default for Functional Revision C) - The SMBus timeout and idle functionality are disabled. The SMBus interface will not time out if the clock line is held low. Likewise, it will not reset if both the data and clock lines are held high for longer than 200us. This is used for I2C compliance. • ‘1’ (default for Functional Revision B) - The SMBus timeout and idle functionality are enabled. The SMBus interface will time out if the clock line is held low for longer than 30ms. Likewise, it will reset if both the data and clock lines are held high for longer than 200us. Bit 6 - WAKE_CFG - Configures the operation of the WAKE pin. • ‘0’ (default) - The WAKE pin is not asserted when a touch is detected while the device is in Standby. It will still be used to wake the device from Deep Sleep when driven high. • ‘1’ - The WAKE pin will be asserted high when a touch is detected while the device is in Standby. It will also be used to wake the device from Deep Sleep when driven high. Bit 5 - DIS_DIG_NOISE - Determines whether the digital noise threshold (see Section 6.19, "Sensor Input Noise Threshold Register") is used by the device. Setting this bit disables the feature. • ‘0’ - The digital noise threshold is used. If a delta count value exceeds the noise threshold but does not exceed the touch threshold, the sample is discarded and not used for the automatic re-calibration routine. • ‘1’ (default) - The noise threshold is disabled. Any delta count that is less than the touch threshold is used for the automatic re-calibration routine. Bit 4 - DIS_ANA_NOISE - Determines whether the analog noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If low frequency noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if low frequency noise is detected. Bit 3 - MAX_DUR_EN - Determines whether the maximum duration recalibration is enabled. • ‘0’ (default) - The maximum duration recalibration functionality is disabled. A touch may be held indefinitely and no re-calibration will be performed on any sensor input. • ‘1’ - The maximum duration recalibration functionality is enabled. If a touch is held for longer than the MAX_DUR bit settings, then the re-calibration routine will be restarted (see Section 6.8). 0 1 1 1 128x 1 0 0 0 256x All others 256x (default = 1111b) TABLE 6-10: CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 20h R/W Configuration TIMEOUT WAKE_ CFG DIS_ DIG_ NOISE DIS_ ANA_ NOISE MAX_ DUR_EN - -- A0h (Rev B) 20h (rev C) 44h R/W Configuration 2 INV_LINK_ TRAN ALT_ POL BLK_PWR_ CTRL BLK_POL_ MIR SHOW_ RF_ NOISE DIS_ RF_ NOISE - INT_ REL_n 40h TABLE 6-9: BASE_SHIFT BIT DECODE (CONTINUED) BASE_SHIFT[3:0] Data Scaling Factor 32 1 0 2015 Microchip Technology Inc. DS00001621B-page 38 CAP1166 6.6.2 CONFIGURATION 2 - 44H Bit 7 - INV_LINK_TRAN - Determines the behavior of the Linked LED Transition controls (see Section 6.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. • ‘0’ - The ALERT# pin is active high and push-pull. • ‘1’ (default) - The ALERT# pin is active low and open drain. Bit 5 - BLK_PWR_CTRL - Determines whether the device will reduce power consumption while waiting between conversion time completion and the end of the polling cycle. • ‘0’ (default) - The device will always power down as much as possible during the time between the end of the last conversion and the end of the polling cycle. • ‘1’ - The device will not power down the Cap Sensor during the time between the end of the last conversion and the end of the polling cycle. Bit 4 - BLK_POL_MIR - Determines whether the LED Mirror Control register bits are linked to the LED Polarity bits. Setting this bit blocks the normal behavior which is to automatically set and clear the LED Mirror Control bits when the LED Polarity bits are set or cleared. • ‘0’ (default) - When the LED Polarity controls are set, the corresponding LED Mirror control is automatically set. Likewise, when the LED Polarity controls are cleared, the corresponding LED Mirror control is also cleared. • ‘1’ - When the LED Polarity controls are set, the corresponding LED Mirror control is not automatically set. Bit 3 - SHOW_RF_NOISE - Determines whether the Noise Status bits will show RF Noise as the only input source. • ‘0’ (default) - The Noise Status registers will show both RF noise and low frequency EMI noise if either is detected on a capacitive touch sensor input. • ‘1’ - The Noise Status registers will only show RF noise if it is detected on a capacitive touch sensor input. EMI noise will still be detected and touches will be blocked normally; however, the status bits will not be updated. Bit 2 - DIS_RF_NOISE - Determines whether the RF noise filter is enabled. Setting this bit disables the feature. • ‘0’ (default) - If RF noise is detected by the analog block, the delta count on the corresponding channel is set to 0. Note that this does not require that Noise Status bits be set. • ‘1’ - A touch is not blocked even if RF noise is detected. Bit 0 - INT_REL_n - Controls the interrupt behavior when a release is detected on a button. • ‘0’ (default) - An interrupt is generated when a press is detected and again when a release is detected and at the repeat rate (if enabled - see Section 6.13). • ‘1’ - An interrupt is generated when a press is detected and at the repeat rate but not when a release is detected. 6.7 Sensor Input Enable Registers 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. Bit 5 - CS6_EN - Enables the CS6 input to be included during the sampling cycle. • ‘0’ - The CS6 input is not included in the sampling cycle. • ‘1’ (default) - The CS6 input is included in the sampling cycle. Bit 4 - CS5_EN - Enables the CS5 input to be included during the sampling cycle. Bit 3 - CS4_EN - Enables the CS4 input to be included during the sampling cycle. Bit 2 - CS3_EN - Enables the CS3 input to be included during the sampling cycle. TABLE 6-11: SENSOR INPUT ENABLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 21h R/W Sensor Input Enable - - CS6_EN CS5_EN CS4_EN CS3_EN CS2_EN CS1_EN 3Fh CAP1166 DS00001621B-page 39 2015 Microchip Technology Inc. Bit 1 - CS2_EN - Enables the CS2 input to be included during the sampling cycle. Bit 0 - CS1_EN - Enables the CS1 input to be included during the sampling cycle. 6.8 Sensor Input Configuration Register The Sensor Input Configuration Register controls timings associated with the Capacitive sensor inputs 1 - 6. Bits 7 - 4 - MAX_DUR[3:0] - (default 1010b) - Determines the maximum time that a sensor pad is allowed to be touched until the capacitive touch sensor input is recalibrated, as shown in Table 6-13. Bits 3 - 0 - RPT_RATE[3:0] - (default 0100b) Determines the time duration between interrupt assertions when auto repeat is enabled. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-14. TABLE 6-12: SENSOR INPUT CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 22h R/W Sensor Input Configuration MAX_DUR[3:0] RPT_RATE[3:0] A4h TABLE 6-13: MAX_DUR BIT DECODE MAX_DUR[3:0] Time Before Recalibration 32 1 0 0 0 0 0 560ms 0 0 0 1 840ms 0 0 1 0 1120ms 0 0 1 1 1400ms 0 1 0 0 1680ms 0 1 0 1 2240ms 0 1 1 0 2800ms 1 1 1 3360ms 1 0 0 0 3920ms 1 0 0 1 4480ms 1 0 1 0 5600ms (default) 1 0 1 1 6720ms 1 1 0 0 7840ms 1 1 0 1 8906ms 1 1 1 0 10080ms 1 1 1 1 11200ms TABLE 6-14: RPT_RATE BIT DECODE RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms (default) 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms 2015 Microchip Technology Inc. DS00001621B-page 40 CAP1166 6.9 Sensor Input Configuration 2 Register Bits 3 - 0 - M_PRESS[3:0] - (default 0111b) - Determines the minimum amount of time that sensor inputs configured to use auto repeat must detect a sensor pad touch to detect a “press and hold” event. If the sensor input detects a touch for longer than the M_PRESS[3:0] settings, a “press and hold” event is detected. If a sensor input detects a touch for less than or equal to the M_PRESS[3:0] settings, a touch event is detected. The resolution is 35ms the range is from 35ms to 560ms as shown in Table 6-16. 1 0 0 0 315ms 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 TABLE 6-15: SENSOR INPUT CONFIGURATION 2 REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 23h R/W Sensor Input Configuration 2 - - - - M_PRESS[3:0] 07h TABLE 6-16: M_PRESS BIT DECODE M_PRESS[3:0] M_PRESS SETTINGS 3 21 0 0 0 0 0 35ms 0 0 0 1 70ms 0 0 1 0 105ms 0 0 1 1 140ms 0 1 0 0 175ms 0 1 0 1 210ms 0 1 1 0 245ms 0 1 1 1 280ms (default) 1 0 0 0 315ms 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 TABLE 6-14: RPT_RATE BIT DECODE (CONTINUED) RPT_RATE[3:0] Interrupt Repeat RATE 3 21 0 CAP1166 DS00001621B-page 41 2015 Microchip Technology Inc. 6.10 Averaging and Sampling Configuration Register The Averaging and Sampling Configuration register controls the number of samples taken and the total sensor input cycle time for all active sensor inputs while the device is functioning in Active state. Bits 6 - 4 - AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-18. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. For example, if CS1, CS2, and CS3 are sampled during the sensor cycle, and the AVG[2:0] bits are set to take 4 samples per channel, then the full sensor cycle will be: CS1, CS1, CS1, CS1, CS2, CS2, CS2, CS2, CS3, CS3, CS3, CS3. Bits 3 - 2 - SAMP_TIME[1:0] - Determines the time to take a single sample as shown in Table 6-19. Bits 1 - 0 - CYCLE_TIME[1:0] - Determines the overall cycle time for all measured channels during normal operation as shown in Table 6-20. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, then the device is placed into a lower power state for the remaining duration of the cycle. TABLE 6-17: AVERAGING AND SAMPLING CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 24h R/W Averaging and Sampling Config AVG[2:0] SAMP_TIME[1:0] CYCLE_TIME [1:0] 39h TABLE 6-18: AVG BIT DECODE AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 TABLE 6-19: SAMP_TIME BIT DECODE SAMP_TIME[1:0] Sample Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-20: CYCLE_TIME BIT DECODE CYCLE_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms 2015 Microchip Technology Inc. DS00001621B-page 42 CAP1166 APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. 6.11 Calibration Activate Register The Calibration Activate register forces the respective sensor inputs to be re-calibrated affecting both the analog and digital blocks. During the re-calibration routine, the sensor inputs will not detect a press for up to 600ms and the Sensor Input Base Count register values will be invalid. During this time, any press on the corresponding sensor pads will invalidate the re-calibration. When finished, the CALX[9:0] bits will be updated (see Section 6.39). When the corresponding bit is set, the device will perform the calibration and the bit will be automatically cleared once the re-calibration routine has finished. Bit 5 - CS6_CAL - When set, the CS6 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 4 - CS5_CAL - When set, the CS5 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 3 - CS4_CAL - When set, the CS4 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 2 - CS3_CAL - When set, the CS3 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 1 - CS2_CAL - When set, the CS2 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. Bit 0 - CS1_CAL - When set, the CS1 input is re-calibrated. This bit is automatically cleared once the sensor input has been re-calibrated successfully. 6.12 Interrupt Enable Register The Interrupt Enable register determines whether a sensor pad touch or release (if enabled) causes the interrupt pin to be asserted. Bit 5 - CS6_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS6 (associated with the CS6 status bit). • ‘0’ - The interrupt pin will not be asserted if a touch is detected on CS6 (associated with the CS6 status bit). • ‘1’ (default) - The interrupt pin will be asserted if a touch is detected on CS6 (associated with the CS6 status bit). Bit 4 - CS5_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS5 (associated with the CS5 status bit). Bit 3 - CS4_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS4 (associated with the CS4 status bit). Bit 2 - CS3_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS3 (associated with the CS3 status bit). Bit 1 - CS2_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS2 (associated with the CS2 status bit). TABLE 6-21: CALIBRATION ACTIVATE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 26h R/W Calibration Activate - - CS6_ CAL CS5_ CAL CS4_ CAL CS3_ CAL CS2_ CAL CS1_ CAL 00h TABLE 6-22: INTERRUPT ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 27h R/W Interrupt Enable - - CS6_ INT_EN CS5_ INT_EN CS4_ INT_EN CS3_ INT_EN CS2_ INT_EN CS1_ INT_EN 3Fh CAP1166 DS00001621B-page 43 2015 Microchip Technology Inc. Bit 0 - CS1_INT_EN - Enables the interrupt pin to be asserted if a touch is detected on CS1 (associated with the CS1 status bit). 6.13 Repeat Rate Enable Register The Repeat Rate Enable register enables the repeat rate of the sensor inputs as described in Section 5.6.1. Bit 5 - CS6_RPT_EN - Enables the repeat rate for capacitive touch sensor input 6. • ‘0’ - The repeat rate for CS6 is disabled. It will only generate an interrupt when a touch is detected and when a release is detected no matter how long the touch is held for. • ‘1’ (default) - The repeat rate for CS6 is enabled. In the case of a “touch” event, it will generate an interrupt when a touch is detected and a release is detected (as determined by the INT_REL_n bit - see Section 6.6). In the case of a “press and hold” event, it will generate an interrupt when a touch is detected and at the repeat rate so long as the touch is held. Bit 4 - CS5_RPT_EN - Enables the repeat rate for capacitive touch sensor input 5. Bit 3 - CS4_RPT_EN - Enables the repeat rate for capacitive touch sensor input 4. Bit 2 - CS3_RPT_EN - Enables the repeat rate for capacitive touch sensor input 3. Bit 1 - CS2_RPT_EN - Enables the repeat rate for capacitive touch sensor input 2. Bit 0 - CS1_RPT_EN - Enables the repeat rate for capacitive touch sensor input 1. 6.14 Multiple Touch Configuration Register The Multiple Touch Configuration register controls the settings for the multiple touch detection circuitry. These settings determine the number of simultaneous buttons that may be pressed before additional buttons are blocked and the MULT status bit is set. Bit 7 - MULT_BLK_EN - Enables the multiple button blocking circuitry. • ‘0’ - The multiple touch circuitry is disabled. The device will not block multiple touches. • ‘1’ (default) - The multiple touch circuitry is enabled. The device will flag the number of touches equal to programmed multiple touch threshold and block all others. It will remember which sensor inputs are valid and block all others until that sensor pad has been released. Once a sensor pad has been released, the N detected touches (determined via the cycle order of CS1 - CS6) will be flagged and all others blocked. Bits 3 - 2 - B_MULT_T[1:0] - Determines the number of simultaneous touches on all sensor pads before a Multiple Touch Event is detected and sensor inputs are blocked. The bit decode is given by Table 6-25. TABLE 6-23: REPEAT RATE ENABLE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 28h R/W Repeat Rate Enable - - CS6_ RPT_EN CS5_ RPT_EN CS4_ RPT_EN CS3_ RPT_EN CS2_ RPT_EN CS1_ RPT_EN 3Fh TABLE 6-24: MULTIPLE TOUCH CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Ah R/W Multiple Touch Config MULT_ BLK_ EN - - - B_MULT_T[1:0] - - 80h TABLE 6-25: B_MULT_T BIT DECODE B_MULT_T[1:0] Number of Simultaneous Touches 1 0 0 0 1 (default) 01 2 10 3 11 4 2015 Microchip Technology Inc. DS00001621B-page 44 CAP1166 6.15 Multiple Touch Pattern Configuration Register The Multiple Touch Pattern Configuration register controls the settings for the multiple touch pattern detection circuitry. This circuitry works like the multiple touch detection circuitry with the following differences: 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. The MTP detection circuitry either will detect a specific pattern of sensor inputs as determined by the Multiple Touch Pattern register settings or it will use the Multiple Touch Pattern register settings to determine a minimum number of sensor inputs that will cause the MTP circuitry to flag an event. When using pattern recognition mode, if all of the sensor inputs set by the Multiple Touch Pattern register have a delta count greater than the MTP threshold or have their corresponding Noise Flag Status bits set, the MTP bit will be set. When using the absolute number mode, if the number of sensor inputs with thresholds above the MTP threshold or with Noise Flag Status bits set is equal to or greater than this number, the MTP bit will be set. 3. When an MTP event occurs, all touches are blocked and an interrupt is generated. 4. All sensor inputs will remain blocked so long as the requisite number of sensor inputs are above the MTP threshold or have Noise Flag Status bits set. Once this condition is removed, touch detection will be restored. Note that the MTP status bit is only cleared by writing a ‘0’ to the INT bit once the condition has been removed. Bit 7 - MTP_EN - Enables the multiple touch pattern detection circuitry. • ‘0’ (default) - The MTP detection circuitry is disabled. • ‘1’ - The MTP detection circuitry is enabled. Bits 3-2 - MTP_TH[1:0] - Determine the MTP threshold, as shown in Table 6-27. This threshold is a percentage of sensor input threshold (see Section 6.18, "Sensor Input Threshold Registers") when the device is in the Fully Active state or of the standby threshold (see Section 6.23, "Standby Threshold Register") when the device is in the Standby state. Bit 1 - COMP_PTRN - Determines whether the MTP detection circuitry will use the Multiple Touch Pattern register as a specific pattern of sensor inputs or as an absolute number of sensor inputs. • ‘0’ (default) - The MTP detection circuitry will use the Multiple Touch Pattern register bit settings as an absolute minimum number of sensor inputs that must be above the threshold or have Noise Flag Status bits set. The number will be equal to the number of bits set in the register. • ‘1’ - The MTP detection circuitry will use pattern recognition. Each bit set in the Multiple Touch Pattern register indicates a specific sensor input that must have a delta count greater than the MTP threshold or have a Noise Flag Status bit set. If the criteria are met, the MTP status bit will be set. Bit 0 - MTP_ALERT - Enables an interrupt if an MTP event occurs. In either condition, the MTP status bit will be set. • ‘0’ (default) - If an MTP event occurs, the ALERT# pin is not asserted. • ‘1’ - If an MTP event occurs, the ALERT# pin will be asserted. TABLE 6-26: MULTIPLE TOUCH PATTERN CONFIGURATION ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Bh R/W Multiple Touch Pattern Config MTP_ EN - - MTP_TH[1:0] COMP_ PTRN MTP_ ALERT 00h TABLE 6-27: MTP_TH BIT DECODE MTP_TH[1:0] Threshold Divide Setting 1 0 0 0 12.5% (default) 0 1 25% 1 0 37.5% 1 1 100% CAP1166 DS00001621B-page 45 2015 Microchip Technology Inc. 6.16 Multiple Touch Pattern Register The Multiple Touch Pattern register acts as a pattern to identify an expected sensor input profile for diagnostics or other significant events. There are two methods for how the Multiple Touch Pattern register is used: as specific sensor inputs or number of sensor input that must exceed the MTP threshold or have Noise Flag Status bits set. Which method is used is based on the COMP_PTRN bit (see Section 6.15). The methods are described below. 1. Specific Sensor Inputs: If, during a single polling cycle, the specific sensor inputs above the MTP threshold or with Noise Flag Status bits set match those bits set in the Multiple Touch Pattern register, an MTP event is flagged. 2. Number of Sensor Inputs: If, during a single polling cycle, the number of sensor inputs with a delta count above the MTP threshold or with Noise Flag Status bits set is equal to or greater than the number of pattern bits set, an MTP event is flagged. Bit 5 - CS6_PTRN - Determines whether CS6 is considered as part of the Multiple Touch Pattern. • ‘0’ - CS6 is not considered a part of the pattern. • ‘1’ - CS6 is considered a part of the pattern or the absolute number of sensor inputs that must have a delta count greater than the MTP threshold or have the Noise Flag Status bit set is increased by 1. Bit 4 - CS5_PTRN - Determines whether CS5 is considered as part of the Multiple Touch Pattern. Bit 3 - CS4_PTRN - Determines whether CS4 is considered as part of the Multiple Touch Pattern. Bit 2 - CS3_PTRN - Determines whether CS3 is considered as part of the Multiple Touch Pattern. Bit 1 - CS2_PTRN - Determines whether CS2 is considered as part of the Multiple Touch Pattern. Bit 0 - CS1_PTRN - Determines whether CS1 is considered as part of the Multiple Touch Pattern. 6.17 Recalibration Configuration Register The Recalibration Configuration register controls the automatic re-calibration routine settings as well as advanced controls to program the Sensor Input Threshold register settings. 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 6). The individual Sensor Input X Threshold registers (Sensor Input 2 Threshold through Sensor Input 6 Threshold) can be individually updated at any time. Bit 6 - NO_CLR_INTD - Controls whether the accumulation of intermediate data is cleared if the noise status bit is set. • ‘0’ (default) - The accumulation of intermediate data is cleared if the noise status bit is set. • ‘1’ - The accumulation of intermediate data is not cleared if the noise status bit is set. APPLICATION NOTE: Bits 5 and 6 should both be set to the same value. Either both should be set to ‘0’ or both should be set to ‘1’. Bit 5 - NO_CLR_NEG - Controls whether the consecutive negative delta counts counter is cleared if the noise status bit is set. TABLE 6-28: MULTIPLE TOUCH PATTERN REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Dh R/W Multiple Touch Pattern - - CS6_ PTRN CS5_ PTRN CS4_ PTRN CS3_ PTRN CS2_ PTRN CS1_ PTRN 3Fh TABLE 6-29: RECALIBRATION CONFIGURATION REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 2Fh R/W Recalibration Configuration BUT_ LD_TH NO_ CLR_ INTD NO_ CLR_ NEG NEG_DELTA_ CNT[1:0] CAL_CFG[2:0] 8Ah 2015 Microchip Technology Inc. DS00001621B-page 46 CAP1166 • ‘0’ (default) - The consecutive negative delta counts counter is cleared if the noise status bit is set. • ‘1’ - The consecutive negative delta counts counter is not cleared if the noise status bit is set. Bits 4 - 3 - NEG_DELTA_CNT[1:0] - Determines the number of negative delta counts necessary to trigger a digital recalibration as shown in Table 6-30. Bits 2 - 0 - CAL_CFG[2:0] - Determines the update time and number of samples of the automatic re-calibration routine. The settings apply to all sensor inputs universally (though individual sensor inputs can be configured to support re-calibration - see Section 6.11). Note 6-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 6-2 Update Time refers to the amount of time (in polling cycle periods) that elapses before the Base Count is updated. The time will depend upon the number of channels active, the averaging setting, and the programmed cycle time. TABLE 6-30: NEG_DELTA_CNT BIT DECODE NEG_DELTA_CNT[1:0] Number of Consecutive Negative Delta Count Values 1 0 00 8 0 1 16 (default) 1 0 32 1 1 None (disabled) TABLE 6-31: CAL_CFG BIT DECODE CAL_CFG[2:0] Recalibration Samples (see Note 6-1) Update Time (see Note 6-2) 210 0 0 0 16 16 0 0 1 32 32 0 1 0 64 64 (default) 0 1 1 128 128 1 0 0 256 256 1 0 1 256 1024 1 1 0 256 2048 1 1 1 256 4096 CAP1166 DS00001621B-page 47 2015 Microchip Technology Inc. 6.18 Sensor Input Threshold Registers The Sensor Input Threshold registers store the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. When the BUT_LD_TH bit is set (see Section 6.17 - bit 7), writing data to the Sensor Input 1 Threshold register will update all of the sensor input threshold registers (31h - 35h inclusive). 6.19 Sensor Input Noise Threshold Register The Sensor Input Noise Threshold register controls the value of a secondary internal threshold to detect noise and improve the automatic recalibration routine. If a capacitive touch sensor input exceeds the Sensor Input Noise Threshold but does not exceed the sensor input threshold, it is determined to be caused by a noise spike. That sample is not used by the automatic re-calibration routine. This feature can be disabled by setting the DIS_DIG_NOISE bit. Bits 1-0 - CS1_BN_TH[1:0] - Controls the noise threshold for all capacitive touch sensor inputs, as shown in Table 6-34. The threshold is proportional to the threshold setting. 6.20 Standby Channel Register TABLE 6-32: SENSOR INPUT THRESHOLD REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 30h R/W Sensor Input 1 Threshold - 64 32 16 8 4 2 1 40h 31h R/W Sensor Input 2 Threshold - 64 32 16 8 4 2 1 40h 32h R/W Sensor Input 3 Threshold - 64 32 16 8 4 2 1 40h 33h R/W Sensor Input 4 Threshold - 64 32 16 8 4 2 1 40h 34h R/W Sensor Input 5 Threshold - 64 32 16 8 4 2 1 40h 35h R/W Sensor Input 6 Threshold - 64 32 16 8 4 2 1 40h TABLE 6-33: SENSOR INPUT NOISE THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 38h R/W Sensor Input Noise Threshold CS_BN_TH [1:0] 01h TABLE 6-34: CSX_BN_TH BIT DECODE CS_BN_TH[1:0] Percent Threshold Setting 1 0 0 0 25% 0 1 37.5% (default) 1 0 50% 1 1 62.5% TABLE 6-35: STANDBY CHANNEL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 40h R/W Standby Channel - - CS6_ STBY CS5_ STBY CS4_ STBY CS3_ STBY CS2_ STBY CS1_ STBY 00h 2015 Microchip Technology Inc. DS00001621B-page 48 CAP1166 The Standby Channel register controls which (if any) capacitive touch sensor inputs are active during Standby. Bit 5 - CS6_STBY - Controls whether the CS6 channel is active in Standby. • ‘0’ (default) - The CS6 channel not be sampled during Standby mode. • ‘1’ - The CS6 channel will be sampled during Standby Mode. It will use the Standby threshold setting, and the standby averaging and sensitivity settings. Bit 4 - CS5_STBY - Controls whether the CS5 channel is active in Standby. 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. 6.21 Standby Configuration Register The Standby Configuration register controls averaging and cycle time for those sensor inputs that are active in Standby. This register is useful for detecting proximity on a small number of sensor inputs as it allows the user to change averaging and sample times on a limited number of sensor inputs and still maintain normal functionality in the fully active state. Bit 7 - AVG_SUM - Determines whether the active sensor inputs will average the programmed number of samples or whether they will accumulate for the programmed number of samples. • ‘0’ - (default) - The active sensor input delta count values will be based on the average of the programmed number of samples when compared against the threshold. • ‘1’ - The active sensor input delta count values will be based on the summation of the programmed number of samples when compared against the threshold. This bit should only be set when performing proximity detection as a physical touch will overflow the delta count registers and may result in false readings. Bits 6 - 4 - STBY_AVG[2:0] - Determines the number of samples that are taken for all active channels during the sensor cycle as shown in Table 6-37. All samples are taken consecutively on the same channel before the next channel is sampled and the result is averaged over the number of samples measured before updating the measured results. 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 6-38. TABLE 6-36: STANDBY CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 41h R/W Standby Configuration AVG_ SUM STBY_AVG[2:0] STBY_SAMP_ TIME[1:0] STBY_CY_TIME [1:0] 39h TABLE 6-37: STBY_AVG BIT DECODE STBY_AVG[2:0] Number of Samples Taken per Measurement 2 10 0 0 0 1 0 01 2 0 10 4 0 1 1 8 (default) 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 CAP1166 DS00001621B-page 49 2015 Microchip Technology Inc. Bits 1 - 0 - STBY_CY_TIME[2:0] - Determines the overall cycle time for all measured channels during standby operation as shown in Table 6-39. All measured channels are sampled at the beginning of the cycle time. If additional time is remaining, the device is placed into a lower power state for the remaining duration of the cycle. APPLICATION NOTE: The programmed cycle time is only maintained if the total averaging time for all samples is less than the programmed cycle. The STBY_AVG[2:0] bits will take priority so that if more samples are required than would normally be allowed during the cycle time, the cycle time will be extended as necessary to accommodate the number of samples to be measured. 6.22 Standby Sensitivity Register The Standby Sensitivity register controls the sensitivity for sensor inputs that are active in Standby. Bits 2 - 0 - STBY_SENSE[2:0] - Controls the sensitivity for sensor inputs that are active in Standby. The sensitivity settings act to scale the relative delta count value higher or lower based on the system parameters. A setting of 000b is the most sensitive while a setting of 111b is the least sensitive. At the 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. At the most sensitivity settings, the MSB of the Delta Count register represents 64 out of ~25,000 which corresponds to a touch of approximately 0.25% of the base capacitance (or a ΔC of 25fF from a 10pF base capacitance). Conversely a value of 1x is the least sensitive setting available. At these settings, the MSB of the Delta Count register corresponds to a delta count of 8192 counts out of ~25,000 which corresponds to a touch of approximately 33% of the base capacitance (or a ΔC of 3.33pF from a 10pF base capacitance). TABLE 6-38: STBY_SAMP_TIME BIT DECODE STBY_SAMP_TIME[1:0] Sampling Time 1 0 0 0 320us 0 1 640us 1 0 1.28ms (default) 1 1 2.56ms TABLE 6-39: STBY_CY_TIME BIT DECODE STBY_CY_TIME[1:0] Overall Cycle Time 1 0 0 0 35ms 0 1 70ms (default) 1 0 105ms 1 1 140ms TABLE 6-40: STANDBY SENSITIVITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 42h R/W Standby Sensitivity - - - - - STBY_SENSE[2:0] 02h TABLE 6-41: STBY_SENSE BIT DECODE STBY_SENSE[2:0] Sensitivity Multiplier 210 0 0 0 128x (most sensitive) 0 0 1 64x 2015 Microchip Technology Inc. DS00001621B-page 50 CAP1166 6.23 Standby Threshold Register The Standby Threshold register stores the delta threshold that is used to determine if a touch has been detected. When a touch occurs, the input signal of the corresponding sensor pad changes due to the capacitance associated with a touch. If the sensor input change exceeds the threshold settings, a touch is detected. 6.24 Sensor Input Base Count Registers The Sensor Input Base Count registers store the calibrated “Not Touched” input value from the capacitive touch sensor inputs. These registers are periodically updated by the re-calibration routine. The routine uses an internal adder to add the current count value for each reading to the sum of the previous readings until sample size has been reached. At this point, the upper 16 bits are taken and used as the Sensor Input Base Count. The internal adder is then reset and the re-calibration routine continues. The data presented is determined by the BASE_SHIFT[3:0] bits (see Section 6.5). 6.25 LED Output Type Register 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) TABLE 6-42: STANDBY THRESHOLD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 43h R/W Standby Threshold - 64 32 16 8 4 2 1 40h TABLE 6-43: SENSOR INPUT BASE COUNT REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 50h R Sensor Input 1 Base Count 128 64 32 16 8 4 2 1 C8h 51h R Sensor Input 2 Base Count 128 64 32 16 8 4 2 1 C8h 52h R Sensor Input 3 Base Count 128 64 32 16 8 4 2 1 C8h 53h R Sensor Input 4 Base Count 128 64 32 16 8 4 2 1 C8h 54h R Sensor Input 5 Base Count 128 64 32 16 8 4 2 1 C8h 55h R Sensor Input 6 Base Count 128 64 32 16 8 4 2 1 C8h TABLE 6-44: LED OUTPUT TYPE REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 71h R/W LED Output Type - - LED6_ OT LED5_ OT LED4_ OT LED3_ OT LED2_ OT LED1_ OT 00h TABLE 6-41: STBY_SENSE BIT DECODE (CONTINUED) STBY_SENSE[2:0] Sensitivity Multiplier 210 CAP1166 DS00001621B-page 51 2015 Microchip Technology Inc. The LED Output Type register controls the type of output for the LED pins. Each pin is controlled by a single bit. Refer to application note 21.4 CAP1166Family LED Configuration Options for more information about implementing LEDs. Bit 5 - LED6_OT - Determines the output type of the LED6 pin. • ‘0’ (default) - The LED6 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. • ‘1’ - The LED6 pin is a push-pull output. When driving a logic ‘1’, the pin is driven high. When driving a logic ‘0’, the pin is driven low. Bit 4 - LED5_OT - Determines the output type of the LED5 pin. Bit 3 - LED4_OT - Determines the output type of the LED4 pin. Bit 2 - LED3_OT - Determines the output type of the LED3 pin. Bit 1 - LED2_OT - Determines the output type of the LED2 pin. Bit 0 - LED1_OT - Determines the output type of the LED1 pin. 6.26 Sensor Input LED Linking Register The Sensor Input LED Linking register controls whether a capacitive touch sensor input is linked to an LED output. If the corresponding bit is set, then the appropriate LED output will change states defined by the LED Behavior controls (see Section 6.31) in response to the capacitive touch sensor input. Bit 5 - CS6_LED6 - Links the LED6 output to a detected touch on the CS6 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. • ‘0’ (default) - The LED6 output is not associated with the CS6 input. If a touch is detected on the CS6 input, the LED will not automatically be actuated. The LED is enabled and controlled via the LED Output Control register (see Section 6.28) and the LED Behavior registers (see Section 6.31). • ‘1’ - The LED6 output is associated with the CS6 input. If a touch is detected on the CS6 input, the LED will be actuated and behave as defined in Table 6-52. Bit 4 - CS5_LED5 - Links the LED5 output to a detected touch on the CS5 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. Bit 3 - CS4_LED4 - Links the LED4 output to a detected touch on the CS4 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. 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. Bit 0 - CS1_LED1 - Links the LED1 output to a detected touch on the CS1 sensor input. When a touch is detected, the LED is actuated and will behave as determined by the LED Behavior controls. 6.27 LED Polarity Register TABLE 6-45: SENSOR INPUT LED LINKING REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 72h R/W Sensor Input LED Linking - - CS6_ LED6 CS5_ LED5 CS4_ LED4 CS3_ LED3 CS2_ LED2 CS1_ LED1 00h TABLE 6-46: LED POLARITY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 73h R/W LED Polarity - - LED6_ POL LED5_ POL LED4_ POL LED3_ POL LED2_ POL LED1_ POL 00h 2015 Microchip Technology Inc. DS00001621B-page 52 CAP1166 The LED Polarity register controls the logical polarity of the LED outputs. When these bits are set or cleared, the corresponding LED Mirror controls are also set or cleared (unless the BLK_POL_MIR bit is set - see Section 6.6, "Configuration Registers"). Table 6-48, "LED Polarity Behavior" shows the interaction between the polarity controls, output controls, and relative brightness. APPLICATION NOTE: The polarity controls determine the final LED pin drive. A touch on a linked capacitive touch sensor input is treated in the same way as the LED Output Control bit being set to a logic ‘1’. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’ then the LED will be on and that the CAP1166 LED pin is sinking the LED current. Conversely, if the LED pin is driven to a logic ‘1’, the LED will be off and there is no current flow. See Figure 5-1, "System Diagram for CAP1166". APPLICATION NOTE: This application note applies when the LED polarity is inverted (LEDx_POL = ‘0’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘0’ state in. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven low (i.e. maximum % of time that the LED is on) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven low (i.e. minimum % of time that the LED is on). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at the minimum duty cycle setting. Breathe operations will ramp the duty cycle from the minimum duty cycle to the maximum duty cycle. APPLICATION NOTE: This application note applies when the LED polarity is non-inverted (LEDx_POL = ‘1’). For LED operation, the duty cycle settings determine the % of time that the LED pin will be driven to a logic ‘1’ state. The Max Duty Cycle settings define the maximum % of time that the LED pin will be driven high (i.e. maximum % of time that the LED is off) while the Min Duty Cycle settings determine the minimum % of time that the LED pin will be driven high (i.e. minimum % of time that the LED is off). When there is no touch detected or the LED Output Control register bit is at a logic ‘0’, the LED output will be driven at 100 minus the minimum duty cycle setting. Breathe operations will ramp the duty cycle from 100 minus the minimum duty cycle to 100 minus the maximum duty cycle. APPLICATION NOTE: The LED Mirror controls (see Section 6.30, "LED Mirror Control Register") work with the polarity controls with respect to LED brightness but will not have a direct effect on the output pin drive. Bit 5 - LED6_POL - Determines the polarity of the LED6 output. • ‘0’ (default) - The LED6 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 LED6 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. Bit 4 - LED5_POL - Determines the polarity of the LED5 output. Bit 3 - LED4_POL - Determines the polarity of the LED4 output. Bit 2 - LED3_POL - Determines the polarity of the LED3 output. Bit 1 - LED2_POL - Determines the polarity of the LED2 output. Bit 0 - LED1_POL - Determines the polarity of the LED1 output. 6.28 LED Output Control Register The LED Output Control Register controls the output state of the LED pins that are not linked to sensor inputs. TABLE 6-47: LED OUTPUT CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 74h R/W LED Output Control - - LED6_ DR LED5_ DR LED4_ DR LED3_ DR LED2_ DR LED1_ DR 00h CAP1166 DS00001621B-page 53 2015 Microchip Technology Inc. The LED Polarity Control Register will determine the non actuated state of the LED pins. The actuated LED behavior is determined by the LED behavior controls (see Section 6.31, "LED Behavior Registers"). Table 6-48 shows the interaction between the polarity controls, output controls, and relative brightness. Bit 5 - LED6_DR - Determines whether LED6 output is driven high or low. • ‘0’ (default) - The LED6 output is driven at the minimum duty cycle or not actuated. • ‘1’ - The LED6 output is driven at the maximum duty cycle or is actuated. Bit 4 - LED5_DR - Determines whether LED5 output is driven high or low. Bit 3 - LED4_DR - Determines whether LED4 output is driven high or low. Bit 2 - LED3_DR - Determines whether LED3 output is driven high or low. Bit 1 - LED2_DR - Determines whether LED2 output is driven high or low. Bit 0 - LED1_DR - Determines whether LED1 output is driven high or low. 6.29 Linked LED Transition Control Register The Linked LED Transition Control register controls the LED drive when the LED is linked to a capacitive touch sensor input. These controls work in conjunction with the INV_LINK_TRAN bit (see Section 6.6.2, "Configuration 2 - 44h") to create smooth transitions from host control to linked LEDs. Note: If an LED is linked to a sensor input in the Sensor Input LED Linking Register (Section 6.26, "Sensor Input LED Linking Register"), the corresponding bit in the LED Output Control Register is ignored (i.e. a linked LED cannot be host controlled). TABLE 6-48: LED POLARITY BEHAVIOR LED Output Control Register or Touch Polarity Max Duty Min Duty Brightness LED Appearance 0 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. Brightness ramps from min duty cycle to max duty cycle according to LED behavior 0 non-inverted (‘1’) not used minimum % of time that the LED is off (logic 1) maximum brightness at 100 minus min duty cycle. on at 100 - min duty cycle 1 non-inverted (‘1’) maximum % of time that the LED is off (logic 1) minimum % of time that the LED is off (logic 1) For Direct behavior, maximum brightness is 100 minus max duty cycle. When breathing, max brightness is 100 minus min duty cycle. Brightness ramps from 100 - min duty cycle to 100 - max duty cycle. according to LED behavior TABLE 6-49: LINKED LED TRANSITION CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 77h R/W Linked LED Transition Control - - LED6_ LTRAN LED5_ LTRAN LED4_ LTRAN LED3_ LTRAN LED2_ LTRAN LED1_ LTRAN 00h 2015 Microchip Technology Inc. DS00001621B-page 54 CAP1166 Bit 5 - LED6_LTRAN - Determines the transition effect when LED6 is linked to CS6. • ‘0’ (default) - When the LED output control bit for LED6 is ‘1’, and then LED6 is linked to CS6 and no touch is detected, the LED will change states. • ‘1’ - If the INV_LINK_TRAN bit is ‘1’, when the LED output control bit for CS6 is ‘1’, and then CS6 is linked to LED6 and no touch is detected, the LED will not change states. In addition, the LED state will change when the sensor pad is touched. If the INV_LINK_TRAN bit is ‘0’, when the LED output control bit for CS6 is ‘1’, and then CS6 is linked to LED6 and no touch is detected, the LED will not change states. However, the LED state will not change when the sensor pad is touched. 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 LED6_LTRAN bit is set to ‘1’. Therefore, if breathe and pulse behaviors are used, set the INV_LINK_TRAN bit to ‘1’. Bit 4 - LED5_LTRAN - Determines the transition effect when LED5 is linked to CS5. Bit 3 - LED4_LTRAN - Determines the transition effect when LED4 is linked to CS4. Bit 2 - LED3_LTRAN - Determines the transition effect when LED3 is linked to CS3. Bit 1 - LED2_LTRAN - Determines the transition effect when LED2 is linked to CS2. Bit 0 - LED1_LTRAN - Determines the transition effect when LED1 is linked to CS1. 6.30 LED Mirror Control Register The LED Mirror Control Registers determine the meaning of duty cycle settings when polarity is non-inverted for each LED channel. When the polarity bit is set to ‘1’ (non-inverted), to obtain correct steps for LED ramping, pulse, and breathe behaviors, the min and max duty cycles need to be relative to 100%, rather than the default, which is relative to 0%. APPLICATION NOTE: The LED drive assumes that the LEDs are configured such that if the LED pin is driven to a logic ‘0’, the LED will be on and the CAP1166 LED pin is sinking the LED current. When the polarity bit is set to ‘1’, it is considered non-inverted. For systems using the opposite LED configuration, mirror controls would apply when the polarity bit is ‘0’. These bits are changed automatically if the corresponding LED Polarity bit is changed (unless the BLK_POL_MIR bit is set - see Section 6.6). Bit 5 - LED6_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. • ‘0’ (default) - The duty cycle settings are determined relative to 0% and are determined directly with the settings. • ‘1’ - The duty cycle settings are determined relative to 100%. Bit 4 - LED5_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. Bit 3 - LED4_MIR_EN - Determines whether the duty cycle settings are “biased” relative to 0% or 100% duty cycle. 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. TABLE 6-50: LED MIRROR CONTROL REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 79h R/W LED Mirror Control - - LED6_ MIR _ EN LED5_ MIR _ EN LED4_M IR_ EN LED3_ MIR_ EN LED2_ MIR _ EN LED1_ MIR _ EN 00h CAP1166 DS00001621B-page 55 2015 Microchip Technology Inc. 6.31 LED Behavior Registers The LED Behavior registers control the operation of LEDs. Each LED pin is controlled by a 2-bit field and the behavior is determined by whether the LED is linked to a capacitive touch sensor input or not. If the corresponding LED output is linked to a capacitive touch sensor input, the appropriate behavior will be enabled / disabled based on touches and releases. If the LED output is not associated with a capacitive touch sensor input, the appropriate behavior will be enabled / disabled by the LED Output Control register. If the respective LEDx_DR bit is set to a logic ‘1’, this will be associated as a “touch”, and if the LEDx_DR bit is set to a logic ‘0’, this will be associated as a “release”. Table 6-52, "LEDx_CTL Bit Decode" shows the behavior triggers. The defined behavior will activate when the Start Trigger is met and will stop when the Stop Trigger is met. Note the behavior of the Breathe Hold and Pulse Release option. The LED Polarity Control register will determine the non actuated state of the LED outputs (see Section 6.27, "LED Polarity Register"). APPLICATION NOTE: If an LED is not linked to a capacitive touch sensor input and is breathing (via the Breathe or Pulse behaviors), it must be unactuated and then re-actuated before changes to behavior are processed. For example, if the LED output is breathing and the Maximum duty cycle is changed, this change will not take effect until the LED output control register is set to ‘0’ and then re-set to ‘1’. APPLICATION NOTE: If an LED is not linked to the capacitive touch sensor input and configured to operate using Pulse 1 Behavior, then the circuitry will only be actuated when the corresponding output control bit is set. It will not check the bit condition until the Pulse 1 behavior is finished. The device will not remember if the bit was cleared and reset while it was actuated. APPLICATION NOTE: If an LED is actuated and not linked and the desired LED behavior is changed, this new behavior will take effect immediately; however, the first instance of the changed behavior may act incorrectly (e.g. if changed from Direct to Pulse 1, the LED output may ‘breathe’ 4 times and then end at minimum duty cycle). LED Behaviors will operate normally once the LED has been un-actuated and then re-actuated. APPLICATION NOTE: If an LED is actuated and it is switched from linked to a capacitive touch sensor input to unlinked (or vice versa), the LED will respond to the new command source immediately if the behavior was Direct or Breathe. For Pulse behaviors, it will complete the behavior already in progress. For example, if a linked LED was actuated by a touch and the control 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. 6.31.1 LED BEHAVIOR 1 - 81H Bits 7 - 6 - LED4_CTL[1:0] - Determines the behavior of LED4 as shown in Table 6-52. Bits 5 - 4 - LED3_CTL[1:0] - Determines the behavior of LED3 as shown in Table 6-52. Bits 3 - 2 - LED2_CTL[1:0] - Determines the behavior of LED2 as shown in Table 6-52. Bits 1 - 0 - LED1_CTL[1:0] - Determines the behavior of LED1 as shown in Table 6-52. 6.31.2 LED BEHAVIOR 2 - 82H Bits 3 - 2 - LED6_CTL[1:0] - Determines the behavior of LED6 as shown in Table 6-52. Bits 1 - 0 - LED5_CTL[1:0] - Determines the behavior of LED5 as shown in Table 6-52. TABLE 6-51: LED BEHAVIOR REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 81h R/W LED Behavior 1 LED4_CTL[1:0] LED3_CTL[1:0] LED2_CTL[1:0] LED1_CTL[1:0] 00h 82h R/W LED Behavior 2 - - - - LED6_CTL[1:0] LED5_CTL[1:0] 00h 2015 Microchip Technology Inc. DS00001621B-page 56 CAP1166 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. 6.32 LED Pulse 1 Period Register The LED Pulse Period 1 register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 01b). The LSB represents 32ms so that a setting of 18h (24d) would represent a period of 768ms (24 x 32ms = 768ms). The total range is from 32ms to 4.064 seconds as shown in Table 6-54 with the default being 1024ms. 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. Bit 7 - ST_TRIG - Determines the start trigger for the LED Pulse behavior. • ‘0’ (default) - The LED will Pulse when a touch is detected or the drive bit is set. • ‘1’ - The LED will Pulse when a release is detected or the drive bit is cleared. TABLE 6-52: LEDX_CTL BIT DECODE LEDx_CTL [1:0] Operation Description Start TRigger Stop Trigger 1 0 0 0 Direct The LED is driven to the programmed state (active or inactive). See Figure 6-7 Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 0 1 Pulse 1 The LED will “Pulse” a programmed number of times. During each “Pulse” the LED will breathe up to the maximum brightness and back down to the minimum brightness so that the total “Pulse” period matches the programmed value. Touch or Release Detected or LED Output Control bit set or cleared (see Section 6.32) n/a 1 0 Pulse 2 The LED will “Pulse” when the start trigger is detected. When the stop trigger is detected, it will “Pulse” a programmable number of times then return to its minimum brightness. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared 1 1 Breathe The LED will breathe. It will be driven with a duty cycle that ramps up from the programmed minimum duty cycle (default 0%) to the programmed maximum duty cycle duty cycle (default 100%) and then back down. Each ramp takes up 50% of the programmed period. The total period of each “breath” is determined by the LED Breathe Period controls - see Section 6.34. Touch Detected or LED Output Control bit set Release Detected or LED Output Control bit cleared TABLE 6-53: LED PULSE 1 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 84h R/W LED Pulse 1 Period ST_ TRIG P1_ PER6 P1_ PER5 P1_ PER4 P1_ PER3 P1_ PER2 P1_ PER1 P1_ PER0 20h CAP1166 DS00001621B-page 57 2015 Microchip Technology Inc. The Pulse 1 operation is shown in Figure 6-1 when the LED output is configured for non-inverted polarity (LEDx_POL = 1) and in Figure 6-2 for inverted polarity (LEDx_POL = 0). . FIGURE 6-1: Pulse 1 Behavior with Non-Inverted Polarity FIGURE 6-2: Pulse 1 Behavior with Inverted Polarity TABLE 6-54: LED PULSE / BREATHE PERIOD EXAMPLE Setting (HEX) Setting (Decimal) Total Breathe / Pulse Period (MS) 00h 0 32 01h 1 32 02h 2 64 03h 3 96 . . . . . . . . . 7Dh 125 4000 Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected (100% - Pulse 1 Max Duty Cycle) * Brightness X pulses after touch or after release Pulse 1 Period (P1_PER) (100% - Pulse 1 Min Duty Cycle) * Brightness LED Brightness Normal – untouched operation Normal – untouched operation Touch Detected or Release Detected Pulse 1 Min Duty Cycle * Brightness X pulses after touch or after release Pulse Period (P1_PER) Pulse 1 Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001621B-page 58 CAP1166 6.33 LED Pulse 2 Period Register The LED Pulse 2 Period register determines the overall period of a pulse operation as determined by the LED_CTL registers (see Table 6-52 - setting 10b). 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 6-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 6-3 for non-inverted polarity (LEDx_POL = 1) and in Figure 6-4 for inverted polarity (LEDx_POL = 0). 7Eh 126 4032 7Fh 127 4064 TABLE 6-55: LED PULSE 2 PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 85h R/W LED Pulse 2 Period - P2_ PER6 P2_ PER5 P2_ PER4 P2_ PER3 P2_ PER2 P2_ PER1 P2_ PER0 14h FIGURE 6-3: Pulse 2 Behavior with Non-Inverted Polarity TABLE 6-54: LED PULSE / BREATHE PERIOD EXAMPLE (CONTINUED) Setting (HEX) Setting (Decimal) Total Breathe / Pulse Period (MS) . . . Normal – untouched operation Normal – untouched operation Touch Detected (100% - Pulse 2 Min Duty Cycle) * Brightness (100% - Pulse 2 Max Duty Cycle) * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness CAP1166 DS00001621B-page 59 2015 Microchip Technology Inc. 6.34 LED Breathe Period Register The LED Breathe Period register determines the overall period of a breathe operation as determined by the LED_CTL registers (see Table 6-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 6-54) with a default of 2976ms. 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. 6.35 LED Configuration Register The LED Configuration register controls general LED behavior as well as the number of pulses that are sent for the PULSE LED output behavior. Bit 6 - RAMP_ALERT - Determines whether the device will assert the ALERT# pin when LEDs actuated by the LED Output Control register bits have finished their respective behaviors. Interrupts will only be generated if the LED activity is generated by writing the LED Output Control registers. Any LED activity associated with touch detection will not cause an interrupt to be generated when the LED behavior has been finished. • ‘0’ (default) - The ALERT# pin will not be asserted when LEDs actuated by the LED Output Control register have finished their programmed behaviors. • ‘1’ - The ALERT# pin will be asserted whenever any LED that is actuated by the LED Output Control register has finished its programmed behavior. Bits 5 - 3 - PULSE2_CNT[2:0] - Determines the number of pulses used for the Pulse 2 behavior as shown in Table 6-58. Bits 2 - 0 - PULSE1_CNT[2:0] - Determines the number of pulses used for the Pulse 1 behavior as shown in Table 6-58. FIGURE 6-4: Pulse 2 Behavior with Inverted Polarity TABLE 6-56: LED BREATHE PERIOD REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 86h R/W LED Breathe Period - BR_ PER6 BR_ PER5 BR_ PER4 BR_ PER3 BR_ PER2 BR_ PER1 BR_ PER0 5Dh TABLE 6-57: LED CONFIGURATION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 88h R/W LED Config - RAMP_ ALERT PULSE2_CNT[2:0] PULSE1_CNT[2:0] 04h Normal – untouched operation Normal – untouched operation Touch Detected Pulse 2 Max Duty Cycle * Brightness Pulse 2 Min Duty Cycle * Brightness X additional pulses after release Release Detected Pulse Period (P2_PER) LED Brightness . . . 2015 Microchip Technology Inc. DS00001621B-page 60 CAP1166 6.36 LED Duty Cycle Registers The LED Duty Cycle registers determine the minimum and maximum duty cycle settings used for the LED for each LED behavior. These settings affect the brightness of the LED when it is fully off and fully on. The LED driver duty cycle will ramp up from the minimum duty cycle to the maximum duty cycle and back down again. APPLICATION NOTE: When operating in Direct behavior mode, changes to the Duty Cycle settings will be applied immediately. When operating in Breathe, Pulse 1, or Pulse 2 modes, the LED must be unactuated and then re-actuated before changes to behavior are processed. Bits 7 - 4 - X_MAX_DUTY[3:0] - Determines the maximum PWM duty cycle for the LED drivers as shown in Table 6-60. Bits 3 - 0 - X_MIN_DUTY[3:0] - Determines the minimum PWM duty cycle for the LED drivers as shown in Table 6-60. TABLE 6-58: PULSEX_CNT DECODE PULSEX_CNT[2:0] Number of Breaths 21 0 0 0 0 1 (default - Pulse 2) 00 1 2 01 0 3 01 1 4 1 0 0 5 (default - Pulse 1) 10 1 6 11 0 7 11 1 8 TABLE 6-59: LED DUTY CYCLE REGISTERS ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 90h R/W LED Pulse 1 Duty Cycle P1_MAX_DUTY[3:0] P1_MIN_DUTY[3:0] F0h 91h R/W LED Pulse 2 Duty Cycle P2_MAX_DUTY[3:0] P2_MIN_DUTY[3:0] F0h 92h R/W LED Breathe Duty Cycle BR_MAX_DUTY[3:0] BR_MIN_DUTY[3:0] F0h 93h R/W Direct Duty Cycle DR_MAX_DUTY[3:0] DR_MIN_DUTY[3:0] F0h TABLE 6-60: LED DUTY CYCLE DECODE x_MAX/MIN_Duty [3:0] Maximum Duty Cycle Minimum Duty Cycle 3 21 0 0 0 0 0 7% 0% 0 0 0 1 9% 7% 0 0 1 0 11% 9% 0 0 1 1 14% 11% 0 1 0 0 17% 14% 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% CAP1166 DS00001621B-page 61 2015 Microchip Technology Inc. 6.37 LED Direct Ramp Rates Register The LED Direct Ramp Rates register control the rising and falling edge time of an LED that is configured to operate in Direct behavior mode. The rising edge time corresponds to the amount of time the LED takes to transition from its minimum duty cycle to its maximum duty cycle. Conversely, the falling edge time corresponds to the amount of time that the LED takes to transition from its maximum duty cycle to its minimum duty cycle. Bits 5 - 3 - RISE_RATE[2:0] - Determines the rising edge time of an LED when it transitions from its minimum drive state to its maximum drive state as shown in Table 6-62. Bits 2 - 0 - FALL_RATE[2:0] - Determines the falling edge time of an LED when it transitions from its maximum drive state to its minimum drive state as shown in Table 6-62. 6.38 LED Off Delay Register The LED Off Delay register determines the amount of time that an LED remains at its maximum duty cycle (or minimum as determined by the polarity controls) before it starts to ramp down. If the LED is operating in Breathe mode, this delay is applied at the top of each “breath”. If the LED is operating in the Direct mode, this delay is applied when the LED is unactuated. 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% TABLE 6-61: LED DIRECT RAMP RATES REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 94h R/W LED Direct Ramp Rates - - RISE_RATE[2:0] FALL_RATE[2:0] 00h TABLE 6-62: RISE / FALL RATE DECODE RISE_RATE/ FALL_RATE/ Bit Decode Rise / Fall Time (TRISE / TFALL) 21 0 00 0 0 0 0 1 250ms 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 TABLE 6-63: LED OFF DELAY REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default 95h R/W LED Off Delay Register - BR_OFF_DLY[2:0] DIR_OFF_DLY[3:0] 00h TABLE 6-60: LED DUTY CYCLE DECODE (CONTINUED) x_MAX/MIN_Duty [3:0] Maximum Duty Cycle Minimum Duty Cycle 3 21 0 2015 Microchip Technology Inc. DS00001621B-page 62 CAP1166 Bits 6 - 4 - BR_OFF_DLY[2:0] - Determines the Breathe behavior mode off delay, which is the amount of time an LED in Breathe behavior mode remains inactive after it finishes a breathe pulse (ramp on and ramp off), as shown in Figure 6- 5 (non-inverted polarity LEDx_POL = 1) and Figure 6-6 (inverted polarity LEDx_POL = 0). Available settings are shown in Table 6-64. FIGURE 6-5: Breathe Behavior with Non-Inverted Polarity FIGURE 6-6: Breathe Behavior with Inverted Polarity LED Actuated 100% - Breathe Max Min Cycle * Brightness 100% - Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) LED Actuated Breathe Max Duty Cycle * Brightness Breathe Min Duty Cycle * Brightness LED Unactuated Breathe Off Delay (BR_OFF_DLY) LED Brightness Breathe Period (BR_PER) CAP1166 DS00001621B-page 63 2015 Microchip Technology Inc. Bits 3 - 0 - DIR_OFF_DLY[3:0] - Determines the turn-off delay, as shown in Table 6-65, for all LEDs that are configured to operate in Direct behavior mode. The Direct behavior operation is determined by the combination of programmed Rise Time, Fall Time, Min and Max Duty cycles, Off Delay, and polarity. Figure 6-7 shows the behavior for non-inverted polarity (LEDx_POL = 1) while Figure 6- 8 shows the behavior for inverted polarity (LEDx_POL = 0). TABLE 6-64: BREATHE OFF DELAY SETTINGS BR_OFF_DLY [2:0] OFF Delay 2 10 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 FIGURE 6-7: Direct Behavior for Non-Inverted Polarity FIGURE 6-8: Direct Behavior for Inverted Polarity Normal – untouched operation RISE_RATE Setting (tRISE) (100% - Max Duty Cycle) * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation (100% - Min Duty Cycle) * Brightness LED Brightness Normal – untouched operation RISE_RATE Setting (tRISE) Min Duty Cycle * Brightness Touch Detected Release Detected Off Delay (tOFF_DLY) FALL_RATE Setting (tFALL) Normal – untouched operation Max Duty Cycle * Brightness LED Brightness 2015 Microchip Technology Inc. DS00001621B-page 64 CAP1166 6.39 Sensor Input Calibration Registers The Sensor Input Calibration registers hold the 10-bit value that represents the last calibration value. TABLE 6-65: OFF DELAY DECODE OFF Delay[3:0] Bit Decode OFF Delay (tOFF_DLY) 32 1 0 00 0 0 0 0 0 0 1 250ms 0 0 1 0 500ms 0 0 1 1 750ms 0 1 0 0 1s 0 1 0 1 1.25s 0 1 1 0 1.5s 0 1 1 1 2s 1 0 0 0 2.5s 1 0 0 1 3.0s 1 0 1 0 3.5s 1 0 1 1 4.0s 1 1 0 0 4.5s All others 5.0s TABLE 6-66: SENSOR INPUT CALIBRATION REGISTERS ADDR Register R/W B7 B6 B5 B4 B3 B2 B1 B0 Default B1h Sensor Input 1 Calibration R CAL1_9 CAL1_8 CAL1_7 CAL1_6 CAL1_5 CAL1_4 CAL1_3 CAL1_2 00h B2h Sensor Input 2 Calibration R CAL2_9 CAL2_8 CAL2_7 CAL2_6 CAL2_5 CAL2_4 CAL2_3 CAL2_2 00h B3h Sensor Input 3 Calibration R CAL3_9 CAL3_8 CAL3_7 CAL3_6 CAL3_5 CAL3_4 CAL3_3 CAL3_2 00h B4h Sensor Input 4 Calibration R CAL4_9 CAL4_8 CAL4_7 CAL4_6 CAL4_5 CAL4_4 CAL4_3 CAL4_2 00h B5h Sensor Input 5 Calibration R CAL5_9 CAL5_8 CAL5_7 CAL5_6 CAL5_5 CAL5_4 CAL5_3 CAL5_2 00h B6h Sensor Input 6 Calibration R CAL6_9 CAL6_8 CAL6_7 CAL6_6 CAL6_5 CAL6_4 CAL6_3 CAL6_2 00h B9h Sensor Input Calibration LSB 1 R CAL4_1 CAL4_0 CAL3_1 CAL3_0 CAL2_1 CAL2_0 CAL1_1 CAL1_0 00h BAh Sensor Input Calibration LSB 2 R - - - - CAL6_1 CAL6_0 CAL5_1 CAL5_0 00h CAP1166 DS00001621B-page 65 2015 Microchip Technology Inc. 6.40 Product ID Register The Product ID register stores a unique 8-bit value that identifies the device. 6.41 Manufacturer ID Register The Vendor ID register stores an 8-bit value that represents Microchip. 6.42 Revision Register The Revision register stores an 8-bit value that represents the part revision. TABLE 6-67: PRODUCT ID REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FDh R Product ID 0 1 0 1 0 0 0 1 51h TABLE 6-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 TABLE 6-69: REVISION REGISTER ADDR R/W Register B7 B6 B5 B4 B3 B2 B1 B0 Default FFh R Revision 1 0 0 0 0 0 1 1 83h 2015 Microchip Technology Inc. DS00001621B-page 66 CAP1166 7.0 PACKAGE INFORMATION 7.1 CAP1166 Package Drawings Note: For the most current package drawings, see the Microchip Packaging Specification at: http://www.microchip.com/packaging. FIGURE 7-1: 24-Pin SSOP Package Drawing CAP1166 DS00001621B-page 67 2015 Microchip Technology Inc. FIGURE 7-2: 24-Pin SSOP Package Dimensions 2015 Microchip Technology Inc. DS00001621B-page 68 CAP1166 FIGURE 7-3: CAP1166 PCB Land Pattern - 24-Pin SSOP CAP1166 DS00001621B-page 69 2015 Microchip Technology Inc. FIGURE 7-4: 20-Pin QFN 4mm x 4mm Package Drawing 2015 Microchip Technology Inc. DS00001621B-page 70 CAP1166 FIGURE 7-5: 20-Pin QFN 4mm x 4mm Package Dimensions FIGURE 7-6: 20-Pin QFN 4mm x 4mm PCB Drawing CAP1166 DS00001621B-page 71 2015 Microchip Technology Inc. 7.2 Package Marking FIGURE 7-7: CAP1166 Package Markings - 20-Pin QFN FIGURE 7-8: CAP1166 Package Markings - 24-Pin SSOP C 1 66 - 1 Y WWN N N A RCC e3 TOP BOTTOM Bottom marking not allowed PB-FREE/GREEN SYMBOL (Matte Sn) Lines 1-3: Line 4: Center Horizontal Alignment Left Horizontal Alignment PIN 1 0.41 3x 0.56 Line 1 – SMSC Logo without circled R symbol Line 2 – Device ID, Version Line 3 – Year, Week, Alphanumeric Traceability Code Line 4 – Revision, Country Code 1 e3 TOP BOTTOM PB-FREE/GREEN SYMBOL (Matte Sn) PIN 1 0.6 2x 1.5pt Line 1 – SMSC Logo with circled R symbol Line 2 – Device ID, Version Line 3 – Revision, Year, Week, Traceability Code Line 2 – Vendor Code, Country Code PIN 1 C A 11 P 6 6 - 1 Y W NNNA W ® R B B 9 3 V V V CC - Line 1 – Engineering Code 2x 1.5pt 2015 Microchip Technology Inc. DS00001621B-page 72 CAP1166 APPENDIX A: DEVICE DELTA A.1 Delta from CAP1066 to CAP1166 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 6-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. Added filtering on RESET pin to prevent errant resets. 5. Updated controls so that the RESET pin assertion places the device into the lowest power state available and causes an interrupt when released. See Section 5.2, "RESET Pin". 6. Added 1 bit to the LED Off Delay register (see Section 6.38, "LED Off Delay Register") to extend times from 2s to 5s in 0.5s intervals. 7. Breathe behavior modified. A breathe off delay control was added to the LED Off Delay Register (see Section 6.38, "LED Off Delay Register") so the LEDs can be configured to remain inactive between breathes. 8. Added controls for the LED transition effects when linking LEDs to capacitive sensor inputs. See Section 6.29, "Linked LED Transition Control Register". 9. Added controls to “mirror” the LED duty cycle outputs so that when polarity changes, the LED brightness levels look right. These bits are automatically set when polarity is set. Added control to break this auto-set behavior. See Section 6.30, "LED Mirror Control Register". 10. Added Multiple Touch Pattern detection circuitry. See Section 6.15, "Multiple Touch Pattern Configuration Register". 11. Added General Status register to flag Multiple touches, Multiple Touch Pattern issues and general touch detections. See Section 6.2, "Status Registers". 12. Added bits 6 and 5 to the Recalibration Configuration register (2Fh - see Section 6.17, "Recalibration Configuration Register"). These bits control whether the accumulation of intermediate data and the consecutive negative delta counts counter are cleared when the noise status bit is set. 13. Added Configuration 2 register for LED linking controls, noise detection controls, and control to interrupt on press but not on release. Added control to change alert pin polarity. See Section 6.6, "Configuration Registers". 14. Updated Deep Sleep behavior so that device does not clear DSLEEP bit on received communications but will wake to communicate. 15. Changed PWM frequency for LED drivers. The PWM frequency was derived from the programmed breathe period and duty cycle settings and it ranged from ~4Hz to ~8000 Hz. The PWM frequency has been updated to be a fixed value of ~2000Hz. 16. Register delta: Table A.1 Register Delta From CAP1066 to CAP1166 Address Register Delta Delta Default 00h Page 33 Changed - Main Status / Control added bits 7-6 to control gain 00h 02h Page 34 New - General Status new register to store MTP, MULT, LED, RESET, and general TOUCH bits 00h 44h Page 37 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 41 Changed - Averaging Control updated register bits - moved SAMP_AVG[2:0] bits and added SAMP_- TIME bit 1. Default changed 39h 2Bh Page 44 New - Multiple Touch Pattern Configuration new register for Multiple Touch Pattern configuration - enable and threshold settings 80h CAP1166 DS00001621B-page 73 2015 Microchip Technology Inc. 2Dh Page 45 New - Multiple Touch Pattern Register new register for Multiple Touch Pattern detection circuitry - pattern or number of sensor inputs 3Fh 2Fh Page 45 Changed - Recalibration Configuration updated register - updated CAL_CFG bit decode to add a 128 averages setting and removed highest time setting. Default changed. Added bit 6 NO_CLR_INTD and bit 5 NO_CLR_NEG. 8Ah 38h Page 47 Changed - Sensor Input Noise Threshold updated register bits - removed bits 7 - 3 and consolidated all controls into bits 1 - 0. These bits will set the noise threshold for all channels. Default changed 01h 39h Removed - Noise Threshold Register 2 removed register n/a 41h Page 48 Changed - Standby Configuration updated register bits - moved STBY_AVG[2:0] bits and added STBY_- TIME bit 1. Default changed 39h 77h Page 53 New - Linked LED Transition Control new register to control transition effect when LED linked to sensor inputs 00h 79h Page 54 New - LED Mirror Control new register to control LED output mirroring for brightness control when polarity changed 00h 90h Page 60 Changed - LED Pulse 1 Duty Cycle changed bit decode to be more logarithmic F0h 91h Page 60 Changed - LED Pulse 2 Duty Cycle changed bit decode to be more logarithmic F0h 92h Page 60 Changed - LED Breathe Duty Cycle changed bit decode to be more logarithmic F0h 93h Page 60 Changed - LED Direct Duty Cycle changed bit decode to be more logarithmic F0h 95h Added controls - LED Off Delay Added bits 6-4 BR_OFF_DLY[2:0] Added bit 3 DIR_OFF_DLY[3] 00h FDh Page 65 Changed - Product ID Changed bit decode for CAP1166 51h Table A.1 Register Delta From CAP1066 to CAP1166 (continued) Address Register Delta Delta Default 2015 Microchip Technology Inc. DS00001621B-page 74 CAP1166 APPENDIX B: DATA SHEET REVISION HISTORY Revision Section/Figure/Entry Correction DS00001621B (02-09-15) Features, Table 2-1, Table 2- 2, "Pin Types", Section 5.0, "General Description" References to BC-Link Interface, BC_DATA, BC_- CLK, BC-IRQ#, BC-Link bus have been removed Application Note under Table 2-6 [BC-Link] hidden in data sheet Table 3-2, "Electrical Specifications" BC-Link Timing Section hidden in data sheet Table 4-1 Protocol Used for 68K Pull Down Resistor changed from “BC-Link Communications” to “Reserved” Section 4.2.2, "SMBus Address and RD / WR Bit" Replaced “client address” with “slave address” in this section. Section 4.2.4, SMBus ACK and NACK Bits, Section 4.2.5, SMBus Stop Bit,Section 4.2.7, SMBus and I2C Compatibility Replaced “client” with “slave” in these sections. Table 4-4, "Read Byte Protocol" Heading changed from “Client Address” to “Slave Address” Table 6-1 Register Name for Register Address 77h changed from “LED Linked Transition Control” to “Linked LED Transition Control” Section 6.30 changed CS6 to LED6 Table 6-53 Modified B3 bit name Section 7.7 Package Marking Updated package drawing Appendix A: Device Delta changed 2Dh to 2Fh in item #12 Product Identification System Removed BC-Link references REV A REV A replaces previous SMSC version Rev. 1.32 (01-05-12) Rev. 1.32 (01-05-12) Table 3-2, "Electrical Specifications" Added conditions for tHD:DAT. Section 4.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.0 SMSC Dedicated Slave Devices in I 2C Systems.” Added: CAP1188 supports I2C fast mode at 400kHz. This covers the SMBus max time of 100kHz. Section 6.4, "Sensor Input Delta Count Registers" Changed negative value cap from FFh to 80h. Rev. 1.31 (08-18-11) Section 4.3.3, "SMBus Send Byte" Added an application note: The Send Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Section 4.3.4, "SMBus Receive Byte" Added an application note: The Receive Byte protocol is not functional in Deep Sleep (i.e., DSLEEP bit is set). Rev. 1.3 (05-18-11) Section 6.42, "Revision Register" Updated revision ID from 82h to 83h. Rev. 1.2 (02-10-11) Section A.8, "Delta from Rev B (Mask B0) to Rev C (Mask B1)" Added. CAP1166 DS00001621B-page 75 2015 Microchip Technology Inc. Table 2-1, "Pin Description for CAP1166" Changed value in “Unused Connection” column for the ADDR_COMM pin from “Connect to Ground” to “n/a“. Table 3-2, "Electrical Specifications" PSR improvements made in functional revision B. Changed PSR spec from ±100 typ and ±200 max counts / V to ±3 and ±10 counts / V. Conditions updated. Section 5.5.2, "Recalibrating Sensor Inputs" Added more detail with subheadings for each type of recalibration. Section 6.6, "Configuration Registers" Added bit 5 BLK_PWR_CTRL to the Configuration 2 Register 44h. The TIMEOUT bit is set to ‘1’ by default for functional revision B and is set to ‘0’ by default for functional revision C. Section 6.42, "Revision Register" Updated revision ID in register FFh from 81h to 82h. Rev. 1.1 (11-17-10) Document Updated for functional revision B. See Section A.7, "Delta from Rev A (Mask A0) to Rev B (Mask B0)". Cover 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 Table 3-2, "Electrical Specifications" Conditions for Power Supply Rejection modified adding the following: Sampling time = 2.56ms Averaging = 1 Negative Delta Counts = Disabled All other parameters default Section 6.11, "Calibration Activate Register" Updated register description to indicate which re-calibration routine is used. Section 6.14, "Multiple Touch Configuration Register" Updated register description to indicate what will happen. Table 6-34, "CSx_BN_TH Bit Decode" Table heading changed from “Threshold Divide Setting” to “Percent Threshold Setting”. Section 7.0, "Package Information" Added PCB land pattern. CAP1166-1 added in an SSOP package. Rev. 1.0 (06-14-10) Initial release Revision Section/Figure/Entry Correction 2015 Microchip Technology Inc. DS00001621B-page 76 CAP1166 THE MICROCHIP WEB SITE Microchip provides online support via our WWW site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQ), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com. Under “Support”, click on “Customer Change Notification” and follow the registration instructions. CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office • Field Application Engineer (FAE) • Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://www.microchip.com/support 2015 Microchip Technology Inc. DS00001621B-page 77 CAP1166 PRODUCT IDENTIFICATION SYSTEM To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PART NO. [X] - 1 - XXX - [X](1) l l l l Device Temperature Package Tape and Reel Range Option Examples: Note 1: Tape and Reel identifier only appears in the catalog part number description. This identifier is used for ordering purposes and is not printed on the device package. Check with your Microchip Sales Office for package availability with the Tape and Reel option. Device: CAP1166 Temperature Range: Blank = 0°C to +85°C (Extended Commercial) Package: BP = QFN CZC = SSOP Tape and Reel Option: TR = Tape and Reel(1) CAP1166-1-BP-TR 20-pin QFN 4mm x 4mm (RoHS compliant) Six capacitive touch sensor inputs, Six LED drivers, Dedicated Wake, Reset, SMBus / BC-Link / SPI interfaces Reel size is 4,000 pieces CAP1166-1-CZC-TR 24-pin SSOP (RoHS compliant) Six capacitive touch sensor inputs, Six LED drivers, Dedicated Wake, Reset, SMBus / BC-Link / SPI interfaces Reel size is 2,500 pieces 2015 Microchip Technology Inc. DS00001621B-page 78 CAP1166 Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 9781632770318 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == 2015 Microchip Technology Inc. DS00001621B-page 79 AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Austin, TX Tel: 512-257-3370 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 ASIA/PACIFIC Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2943-5100 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 China - Dongguan Tel: 86-769-8702-9880 China - Hangzhou Tel: 86-571-8792-8115 Fax: 86-571-8792-8116 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 ASIA/PACIFIC China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 Taiwan - Kaohsiung Tel: 886-7-213-7828 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Dusseldorf Tel: 49-2129-3766400 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Germany - Pforzheim Tel: 49-7231-424750 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Poland - Warsaw Tel: 48-22-3325737 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Worldwide Sales and Service 01/27/15