Part Number Hot Search : 
C244D BA5372 3C366 SC944160 24M05 74404 13080 AN78L05
Product Description
Full Text Search
 

To Download AT42QT1481-14 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  9621exCat42C07/2014 features ? number of keys: ? up to 48 ? technology: ? patented charge-transfer (transve rse mode), with frequency hopping ? key outline sizes: ? 6 mm 6 mm or larger (panel thickness dependent); widely different sizes and shapes possible ? key spacings: ? 8 mm or wider, center to center (panel thickness dependent) ? electrode design: ? two-part electrode shapes (drive-receive); wide variety of possible layouts ? layers required: ? one layer (with jumpers), two layers (no jumpers) ? electrode materials: ? pcb, fpcb, silver or carbon on film, ito on film ? panel materials: ? plastic, glass, composites, painted surf aces (low particle density metallic paints possible) ? adjacent metal: ? compatible with grounded metal immediately next to keys ? panel thickness: ? up to 50 mm glass, 20 mm plastic (key size dependent) ? key sensitivity: ? individually settable via simple commands over serial interface ? signal processing: ? self-calibration, auto drift compensati on, noise filtering, adjacent key suppression ? ? interfaces: ? uart ? spi slave (4 mhz ma ximum clock rate) ? status indication pin ? debug output ? fmea compliant design features ? iec/en/ul60730 compliant design features ? ul approval ? vde compliance ? for use in both class b and class c safety-critical products atmel at42qt1481 48-key qmatrix fmea iec/ en60730 touch sensor ic datasheet
2 at42qt1481 [datasheet] 9621exCat42C07/2014 ? detects and reports key failure ? power: ? +4.75 to 5.25 v ? package: ? 44-pin 10 10 mm tqfp rohs compliant
3 at42qt1481 [datasheet] 9621exCat42C07/2014 1. pinout and schematic 1.1 pinout configuration ss s_sync / dbg_clk vref drdy status / dbg_data vss vdd y5b y5a y4b y4a smp y3a y2a y1a y0a vdd vss x0 x1 x2 x3 mosi miso sck rst vdd vss xt2 xt1 rx tx ws x4 x5 x6 x7 vdd vss vdd y0b y1b y2b y3b 1 2 3 4 5 6 7 8 9 10 11 23 24 25 26 27 28 29 30 31 32 33 44 43 42 41 40 39 38 37 36 3435 12 13 14 22 21 19 20 18 17 1615 qt1481
4 at42qt1481 [datasheet] 9621exCat42C07/2014 1.2 pin descriptions table 1-1. pin listing pin name type description if unused... 1 mosi i spi data input leave open 2 miso o spi data output leave open 3 sck i spi clock input vdd 4 rst i reset low; has internal 30 k ? ? 60 k ? pull-up resistor. this pin should be controlled by the host. vdd 5 vdd p power C 6 vss p ground C 7 xt2 o ceramic resonator or crystal,16 mhz C 8 xt1 i C 9 rx i uart receive data input vdd 10 tx o uart transmit data; has internal 20 k ? C50k ? pull-up resistor leave open 11 ws i wake-up from sleep input and/or sync input vdd 12 smp i/o sample output C 13 y3a i/o y line connection leave open 14 y2a i/o y line connection leave open 15 y1a i/o y line connection leave open 16 y0a i/o y line connection leave open 17 vdd p power C 18 vss p ground C 19 x0 o x matrix drive line leave open 20 x1 o x matrix drive line leave open 21 x2 o x matrix drive line leave open 22 x3 o x matrix drive line leave open 23 x4 o x matrix drive line leave open 24 x5 o x matrix drive line leave open 25 x6 o x matrix drive line leave open 26 x7 o x matrix drive line/ leave open 27 vdd p power C 28 vss p ground C 29 vdd p power C 30 y0b i/o y line connection leave open
5 at42qt1481 [datasheet] 9621exCat42C07/2014 i input only o output only, push-pull i/o input/output od open drain output p ground or power 31 y1b i/o y line connection leave open 32 y2b i/o y line connection leave open 33 y3b i/o y line connection leave open 34 y4a i/o y line connection leave open 35 y4b i/o y line connection leave open 36 y5a i/o y line connection leave open 37 y5b i/o y line connection leave open 38 vdd p power C 39 vss p ground C 40 status / dbg_data o status output (active low) or debug data; has internal 20 k ? C50k ? pull-up resistor leave open 41 drdy i/o this pin must be used. 1 = comms ready; needs a 100 s grace period before checking. open-drain with internal 20 k ? C 50 k ? pull-up resistor C 42 vref i connect to vss C 43 s_sync / dbg_clk o scope synchronization output or debug clock leave open 44 ss i spi slave select; has internal 20 k ? C50k ? pull-up resistor leave open table 1-1. pin listing (continued) pin name type description if unused...
6 at42qt1481 [datasheet] 9621exCat42C07/2014 1.3 schematic figure 1-1. typical circuit for component values in figure 1-1 check the following sections: ? section 2.7 on page 10 : cs capacitors (cs0 C cs5) ? section 2.8 on page 11 : sample resistors (rs0 C rs5) ? section 2.10 on page 12 : matrix resistors (rx0 C rx7, ry0 C ry5) ? section 2.13 on page 14 : power supply y5 y4 y3 y2 y1 y0 x1 x2 x4 x5 x7 tx rx vdd x0 x3 x6 + spi mosi ss rs5 rs3 rs2 rs1 rx2 rx3 rx6 rx0 rx5 4.7k drdy miso scope vreg rx7 cs4 cs5 cs2 cs3 cs0 cs1 rx1 rx4 uart vunreg + matrix y-scan matrix x-drive sclk rs4 rs0 wake sync qt1481 ry5 ry3 ry4 ry1 ry2 ry0 27 vdd 28 vss 8 xt1 3 sck 44 ss 4 rst 21 x2 24 x5 6 vss 18 vss 39 vss 7 xt2 11 ws 41 drdy 1 mosi 9 rx 2 miso 43 37 y5b 36 y5a 35 y4b 33 y3b 13 y3a 32 y2b 34 y4a 31 y1b 15 y1a 30 y0b 14 y2a 20 x1 19 x0 16 y0a 26 x7 25 x6 23 x4 42 vref 40 10 tx 17 vdd 5 vdd 12 smp 38 vdd 22 x3 29 vdd status / dbg_data vdd s_sync / dbg_clk creg1 creg2 c1 c2 c3 ceramic resonator or crystal,16 mhz
7 at42qt1481 [datasheet] 9621exCat42C07/2014 2. hardware and functional 2.1 introduction the at42qt1481 (qt1481) is a digital burst mode sensor, desi gned specifically for qmatrix layout touch controls; it includes all signal processing functions necessary to provide stable sensing under a wide variety of changing conditions. only a few external parts are required for ope ration. the entire circuit can be built within a few square centimeters of single-sided pcb area. cem-1 and fr1 punched, single-sided materials can be used for the lowest possible cost. the pcbs rear can be mounted flush on the back of a glass or plastic panel using a conventional adhesive, such as 3m vhb two-sided adhesive acrylic film. the qt1481 employs transverse charge-transfer (qt ? ) sensing, a technology that senses changes in electrical charge forced across two electrode elements by a pulse edge (see figure 2-1). figure 2-1. field flow between x and y elements the qt1481 allows a wide range of key sizes and shapes to be mixed together in a single touch panel. the qt1481 is designed for use with up to 48 keys. the qt1481 uses both uart and spi interfaces (only one at a time) to allow key data to be extracted and to permit individual key parameter setup. the interface protocol uses simple single byte commands and responds with single byte responses in most cases. the command structure is designed to minimize the amount of data traffic while maximizing the amount of information conveyed. in addition to normal operating and setup functions t he qt1481 can also report back actual signal strengths and error codes. qmbtn software for the pc can be used to program the op eration of the ic as well as read back key status and signal levels in real time. a debug output interface is also supported, which can be used to monitor many operating variables during product development. the qt1481 incorporates many tests and checks to enable a product to achieve fmea and en60730 compliance. the results of some tests need to be checked by the host. to achieve a compliant design, the host must read back the test results and confirm their validity. the qt1481 is able to scan the touch matrix twice as fast as previous generation devices; it can take twice the number of samples in a given time frame. this mean s the qt1481 is much better equipped to continue normal operation in the face of heavy noise. see appendix c. on page 68 for information on conducted noise immunity. overlying panel cmos driver x element y element
8 at42qt1481 [datasheet] 9621exCat42C07/2014 2.2 key numbers the keys are numbered from 0 C 47. table 2-1 shows the key numbering. 2.3 matrix scan sequence key scanning begins with location x = 0, y = 0 (key 0). all keys on x0 are scanned first, then x1 and finishing with all keys on x7 (for example, the sequence x0y0, x0y1 C x0y5, x1y0, x1y1...). table 2-1 shows the key numbering. all keys on the same x line are excited together in a burst of acquisition pulses whose length is determined by the setups parameter bl (see section 5.9 on page 43 ); this can be set to a different value for each key. a burst is completed entirely before the next x line is excited. at the end of each burst the resulting signals, one for each y line, are converted to digital form and processed. the burst length directly impacts key gain. each key can have a different burst length in order to allow tailoring of key sensitivity. although all keys on an entire x line are excited simultaneously, the charge is selectively captured at each y line according to the burst length selected. 2.4 enabling/disabling keys ? burst paring unused keys are always pared from the computation sequence in order to optimize speed. if all keys are disabled on any given x, the entire x line is also pared from the bur st sequence. if only two x lines have enabled keys, only two timeslots are used for scanning. the ndil parameter is used to enable and disable keys in the matrix. setting ndil = 0 for a key disables it ( section 5.5 on page 41 ). keys that are disabled are eliminated from the scan sequence to save scan time and thus power. if all keys on an x line are disabled, the burst for the entire x line is removed from the scan sequence, further saving time and power. this has the consequence of affecting the scan rate of the entire matrix as well as the time required for initial matrix calibration. it does not affect the time required to calibrate an individual key once the matrix is initiall y calibrated after power-up or reset. it is very important that only those keys that physically exist are enabled. all non-existent k eys must be disabled (ndil = 0) otherwise other keys in the matrix can incorrectly report their signal as zero. table 2-1. key numbers x7 x6 x5 x4 x3 x2 x1 x0 y0 7 6 5 4 3 2 1 0 key numbers y1 15 14 13 12 11 10 9 8 y2 23 22 21 20 19 18 17 16 y3 31 30 29 28 27 26 25 24 y4 39 38 37 36 35 34 33 32 y5 47 46 45 44 43 42 41 40
9 at42qt1481 [datasheet] 9621exCat42C07/2014 2.5 response time the response time of the qt1481 depends on: ? the burst spacing ? the number of enabled x lines ( section 5.5 on page 41 ) ? the detect integrator settings ( section 5.5 on page 41 ) ? mains sync ? and the serial polling rate by the host microcontroller example, without mains sync : ? nxe = number of x lines enabled = 8 ? ndil = norm detect integrator limit = 2 ? fdil = fast detect integrator limit = 5 ? bs = burst spacing = 1 ms ? fmea = fmea test slot = 1 ? hpr = host polling rate = 10 ms ? tms = time to perform one matrix scan the worst case response time is computed as: tr = (tms ndil) + hpr tms = ((nxe + fmea + (fdil C 1)) bs) tr = (((nxe + fmea + (fdil C 1)) bs) ndil) + hpr for the above example values: tr = (((8 + 1 + (5 C 1)) 1 ms) 2) + 10 ms = 36 ms the use of the status pin to trigger host sampling can reduce this to approximately 26 ms by eliminating the majority of the host polling time (see section 5.20 on page 47 ). tms varies with the configurations of burst length (see section 5.9 on page 43 ) and dwell (see section 5.13 on page 45 ), and should be measured using an oscilloscope. example, with mains sync : the value calculated for tms needs to be rounded up to th e nearest multiple of the mains periods before proceeding with the rest of the calculation. continuing with the above example, tms = ((8 + 1 + (5 C 1)) 1 ms) = 13 ms. rounded up to a multiple of whole mains periods, this becomes 20 ms (assuming a mains frequency of 50 hz). the worst case response time is then computed as: tr = (20 ms 2) + 10 ms = 50 ms an x line is considered enabled if any key on that x line is enabled. an x line is disabled if all keys on that x line are disabled. note: tms will be stretched by 15 ms if sts_debug is enabled.
10 at42qt1481 [datasheet] 9621exCat42C07/2014 2.6 oscillator the oscillator can use either a quartz crystal or a ceramic resonator. in all cases, xt1 and xt2 must both be loaded with low-value capacitors to ground. these capacitors should be in the range 12 pf to 22 pf. follow the manufacturer's recommendations for the appropriate value within this range. resonators and crystals requiring loading capacitors outside this range are unsuitable for operation with the qt1481. a resistor of value 1m ? is connected internally between xt1 and xt2. the frequency of oscillation should be 16 mhz 1% for accurate uart transmission timing. 2.7 sample capacitor; saturation effects the charge sampler capacito rs on the y pins (cs0 C cs5) should be npo (preferred), x7r ceramics or pps film; npo offers the best stability. the value of these capacitors is not critical but 4.7 nf is recommended for most cases. cs voltage saturation is shown in figure 2-2 . this nonlinearity is caused by excessive voltage accumulation on cs inducing conduction in the pin protection diodes. this badly saturated signal destroys key gain and introduces a strong thermal coefficient which can cause phantom detection. figure 2-2. vcs ? nonlinear during burst (burst too long, or cs too small, or x-y transcapacitance too large) the cause of this is either from the burst length being to o long, the cs value being too small, or the x-y transfer coupling being too large. solutions include loosening up the interdigitation of key structures, greater separation of the x and y lines on the pcb, increasing cs, and decreasing the burst length. increasing cs makes the part slower; decreasing burst length makes it less sensitive. a better pcb layout and a looser key structure (up to a point) have no negative effects. cs voltages should be observed on an oscilloscope with the matrix layer bonded to the panel material; if the rs side of any cs ramps is more negative than C0.25 v during any burst (not counting overshoot spikes which are probe artifacts), there is a potential saturation problem. figure 2-3 on page 11 shows a defective waveform similar to that of figure 2-2 , but in this case the distortion is caused by excessive stray capacitance coupling from the y line to ac ground; for example, from running too near and too far alongside a ground trace, ground plane, or other traces. the excess coupling causes the charge-transfer effect to dissipate a significant portion of the received charge from a key into the stray capacitance. x drive ynb
11 at42qt1481 [datasheet] 9621exCat42C07/2014 figure 2-3. vcs ? poor gain, nonlinear during burst (excess capacitance from y line to gnd) this phenomenon is more subtle; it can be best detected by increasing bl to a high count and watching what the waveform does as it descends towards and below C0.25 v. the waveform appears deceptively straight, but it slowly starts to flatten even before the C0.25 v level is reached. a correct waveform is shown in figure 2-4 . note that the bottom edge of the bottom trace is substantially straight (ignoring the downward spikes). unlike other qt circuits, the cs capacitor values on qt14 81 have no effect on conversion gain. however, they do affect conversion time. unused y lines should be left open. figure 2-4. vcs ? correct 2.8 sample resistors the sample resistors (rs0 C rs5) are us ed to perform single-slope analog-to-digital (adc) conversion of the acquired charge on each cs capacitor. these resistors directly control acquisition gain; larger values of rs proportionately increase signal gain. va lues of rs can range from 220 k ? to 4.7 m ? . 470 k ? is a typical value for most purposes. larger values for rs also increas e conversion time and may reduce the fastest possible key sampling rate, which can impact response time especially with larger numbers of enabled keys. unused y lines do not require an rs resistor. 2.9 signal levels using atmel qmbtn software it is easy to observe the absolute level of signal received by the sensor on each key. the signal values should normally be in th e range of 250 to 750 counts with properly designed key shapes (see the touch sensors design guide , available on the atmel website). however, long adjacent runs of x and y lines can also artificially boost the signal values, and induce signal satu ration: this is to be avoided. the x-to-y coupling should come mostly from intra-key electrode coupli ng, not from stray x-to-y trace coupling. qmbtn software is available free of charge on the atmel website. x drive ynb x drive ynb
12 at42qt1481 [datasheet] 9621exCat42C07/2014 the signal swing from the smallest finger touch should preferably exceed 10 counts, with 15 being a reasonable target. the signal threshold setting (nthr) should be se t to a value guaranteed to be less than the signal swing caused by the smallest touch. increasing the burst length (bl) paramete r increases the signal st rengths as will increasi ng the samp ling resistor (rs) values. 2.10 matrix se ries resistors the x and y matrix scan lines should use series resi stors (rx0 C rx7 and ry0 C ry5 respectively) for improved emc performance ( figure 1-1 on page 6 ). x drive lines require rx in most cases to reduce edge ra tes and thus reduce rf emissions. values range from 1 k ? to 100 k ? , typically 1 k ? . y lines need ry to reduce emc susceptibility problems and in some extreme cases, esd. values range from 1 k ? to 100 k ? , typically 1 k ? . y resistors act to reduce noise susceptibility problems by forming a natural low-pass filter with the cs capacitors. it is essential that the rx and ry resistors and cs capacitors be placed very close to the chip. placing these parts more than a few millimeters away opens the circuit up to high frequency interference problems (above 20 mhz) as the trace lengths between the components and the chip start to act as rf antennas. the upper limits of rx and ry are reached when the signal level and hence key sensitivity are clearly reduced. the limits of rx and ry depend on key geometry and stray capacitance, and thus an oscilloscope is required to determine optimum values of both. dwell time is the duration in which charge coupled from x to y is captured ( figure 2-5 on page 12 ). increasing the dwell time increases the signal levels lost to higher values of rx and ry , as shown in figure 2-5 . too short a dwell time causes charge to be 'lost', if there is too much rising edge roll-off. lengthening the dwell time causes this lost charge to be recaptured, thereby restoring key sensit ivity. in the qt1481 dwell time is adjustable (see section 5.13 on page 45 ). dwell time problems can also be solved by either reduci ng the stray capacitance on the x line(s) (by a layout change C for example, by reducing x line exposure to nearby ground planes or traces) or the rx resistor needs to be reduced in value (or a combination of both approaches). figure 2-5. drive pulse roll-off and dwell time note: the dwell time is a minimum of approximately 125 ns ? see section 5.13 on page 45 one way to determine x-line settling time is to monitor the fiel ds using a patch of metal foil or a small coin over the key (see figure 2-6 ). only one key along a particular x line needs to be observed, as each of the keys along a particular x line are identical. the dwell time should exceed the observed 95% settling of the x-pulse by 25% or more. x drive y gate dwell time lost charge due to inadequate settling before end of dwell time
13 at42qt1481 [datasheet] 9621exCat42C07/2014 figure 2-6. probing x-drive waveforms with a coin 2.11 key design for information about key design refer to the touch sensors design guide on the atmel website. 2.12 pcb layout, construction 2.12.1 overview it is best to place the chip near the touch keys on the same pcb so as to reduce x and y trace lengths, thereby reducing the chances for emc problems. long connection traces act as rf antennas. the y (receive) lines are much more susceptible to noise pickup than the x (drive) lines. even more importantly, all signal related discrete parts (resistors and capacitors) should be very close to the body of the chip. wiring between the chip and the various resistors and capacitors should be as short and direct as possible to suppress noise pickup. ground planes and traces should not be used around the keys and the y lines from the keys. ground areas, traces, and other adjacent signal conductors that act as ac ground (such as vdd) absorb the received key signals and reduce signal-to-noise ratio (snr) and thus are counter productive. ground planes around keys also make water film effects worse. ground planes, if used, should be placed under or around the qt1481 chip itself and the associated resistors and capacitors in the circuit, under or around the power supply, and back to a connector, but nowhere else.
14 at42qt1481 [datasheet] 9621exCat42C07/2014 2.12.2 led traces and other switching signals digital switching signals near the y lines induce transients into the acquired signals, deteriorating the snr performance of the qt1481. such signals should be routed away from the y lines, or the design should be such that these lines are not switched during the course of signal acquisition (bursts). led terminals which are multiplexed or switched into a floa ting state and which are within or physically very near a key structure (even if on another nearby pcb) should be bypassed to either vss or vdd with at least a 10 nf capacitor of any type, to suppress capacitive coupling effects which can induce false signal shifts. led terminals which are constantly connected to vss or vdd do not need further bypassing. 2.12.3 pcb cleanliness modern no-clean flux is generally compatible with capacitive sensing circuits. if a pcb is reworked in any way, clean it thoroughly to remove all traces of the flux residue around the capacitive sensor components. dry it thoroughly before any further testing is conducted. 2.13 power supply considerations for vdd information see section 6.1 and section 6.2 on page 58 . as the qt1481 uses the power supply as an analog reference, the power should be very clean and come from a separate regulator. a standard inexpensive low dropout (ldo) type regulator should be used; it should not also be used to power other loads such as relays or other high current devices. load shifts on the output of the ldo can cause vdd to fluctuate enough to cause false detection or sensitivity shifts. ceramic 0.1 f bypass capacitors should be placed very close and routed with short traces to all power pins of the ic. there should be at least three such capacitors around the part. 2.14 startup/calibration times the qt1481 employs a rigorous initialization and self-check sequence for en60730 compliance. if the self-tests are passed, the last step in this sequence enables the serial communication interfaces. the communication interfaces are not enabled if a safety critical fault is detected during the startup sequence. the qt1481 requires initialization times as follows: 1. normal reset to ability to communicate: 110 ms. 2. from very first power-up to ability to communicate: 2,200 ms (one time event to initialize all of eeprom, or to recover eeprom copy from flash in the event of eeprom corruption). 3. from power-up to ability to communicate: 140 ms in the event the setups have been changed and the part needs to back up the eeprom to flash. the qt1481 determines a reference level for each key by calibrating all the keys immediately after initialization. each key is calibrated independently and in parallel with all other enabled keys. calibration takes between 11 and 62 keyscan cycles; each cycle being made up of one sample from each enabled key. the qt1481 ends calibration for a key if its reference has converged with the signal dc level. the calibration time is shortest when the keys signals are stable, typically increasing with increasing noise levels to the maximum of 62 keyscan cycles. caution: if a pcb is reworked in any way, it is highly likely that the behavior of the no-clean flux will change. this can mean that the flux chang es from an inert material to one that can absorb moisture and dram atically affect capacitive measurements due to additional leakage currents. if so, t he circuit can become erratic and exhibit poor environmental stability.
15 at42qt1481 [datasheet] 9621exCat42C07/2014 an error is reported for each key where calibration cont inues for the maximum number of keyscan cycles and the key's reference does not appear to have converged with the signal s dc level. noise levels can vary from key to key such that some keys may take longer to calibrate than others. however, the qt1481 can report during this interval that the key(s) affected are still in calibration via the qt1481 status bits. table 2-2 shows keyscan cycle times and calibration times per key versus dwell time and burst length for all 48 keys enabled. the values given assume that msync = off, sdc = 0 and sts_debug = 0. 2.15 reset input should communications with the qt1481 be lost the rst pin can be used to reset the qt1481 to simulate a power- down cycle, in order to then bring the qt1481 up into a known state. the pin is active low, and a low pulse lasting at least 10 s must be applied to this pin to cause a reset. to provide for proper operation during power transitions the qt1481 has an internal brownout detector set to 4 v. the reset pin has an internal 30 k ? C60k ? resistor. a 2.2 f capacitor plus a diode to vdd can be connected to this pin as a traditional reset circuit, but this is not necessary. a force reset command, 0x04 , also generates an equivalent hardware reset where the device is still in communication with the host. where the qt1481 has detected a failure of one of the internal en60730 checks and has subsequently locked up in an infinite loop, only a power cycle or an external hardware reset can restore normal operation. it is strongly recommended that the host has control over the rst pin. if an external hardware reset is not used, this pin may be connected to vdd or left floating. 2.16 detection integrators see also section 5.5 on page 41 . the qt1481 features a detection integration mechanism, which acts to confirm a detection in a robust fashion. a per-key counter is incremented each time the key has exceeded its threshold and stayed there for a number of acquisitions. when this counter reaches a preset limit the key is finally declared to be touched. for example, if the limit value is 10, then the qt1481 has to exceed its threshold and stay there for a minimum of 10 acquisitions before the key is declared to be touched. the qt1481 uses a two-tier confirmation mechanism having two such counters for each key. these can be thought of as inner loop and outer loop confirmation counters. the inner counter is referred to as the fast-di. this acts to attempt to confirm a detection via rapid successive acquisition bursts, at the expense of delaying the sampling of the next key. each key has its own fast-di counter and limit value. these limits can be changed via the setups block on a per-key basis. the outer counter is referred to as the normal-di. this di counter increments whenever the fast-di counter has reached its limit value. the normal-di counter also has a limit value which is settable on a per-key basis. table 2-2. keyscan cycle and calibration times setups keyscan cycle time calibration time (min) calibration time (max) bl = 0 (16 pulses) dwell = 0 (125 ns) freq0 = 0 signal level = 200 counts 6ms 66 ms (11 6) 372 ms (62 6) bl = 3 (64 pulses) dwell = 15 (9.9 s) signal level = 400 counts 17 ms 187 ms (11 17) 1054 ms (62 17)
16 at42qt1481 [datasheet] 9621exCat42C07/2014 if a normal-di counter reaches its terminal count, the corresponding key is declared to be touched and becomes active. note that the normal-di can only be incremented once per complete keyscan cycle (more slowly), whereas the fast-di is incremented on the spot without interruption (at the same burst spacing timing). the net effect of this mechanism is a multiplication of the inner and outer counters and hence a highly noise-resistant sensing method. if the inner limit is set to 5, and the outer to 3, the net effect is a minimum of 5 3 = 15 threshold crossings to declare a key as active. 2.17 sleep the qt1481 can be configured for automatic sleep using the sleep drift compensation (sdc) setup, and woken with a low pulse applied to the ws pin. if the sleep feature is enabled using sdc (see section 5.16 on page 46 ), and the sleep command ( 0x16 ) has been issued, the qt1481 sleeps whenever possible to conserve power. periodically, it should be woken by the host using the ws pin. upon being woken, the matrix is scanned and the qt1481 returns to sleep unless there is activity which demands further attention. the qt1481 returns to sleep automatically after a period of ina ctivity, the duration of which is defined by the awake feature. at least one full matrix scan is always performed after waking up and before returning to sleep. at the end of each matrix scan, the part returns to sleep unless recent activity, such as a touch event, demands further attention. if there has been recent activity, the part performs another complete matrix scan before attempting to sleep once again. this process is repeated indefinitely until the activity stops and the part returns to sleep. key touch activity forces the matrix scanning into free run whereby each matrix scan is not interleaved with sleep. the part will not sleep while any key is calibrating or if any touch events are detected at any key in the most recent scan of the key matrix. if the sleep feature is disabled in the setups, the qt1481 never sleeps. sleep should be used with caution if the qt1481 is bei ng used in an fmea or en60730 compliant design because all operations are stopped within the qt1481 while the part is asleep and the host might have difficulty distinguishing between the en60730 counters appearing to run slow bec ause the part is intermittently sleeping, and faulty operation. however, in the knowledge it has configured the qt1481 for sleep, the host can take this into account. for example, the host could wake the qt1481 at suitable intervals, check for correct operation and then return the qt1481 to sleep. also see mains sync C msync , section 5.14 on page 45 . 2.18 fmea tests failure modes and effects analysis (fmea) is a tool used to determine critical failure problems in control systems. fmea analysis is being applied increasingly to a wide variety of applications including domestic appliances. to survive fmea testing the control board must survive any single problem in a way that the overall product can either continue to operate in a safe way, or shut down. the most common fmea requirements regard opens and s horts analysis of adjacent pins on components and connectors. however, other criteria must usually be taken into account, for example complete qt1481 failure. the qt1481 incorporates a number of special self-test features which allow products to pass such fmea tests easily, and enable key failure to be detected. these tests are performed in an extra burst slot after the last enabled key. the sequence of tests are performed repeatedly during normal running once all initialization is complete. during initialization, all fmea error flags ar e cleared. any fmea errors are reported as the tests are performed for the first time. the fmea testing is done on all enabled keys in the matrix, and results are reported via the serial interface. disabled keys are not tested. assuming the part does not sleep, the real time that elapses from the start of one sequence of fmea tests to the start of the next, or the fmea sequence time, never exceeds 2 s.
17 at42qt1481 [datasheet] 9621exCat42C07/2014 also, since the qt1481 only communicates in slave mode, the host can determine immediately if the qt1481 has suffered a catastrophic failure. the qt1481 can also participat e in cross-checking the integrity of the host controller, and even reset the host if no communications have been heard from it in a short while (via the status pin output). the fmea tests performed are: ? x drive line shorts to vdd and vss ? x drive line shorts to other pins ? x drive signal deviation ? y line shorts to vdd and vss ? y line shorts to other pins ? x to y line shorts ? cs capacitor checks including shorts and opens ? vref test ? key gain (see section 5.19 on page 47 ) other tests incorporated into the qt1481 include: ? a test for signal levels against a preset minimum value (lower signal limit (lsl) setup, see section 5.18 on page 47 ). if any signal level falls below this level, an error flag is generated. ? 16-bit crc communications checks on all data returns. ? last-command command to verify that an instruction was properly received. ? loss of communications reset of the host controller. 2.19 en60730 compliance the qt1481 also incorporates special test features which, together with the fmea tests, allow products to achieve iec/en/ul60730 compliance with ease. iec/en60730 compliance demands dynamic verification of all safety related components and sub-components within a product. the qt1481 is able to verify some sub-components internally, but others require verification by a separate, independent processing unit with another timing source. to this end the qt1481 exposes a number of internal operating parameters through its serial communications interface and requires the cooperation of a host to check and verify these parameters regularly. it is also necessary for the host to verify th e communications by checking and validat ing the crc, which the qt1481 appends to data returns. if a crc check should fail, the host should not rely on the data but retry the transmission. occasional crc failures might be anticipated as a result of noise spikes. repeated crc failures might indicate a safety-critical failure. where the qt1481 is able to verify sub-components internally, but any such verification fails, the qt1481 disables serial communication and locks up in an infinite loop. the host can detect this condition if repeated crc failures are observed. during normal operation the host must perform regular reads of the iec/en60730 counters (see section 4.7 on page 28 ) to verify correct operation of the qt1481. the host must also perform regular reads of the qt1481 status (see section 4.7 on page 28 ) and verify there are no errors reported. the fmea error flag, lsl error flag and setups crc error flag must all be considered as part of an iec/en60730 compliant design. the host can try to recover from any safety critical failure by resetting the qt1481 using its rst pin. the host should allow a grace period in consideration of the start-up and init ialisation time the qt1481 requires after reset to ability to communicate (see section 2.14 on page 14 ). the sub-components that the qt1481 is able to verify internally are tested repeatedly during the normal running of the device, and the various tests run in parallel. as each test ends the result is recorded and the test is restarted. the real time that elapses from the start of each test to the start of the next iteration of the same test is called the failure detect time, or hazard time, the maximum time for which an error could be undetected.
18 at42qt1481 [datasheet] 9621exCat42C07/2014 each test is broken down into a number of smaller parts, each of which is processed in turn during each matrix scan. each test is therefore completed either after a number of matrix scans, as shown in table 2-3 . table 2-4 shows matrix scan times for setups that yield the shortest matrix scan time and a much longer scan time resulting from the use of long dwell and low frequency settings. longer matrix scan times are possible than those shown in table 2-4 by using even longer dwell times and higher values for freq0 (lower burst frequencies), but these are considered extreme settings. table 2-3. test run times (measured in matrix scans) test required matrix scans to complete test fmea 8 other 18 variable memory 2304 firmware crc 2000 setups crc 44 table 2-4. matrix scan times setups conditions matrix scan time (ms) bl = 0 (16 pulses), dwell = 0 (0.13 s), freq0 = 1, all keys enabled, fhm = 0, msync = 0 (off), sdc = 0 (sleep disabled), debug=0 (off). 7.5 bl = 3 (64 pulses), dwell = 13 (5.1 s), freq0 = 25, all keys enabled, fhm = 0, msync = 0 (off), sdc = 0 (sleep disabled), debug = 0 (off). 17
19 at42qt1481 [datasheet] 9621exCat42C07/2014 table 2-5 shows the failure detect times for the internal tests assuming a ma trix scan time of 9ms. longer failure detect times are possible than those shown in table 2-5 where the matrix scan time is longer. the failure detect times are proportional to the matrix scan time. the failure detect time for other setups can therefore be determined by observing the matrix scan time using an oscilloscope and scaling the times given in table 2-5 accordingly. alternatively, the failure detect times can be calculated by taking the numbers from table 2-3 and multiplying them by the matrix scan time. unnecessarily long settings of dwell and low burst frequencies should be avoided be cause these will also result in undesirably long failure detect times. 2.19.1 ul approval / vde compliance the qt1481 has been given a compliance test report by vde and is approved by ul as a component suitable for use in both class b and class c safety critical products. by using this device and following the safety critical information throughout this datasheet, manufacturers can easily add a touch sense interface to their product, and be confident it can also readily pass ul or vde testing. 2.20 frequency hopping this qt1481 supports frequency hopping, which tries to select a sampling frequency that does not clash with noise at specific frequencies elsewhere in products or product operating environments. it tries to hop away from the noise. during the acquisition bursts, a sequence of pulses are emitted with a particular spacing, which equates to a particular sampling frequency. if the latter should coincide with significant noise generated elsewhere, touch sensing may be seriously impaired or false detections may occur. to help combat such noise, the burst frequency can either be preset to one specific frequency (with frequency hopping disabled), away from t he noisy frequency, or frequency hopping can be enabled and set to switch dynamically between three specific configured frequencies or even set to sweep a configured range of frequencies. table 2-5. failure detect time test failure detect time (ms) fmea 72 other 162 variable memory 20736 firmware crc 18000 setups crc 396 conditions: matrix scan time = 9 ms. qt1481 does not sleep for duration of tests.
20 at42qt1481 [datasheet] 9621exCat42C07/2014 3. serial communications 3.1 introduction the qt1481 uses either spi or uart communications mode s; it cannot use both at the same time. the qt1481 responds on whichever interface it receives a command. the qt1481 also includes a debug output interface, which can be used to monitor many operati ng variables during product development. the host device always initiates communications sequences; the qt1481 is incapable of chattering data back to the host. this is intentional for fmea and iec/en60730 purposes so that the host always has total control over the communications with the qt1481. ? in spi mode the qt1481 is a slave, so that even return data following a command is controlled by the host. ? in uart mode , the qt1481 still only responds to the host after a command, but the responses are not controlled by the host. a command from the host always ends in a response of some kind from the qt1481. some transmission types from the host or the qt1481 employ a crc check byte to provide for robust communications. a drdy line that handshakes transmissions is provided. this is needed by the host from the qt1481 to ensure that transmissions are not sent when the qt1481 is busy or has not yet processed a prior command. in uart mode this line is bidirectional, and the qt1481 can use it to suspend transmissions back to the host if the host is busy. if the host does not observe the correct drdy timing, random communication errors may result. initiating or resetting communications: after a reset, or should communications be lost due to noise or out-of-sequence reception, the host should repeatedly wait for a period not less than the qt1481 communications time-out (110 ms 5 ms), and send a 0x0f (return last command) command until the complement of 0x0f , which is 0xf0 , is received. then, the host can resume normal run mode communications from a clean start. poll rate: the typical poll rate in normal run operation should be no faster than once per 10 ms. even 50 ms is more than fast enough to extract status data using the 0x06 command overview (see section 4.7 on page 28 ) in most situations. streaming commands like the 0x0d command (dump setups (see section 4.10 on page 31 )) or multi-byte response commands like 0x07 can and should pace at the maximum possible rate. run poll sequence: in normal run mode the host should limit traffic with a minimalist control structure (see section 4.19 on page 32 ). the host should just send a 0x06 command until something requires a deeper state inspection. if there is more than one key in detect, the host should use 0x07 to find which additional keys are in detect. if there is an error, the host should ascertain the error type based on command 0x0b and take appropriate action. 3.2 drdy pin drdy is an open-drain output (in spi mode) or bidirect ional pin (in uart mode) with an internal 20 k w C50k w pull- up resistor. most communications failures are the result of failure to properly observe the drdy timing. serial communications pacing is controlled by this pin. use of drdy is critical to successful communications with the qt1481. in either uart or spi mode, the host is permitted to perform a data transfer only when drdy has returned high. additionally, in uart mode, the qt1481 delays responses to the host if drdy is being held low by the host. after each byte transfer, drdy goes low after a short delay and remains low until the qt1481 is ready for another transfer. a short delay occurs before drdy is driven low because the qt1481 may otherwise be busy and requires a finite time to respond.
21 at42qt1481 [datasheet] 9621exCat42C07/2014 drdy may go low for a microsecond only. during the period from the end of one transfer until drdy goes low and back high again, the host should not perform another transfer. therefore, before each byte transmission the host should first check that drdy is high again. if the host wants to perform a byte transfer with the qt1481 it should behave as follows: 1. wait at least 100 s after the previous transfer (time s5 in figure 3-2 on page 23 : drdy is guaranteed to go low before this 100 s expires). 2. wait until drdy is high (it may already be high). 3. perform the next transfer with the qt1481. in most cases it takes up to 3 ms for drdy to return high again. however, this time is longer with some commands or if the sts_debug setup is enabled, as follows: 0x01 (setups load): <20 ms 0x02 (low level cal and offset): <20 ms add 15 ms to the above times if the sts_debug setup is enabled. other drdy specifications: min time drdy is low: 1 s max time drdy is low after reset: 100 ms 3.3 spi communications no special configuration is required to make the qt1481 operate in spi mode. the qt1481 responds on the interface which is used to command it. spi and uart interfaces cannot be used simultaneously. spi communications operate in slave mode only, and obey drdy control signaling. the clocking is as follows: clock idle: high clock shift out edge: falling clock data in edge: rising max clock rate: 4 mhz spi mode requires five signals to operate (see figure 3-1 on page 22 ): mosi ? master out / slave in data pin: used as an input for data from the host (master). this pin should be connected to the mosi (do) pin of the host device. miso ? master in / slave out data pin: used as an output for data to the host. this pin should be connected to the miso (di) pin of the host. miso floats in three-state mode between bytes when ss is high to facilitate multiple devices on one spi bus. sck ? spi clock: input only clock from host. the host must shift out data on the falling sck edge, the qt1481 clocks data in on the rising edge. the qt1481 likewise shifts data out on the falling edge of sck back to the host so that the host can shift the data in on the rising edge. sck must idle high; it should never float. ss ? slave select: input only; acts as a framing signal to the sensor from the host. ss must be low before and during reception of data from the host. it must not go high again until the sck line has returned high; ss must idle high. this pin includes an internal pull-up resistor of 20 k ? C50k ? . when ss is high, miso floats. drdy ? data ready: when high C indicates to the host that the qt1481 is ready to send or receive data. this pin idles high. this pin includes an internal pull-up resistor of 20 k ? C50k ? . in spi mode this pin is an output only (that is, open drain with internal pull-up resistor).
22 at42qt1481 [datasheet] 9621exCat42C07/2014 null bytes: when the qt1481 responds to a command with one or more response bytes, the host should issue null com- mands ( 0x00 ) to get the response bytes back. the host should not send new commands until all the responses are accepted back from the qt1481 from the prior command via nulls. new commands attempted during intermediate byte transfers are ignored. wake operation: the qt1481 can be configured to automatically sleep. the host must awaken the qt1481, when required, with a 8.5 s minimum low level on the ws pin. with the ss line tied to ws, the host can simply toggle ss low for 8.5 s minimum to wake the qt1481. the host should not send an actual spi byte to prevent the qt1481 from seeing a byte it cannot properly interpret due to timing errors during wake-up. alternatively, ss can be driven low 8.5 s before the first sck of each transfer. there is an interval of approximately 1.5 ms from t he pulse on ws before the qt1481 is able to resume pro- cessing. transmissions to the qt1481 within this interval are discarded. the recommended method to re-establish communications after wake from sleep is to send the qt1481 a 0x0f (get last command command) repeatedly until the correct response comes back (the command's own complement, that is, 0xf0 ). spi line noise: in some designs it is necessary to run spi lines over ribbon cable across a lengthy distance on a pcb. this can introduce ringing, ground bounce, and other noise pr oblems which can introduce false spi clocking or false data. simple rc networks and slower data rates are helpful to resolve these issues. a crc is appended to responses in order to detect transmission errors to a high level of certainty. figure 3-1. communications signals ? spi mosi mosi miso miso sck sck drdy p_out p_in ss host mcu qt device
23 at42qt1481 [datasheet] 9621exCat42C07/2014 figure 3-2. spi slave-only mode timing (fosc = 16 mhz) 3.4 uart communications see also section 5.17 on page 46 . uart mode is selected as soon as the qt1481 receives any data on the uart rx pin. there is no other configuration required to make the qt1481 operate in uart mode. uart mode communications function in the same basic wa y as spi communications. the baud rate is adjusted by means of setup parameter sr ( section 5.17 on page 46 ). once a new baud rate has been set, the qt1481 must be reset for the new rate to take effect. the major difference with spi mode is that the uart mode is asynchronous and so the host does not clock the qt1481. no framing ss or clock signal is required, simplifying the interface greatly. return data is sent from the qt1481 back to the host when the data is ready. multidrop capability: tx floats within 10 s after each transmitted byte. this line can be shared with other uart based peripherals. tx includes an internal 20 k ? C50k ? pull-up resistor to vdd to prevent the line from floating down. wake operation: the qt1481 can be configured to automatically sleep. the host must awaken the qt1481, when required, with a 8.5 s (minimum) low level on the ws pin. with the rx line tied to ws the qt1481 can be awaked with a dummy byte from the host. the first received uart byte from the host after a wake should be a 0xff ; any other byte value could create a framing error. the start bit of the 0xff forms a convenient narrow wake pulse without being long enough to be interpreted as a byte during the wake operation. there is an interval of approximately 1.5 ms from t he pulse on ws before the qt1481 is able to resume pro- cessing. transmissions to the qt1481 within this interval are discarded. the recommended method to re-establish communications after wake from sleep is to send a 0x0f (get last command command) repeatedly until the correct response comes back (the command's own comple- ment, that is, 0xf0 ). drdy (from qt) high via pull-up resistor s6 s5 ss (from host) 76 5 ? 43 210 76 5 43 210 s1 s3 s9 data shifts into qt on rising edge clk (from host) mosi (data from host) 76 5 43 210 ? 76 5 43 210 ? miso (data from qt) data shifts out of qt on falling edge 3-state 3-state s4 (header byte) (header byte) s8 s7 s2 76 5 43 2 (null byte to get qt response) 76 5 43 210 ? 10 data response s1: > 125 ns s2: < 20 ns s3: > 25 ns s4: < 20 ns s5: < 100 s s6: > 1 s s7: > 125 ns s8: > 125 ns s9: > 250 ns
24 at42qt1481 [datasheet] 9621exCat42C07/2014 rx ? receive async data. this pin is an input only. tx ? transmit async data. drives out when transmitting but floats within 10 s of the end of the stop bit, to allow bussing with several similar devices. tx should idle high, and it includes an internal 20 k ? C50k ? resistor to vdd. tx is push-pull when transmitting data for good drive characteristics. figure 3-3. communications signals ? uart uart transmission parameters are: baud rate: 9600 C 115,200 start bits: 1 data bits: 8 parity: none stop bits: 1 drdy in uart mode: section 3.2 on page 20 applies. drdy is bidirectional in uart mode and can be pulled down by either the qt1481 or the host (wire-and), so that either device can be inhibited from sending data until the other is ready. the host should obey this control line or transmission errors can occur. the host should grant a 10 s grace period after clamping drdy low in which it can still accept the start bit of a transmission from the qt1481. as explained in section 3.2 on page 20 , drdy is not clamped low immediately after the qt1481 receives a byte; there can be up to a 100 s delay from the end of the stop bit before drdy goes low. sampling of drdy by the host should occur 100 s after the byte has been fully sent. if drdy is already high at this point, or becomes high, then it is clear to send. due to the asynchronous nature of uart timing, reception of a byte is considered complete when the receiver detects the stop bit, which is typically some considerable time before the transmitter actually terminates the stop bit. depending on the baud rate, it is therefore possible for the qt1481 to assert the drdy pulse and start transmitting a response during the stop bit of the command from the host. if the host needs to slow the pace of the qt1481 return data, it can assert drdy before transmitting the stop bit of the command byte. null bytes: unlike spi mode, there is no reason to send null bytes to the qt1481 in uart mode. the qt1481 responds to commands with data when ready, subject to the drdy line being high. uart noise: in some designs it is necessary to run tx and rx over a lengthy distance. this can introduce ringing, ground bounce, and other noise problems which can corrupt data. simple rc networks and slower data rates are helpful to resolve these issues. a crc is appended to responses in order to detect transmission errors to a high level of certainty. uart timing parameters: uart timings are as shown in figure 3-4 on page 25 . delay timings for parameters u2 and u3 are dependent on the specific command. see section 3.5 . host mcu rx tx p_in tx rx drdy qt device
25 at42qt1481 [datasheet] 9621exCat42C07/2014 figure 3-4. uart timing 3.5 debug output interface the qt1481 includes a debug interface which may be used for observing many internal operating variables, in real time, even while the part is actively communicating with a host over either the spi or uart serial interfaces. the debug interface provides a useful aid during product development (see appendix b. on page 64 ). rx (command from host) tx(response to host) drdy (handshake) u1 u2 u4 u3 * u1: 20 s u2, u3: see text u4: 10 s ?? floats high floats high * * stop bit
26 at42qt1481 [datasheet] 9621exCat42C07/2014 4. control commands 4.1 introduction refer to table 4-5 on page 35 for further details. suggested command sequencing: see section 4.19 on page 32 . the qt1481 features a set of commands which are used for control and status reporting. the host device has to send the command to the qt1481 and await a response. spi mode: while waiting the host should delay for 100 s from the end of the command, then start to check if drdy is, or goes, high. if it is high, then the host master can clock out the resulting byte(s). command timeouts in spi mode: where a command involves multiple byte transfers to the qt1481, each byte must be transmitted within 110 ms 5 ms of the prior byte or the command times out. where a command involves a multiple byte response from the qt1481, the entire command must be completed within 110 ms 5 ms or the command times out. no error is reported for this condition. the command simply ceases. uart mode: after the command is sent, the qt1481 sends back the response, usually starting within 1 ms. the host can clamp drdy low (wire-and logic) to inhibit a response (for up to 110 ms) if the host is not able to receive the transmission for a while. command timeouts in uart mode: where a command involves multibyte transfers in either direction, each byte must be transmitted within 110 ms 5 ms of the prior byte or the command times out. no error is reported for this condition. the command simply ceases. word return byte order: where a word or long word is returned (1 6 or 24 bit number or bit pattern) the low order byte is sent or received first. response delays: the qt1481 requires processing time to complete command requests and respond with an answer to the host. these timings are the same for spi and uart modes. most commands respond with data in 1 ms maximum; timing parameters u2 and u3 in figure 3-4 on page 25 are therefore 1 ms maximum for these commands. the exceptions are: 0x01 (setups upload): <20 ms 0x02 (low level cal and offset): <20 ms add 15 ms to all stated response times if the sts_debug setup is enabled. 4.2 null command ? 0x00 this command is used to shift back data from the qt1481 in spi mode. since the host device is always the master in spi mode, and data is clocked in both directions, the null command is required frequently to act as a placeholder where the desire is to only get data back from the qt1481, not to send a command. in spi communications, when the qt1481 responds to a command with one or more response bytes, the host can issue a new command instead of a null on the last byte shift operation. new commands during intermediate byte shift-out operat ions are ignored, and null bytes should always be used. 4.3 enter setups mode ? 0x01 this command is used to initiate the setups block transfer from host to qt1481. the command must be repeated twice within 110 ms or the command fails; the repeating command must be sequential without any intervening command. after the second 0x01 from the host, the qt1481 stops scanning keys and replies with the character 0xfe . this command suspends normal sensing starting from the receipt of the second 0x01. a failure of the command causes a timeout. each byte in the block must arrive at the qt1481 no later than 110 ms after the previous one or a timeout occurs. any timeout causes the qt1481 to cancel the block load and go back to normal operation.
27 at42qt1481 [datasheet] 9621exCat42C07/2014 if no response comes back, the command was not received and the qt1481 should preferably be reset by the host just in case there are any other problems. if 0xfe is received by the host from the qt1481, then the host should begin to transmit the block of setups to the qt1481. the drdy line handshakes the data. the delay between bytes can be as short as 100 s but the host can make it longer than this if required, but no more than 110 ms. the last two bytes the host should send is the crc for the block of data only (the crc should not include the command in its c alculation). after the block transfer the qt1481 checks the crc and responds with 0x00 if there was an error. regardless, it programs the internal eeprom . if the crc was correct it replies with a second 0xfe after the eeprom was programmed. if there was an error in the block transfer the qt1481 restores the last known good setups from flash memory the next time the qt1481 is reset. however until that point, the qt1481 attempts to operate using the new setups block even if it is corrupt. note that some setups do not take effect until the part is reset (for example, baud rate). at the end of the full block load sequence, the qt1481 rest arts sensing without recalibration. most of the setups in the block take effect immediately, but it is important to reset the qt1481 after a block load to make all the changes effective and permanent. see section 4.6 on page 27 . command response timing: responses to the bytes in the setups block (both drdy and return byte at the end) by the part can take as long as 20 ms each. 4.4 low level cal and offset ? 0x02 this command must be repeated twice within 110 ms or the command fails. the repeating command must be sequential without any intervening command. after the second 0x02 from the host, the qt1481 replies with the character 0xfd . shortly thereafter the qt1481 performs a calibration and offset procedure across all keys and restarts operation. if no 0xfd comes back, the command was not properly received or a previous command 0x02 is still being processed. this co mmand takes up to 3 s econds to complete. the ho st can monitor the progress of the calibration by checking the qt1481 status byte, using command 0x06 , during the course of the calibration. the calibration bit will be set throughout the process. the low level calibration and offset procedure involves the device calibrating each key in turn at each of the operating frequencies selected with freq0, freq1 and freq2, calculating the difference between the signals at those frequencies and storing the results as offsets into cfo_1 and cfo_2 for each key. when the procedure is complete, the host can read back the setups and record cfo_1 and cfo_2 into its own copy of the setups block. the qt1481 does not change the setups crc, so there will be a mismatch in the setups crc after this command completes. the onus is on the host to compute the crc and upload a definitive setups block to the qt1481. 4.5 cal all ? 0x03 this command must be repeated twice within 110 ms or the command fails. the repeating command must be sequential without any intervening command. after the second 0x03 from the host, the qt1481 replies with the character 0xfc . shortly thereafter the qt1481 recalibrates all keys and restarts operation. if no 0xfc comes back, the command was not properly received and the qt1481 should preferably be reset. the host can monitor the progress of the recalibration by checking the qt1481 status byte, using command 0x06 , during the course of the calibration. a key shows an error flag (using command 0x8 k ) indicating the key calibration failed if the reference did not successfully converge with the signal average, or if its signal is below the low signal threshold. 4.6 force reset ? 0x04 the command must be repeated twice within 110 ms or the command fails. the repeating command must be sequential without any intervening command. after the second 0x04 , the qt1481 replies with the character 0xfb just prior to executing the reset operation.
28 at42qt1481 [datasheet] 9621exCat42C07/2014 after any reset, the qt1481 automatically performs a full key calibration on all keys. the host can monitor the progress of the reset to see when the chip is operating again by checking the qt1481 status byte for recalibration by repeatedly issuing command 0x06 (see section 4.7). 4.7 qt1481 overview ? 0x06 reports the iec/en60730 counters, a qt1481 status byte, and the first key declaring detect. the status pin becomes inactive on processing this command, if it was made active by a key touch (or release). this command returns five individual data bytes, plus two crc bytes, in the sequence: 1. device status 2. touch overview 3. 100 ms counter (for iec/en60730 compliance) 4. matrix scan counter (for iec/en60730 compliance) 5. signal fail counter (for iec/en60730 compliance) a 16-bit crc is appended to the response; this crc folds in the command 0x06 itself initially. device status: this byte is a collection of general status bits, see table 4-1 on page 28 . bit 6: set if calibration failed on any enabled key. bit 5: set if an fmea error was detected during operation. this flag will be set during calibration after reset, and should be ignored until calibration has completed. see section 2.18 on page 16 . bit 4: set if a mismatch occurs with the setups crc. if this happens, it is recommended that the qt1481 be reset, which forces the setups to be recovered from internal flash. if a reset does not cure the problem, the setups block should be reloaded (see section 5.31 on page 53 ) and the qt1481 reset again. the time required to recompute the setups crc and report an error is a maximum of 1150 ms. bit 3: set if there was a mains sync error, for example there was no sync signal detected within the allotted 100 ms amount of time. see section 5.14 on page 45 . this condition is not necessarily fatal to operation, how- ever the qt1481 operates very slowly and may suffer fr om noise problems if the sync feature is required for noise reasons. bit 2: reports that an enabled key has a low signal reference value, lower than the user-settable lsl value (see section 5.18 on page 47 ). bit 1: set if any key is in the process of calibrating. table 4-1. device status bits bit description 7 reserved 6 1 = calibration has failed on an enabled key 5 1 = fmea failure detected 4 1 = setups crc mismatch 3 1 = mains sync error 2 1 = lsl failure 1 1 = any key in calibration 0 reserved
29 at42qt1481 [datasheet] 9621exCat42C07/2014 touch overview: this byte gives an initial indication of the number of keys touched as well as the number of the first touched key, as follows: bits 7?6: a 2-bit unsigned value indicating the number of touched keys. a value of three indicates that three or more keys are touched. bits 5?0: a 6-bit unsigned value encoding the first or only key to be touched, in the range 0 C 47. this num- ber is valid only if the value encoded in bits 7, 6 is non-zero, indicating a key is touched. the iec/en60730 counters (100 ms, matrix scan, signal fail) can be used by the host to check the correct speed and operation of the qt1481. the host must check these values regularly to meet the requirements of iec/en60730. iec/en60730 requires that each component of a system be checked for correct operation. where correct speed of operation must be confirmed and the qt1481 has no way to perform such a cross-check internally, counters are exposed through this command to enable independent cross-checking by the host. 100 ms counter: this is an 8-bit unsigned counter that is incremented once every 100 ms, counting 256 steps repeatedly from 0 to 255. when the counter has reached 255 it wraps back to 0 at the next 100 ms interval. the counter should take between 25 and 26 seconds (256 x 100 ms = 25.6 s) to count up from zero to 255 and wrap back to zero again. the host must read this counter regularly and cross-check the counting rate against one of its own clock sources. if the 100 ms counter is read once every second, for example, the host should find the counter has increased by 10 counts from the value returned at each previ ous read and should traverse one full count range (256 steps) when the host has read the counter 25 or 26 times. the host should verify that the 100 ms counter is incrementing at the expected rate. if the counter advances faster or slower than expected, there could be a fault with the qt1481 or the host, and the host should adopt an appropriate strategy to meet the required safety standard. signal fail counter: this is an 8-bit unsigned counter that is incremented each time a signal capture failure occurs. signal capture failure can occur where keys are enabled but do not physically exist. only keys that exist should be enabled; all other keys should be disabled. signal capture failure can also occur where heavy noise spikes corrupt the signal; occasional capture failure is to be expected and does not unduly affect the qt1481 performance. regular capture failure would extend the key response time. the host must check this counter regularly. tests should be made with a heavy noise source during develop- ment to determine how the key response time is affect and determine a maximum acceptable count rate for this counter. table 4-2. key touch information bit description 7C6 0 = no touched keys 1 = 1 key in detect 2 = 2 keys in detect 3 = 3 or more keys in detect 5C0 number of 1st key declaring detect (0 C 47)
30 at42qt1481 [datasheet] 9621exCat42C07/2014 matrix scan counter: this is an 8-bit counter that is incremented before the start of each matrix scan, or keyscan cycle, counting 256 steps repeatedly from 0 to 255. when the counter has reached 255 it wraps back to 0 at the start of the next keyscan cycle. the keyscan cycle time should be measured with an oscilloscope during development. the matrix scan count rate can be calculated directly from this. for example, if the keyscan cycle time is mea- sured as 10 ms, the counter counts 256 steps in 2560 ms (256 10 ms). the host must read this counter regularly to check the matrix scan is operating at the expected rate. if the matrix scan counter is read once every 100 ms, for example, the host should find the counter has increased by 10 counts from the value returned at eac h previous read and should traverse one full count range (256 steps) when the host has read the counter 25 or 26 times. the host should verify the counter is incrementing at the expected rate. if the counter advances faster or slower than expected, there could be a fault with the qt1481 or the host, and the host should adopt an appropriate strategy to meet the required safety standard. note: the status pin becomes inactive on processing this command if it was made active by a key touch (or release). see section 5.20 on page 47 for sts_touch in the sts setups byte. 4.8 report detections for all keys ? 0x07 returns six bytes which indicate all keys which are in detection, if any, as a bit-field. key 0 reports in bit 0 of byte 0, the first byte returned. key 47 is reported in bit 7 of byte 5. see table 4-3 on page 30 . a 16-bit crc is appended to the response; this crc folds in the command itself initially. 4.9 report error flags for all keys ? 0x0b returns six bytes which show error flags as a bit-field for all keys plus two crc bytes. key 0 reports in bit 0 of byte 0, the first byte returned; key 47 is reported in bit 7 of byte 5. see table 4-3 and table 5-5 on page 55 . this command reports an error flag for each enabled key if calibration has failed or if the key has a reference below the lsl (see section 5.18 on page 47 ), or if the fmea key gain test fails (see section 5.19 on page 47 ). a 16-bit crc is appended to the response. this crc folds in the command itself initially. table 4-3. bit fields for multiple key reporting and key numbering bit number (x line number) 8 7 6 5 4 3 2 1 0 byte number returned (y line #) 0 7 6 5 4 3 2 1 0 1 15 14 13 12 11 10 9 8 2 23 22 21 29 19 18 17 16 3 31 30 29 28 27 26 25 24 4 39 38 37 36 35 34 33 32 5 47 46 45 44 43 42 41 40
31 at42qt1481 [datasheet] 9621exCat42C07/2014 4.10 dump setups block ? 0x0d this command causes the qt1481 to dump the entire internal setups block back to the host. in uart mode, if the transfer is not paced faster than 110 ms 5 ms per byte the transfer is aborted and the qt1481 times out. this coul d happen if the host were controlling drdy . in spi mode, the entire command must be competed within 110 ms 5 ms or the transfer could be aborted. during the transfer, sensing is halted. sensing is resumed after the command has finished. a 16-bit crc is appended to the response; this crc is the same as the setups table crc and is sent lsbyte first. 4.11 eeprom crc ? 0x0e this command returns the 16-bit crc calculated on the set-ups block and is sent back lsbyte first. the crc sent back is the same crc that is appended to the end of the setups block. no crc is appended to the response. 4.12 return last command ? 0x0f this command returns the last received command character, in 1s complement (inverted). if the command is repeated twice or more, it returns the inversion of 0x0f , which is 0xf0 . if a prior command was not valid or was corrupted, it returns the bad command as well. no crc is appended to the response. 4.13 internal code ? 0x10 this command returns an internal code, as a value from 0 C 255. a 16-bit crc is appended to the response. this crc folds in the command 0x10 itself initially. 4.14 internal code ? 0x13 this command returns an internal code as a value from 0 C 255. a 16-bit crc is appended to the response; this crc folds in the command 0x13 itself initially. 4.15 sleep ? 0x16 the qt1481 replies with the character 0xe9 before setting an internal flag to indicate that low power sleep mode has been requested. the flag does not force the qt1481 to sleep immediately but requests the qt1481 to sleep at the end of each matrix scan whenever possible. sleep must also be enabled in setups (see section 5. on page 38 ), otherwise this command has no effect. the internal flag is cleared upon receipt of any valid command except command 0x16 , but the qt1481 must already be awake in order to receive the command. the qt1481 is awake for at least one keyscan cycle time after a wake-up pulse at the ws pin. to cancel the internal sl eep request flag, issue a wake-up pulse at the ws pin and then send any valid command other than 0x16 within one matrix scan cycle. the matrix scan cycle time is dependent on a number of setups parameters and should be measured using an oscilloscope. see section 2.17 on page 16 for details of the sleep behavior. 4.16 data set for one key ? 0x4k returns the data set for key k, where k = 0 C 47. to form this command, the key number is logical-ord into the byte 0x40. this command returns 5 data bytes, plus two crc bytes, in the seque nce: signal 2 bytes reference 2 bytes normal detect integrator 1 byte
32 at42qt1481 [datasheet] 9621exCat42C07/2014 signal and reference are returned lsbyte first. a 16-bit crc is appended to the response. this crc folds in the command 0x4 k itself initially. 4.17 status for key k ? 0x8k returns a bit-field for key where is from 0 C 47. the bit-field is explained in table 4-4 : bit 4 (fmea kgtt) will be set during ca libration after reset, and should be ignored until calibration has completed. a 16-bit crc is appended to the response. this crc folds in the command 0x8k itself initially. 4.18 cal key k ? 0xck this command must be repeated twice within 110 ms or the command fails. the repeating command must be sequential without any intervening command. this command functions the same as the 0x03 cal all command except that this command only affects one key where is from 0 to 47. the chosen key is recalibrated in its native timeslot. normal running of the part is not interrupted and all other keys operate correctly throughout. this command is for use only dur ing normal operation to try to recover a single key that has failed or is not calibrated correctly. returns the 1s complement of 0xck just before the key is recalibrated. 4.19 command sequencing to interface the qt1481 with a host, the flow diagram of figure 4-1 on page 34 is suggested. the actual settings of the setups block used should normally just be the default settings except where changes are specifically required, such as for sensitivity, timing, or aks changes. the circles in this drawing are communications interchan ges between host and sensor. the rectangles are internal host states or processing events. if any communications exchange fails, either the qt1481 fails to respond within the allotted time, or the response crc is incorrect, or the response is out of context (the response is clearly not for the intended command). in these cases the host should just repeat the command. the control flow spends 99% of its time alternating between the two states within the dashed rectangle. if a key is detected, the control flow enters key detection processing. stuck key detection processing ( 0xck ) is optional, since the qt1481 contains the max on-duration timeout function and can therefore recalibrate the stuck key automatically. however, the host can recalibrate stuck k eys with greater flexibility if the recalibration timeouts are set to infinite and the host recalibrates them under specific conditions. table 4-4. status for key k bit description 7 1 = reserved 6 1 = reserved 5 1 = reserved 4 1 = fmea kgtt test failed for this key 3 1 = key is in detect 2 1 = signal ref < lsl (low signal error). see section 5.18 on page 47 . 1 1 = key is undergoing calibration 0 1 = calibration on this key failed
33 at42qt1481 [datasheet] 9621exCat42C07/2014 error handling takes place whenever an error flag is detected, or the qt1481 stops communicating (not shown). the error handling procedure is up to the designer. however no rmally this would entail shutting down the product if the error is serious enough (for example, a key that will not calibrate, or a fmea \ iec/en60730 class error). normally it is not required to reload the setups, since the qt1481 itself stores a backup copy of these in flash memory should the eeprom become corrupt. however the host should reset the qt1481 so that the qt1481 copies the flash setups to eeprom, and then the hos t should check that the eeprom crc is correct. only if this fails should the eeprom be reloaded by the host. one exception to this rule is just after power-up, since a crc error in the eeprom setups at this point is clear ly a critical error that would require reloading. this happens at the factory, during the very first power-up cycle. the last command command can be used at any time to resynchronize failed communications, for example due to timing errors.
34 at42qt1481 [datasheet] 9621exCat42C07/2014 figure 4-1. suggested communications flow 0x0e setups crc check 0x04 force reset 0x06 device overview 0x07 report all detections only 1 key in detect 0xck cal key 'k' ~10ms delay key detection(s) processing no key, no error > 1 key detected resolvable error setups crc failed 2x setups crc failed 1x eeprom crc error, or calibration fail, or fmea fail, or multiple errors crc is ok power on or hardware reset stuck key detected safe shutdown 0x0b get errors for all keys error handling any error flag, or fmea error en60730 error, or calibration error done keys ok note: crc errors or incorrect responses should cause each transmission to retry internal host processes 0x0f get 'last command' 0xf0 returned 0xf0 not returned 0x01 load setups block en60730 counter sequence error comms with qt
35 at42qt1481 [datasheet] 9621exCat42C07/2014 at42qt1481 table 4-5. command summary hex name description #/cmd # rtnd rtn range crc description page 0x00 null command used to get data back in spi mode 1 1 0C 0xff C flushes pending data from qt1481; one required to extract each response byte. 26 0x01 enter setups mode enter setups, stop sensing; followed by block load of binary setups of length nn. command must be repeated twice consecutively without any intervening command in 110 ms to execute. sensing autorestarts, however, the qt1481 should be reset after the block load to ensure all new setups take effect. 2 + nn + 2 2 0xfe + 0xfe or 0xfe + 0x00 (err) 16 first 0xfe issued when ready to receive data, second 0xfe issued when all loaded and burned; else timeout. if two commands not received in 110 ms, times out and no response is issued. part times out if each byte not received within 110 ms of previous byte. if crc failure, returns 0x00 instead of 0xfe data block length is nn + 2 (crc-16). lsl and crc should be sent low byte first. internal eeprom updates regardless of crc health, but, if the crc is bad, the eeprom is declared invalid and thus on reset the eeprom is restored from flash backup, overwriting the desired (but corrupt) new setups. 26 0x02 low level calibration and offset forces qt1481 to calibrate at all three selected frequencies. command must be repeated twice consecutively without any intervening command in 110 ms to execute. after completion, host should read back the setups block, and then upload the setups block together with the correct crc. 2 1 0xfd C 0xfd returned if command successfully received and qt1481 is not processing a previous 0x02 command. 27 0x03 cal all forces qt1481 to recalibrate all keys; re-enters run mode afterwards automatically; 0x03 must be repeated twice consecutively without any intervening command in 110 ms to execute 2 1 0xfc C returns 1s complement of command to acknowledge command once the calibration has been initiated. if two commands not received in 110 ms, times out and no response is issued. 27 0x04 force reset forces qt1481 to reset. command must be repeated twice consecutively without any intervening command in 110 ms to execute 2 1 0xfb C returns 1s complement of command to acknowledge command prior to reset. if two commands not received in 110 ms, times out and no response is issued. 27
36 at42qt1481 [datasheet] 9621exCat42C07/2014 at42qt1481 0x06 qt1481 overview device status, indication of first key touched, iec/en60730 counters. 1 7 0C 0xff each byte 16 returns 5 individual data bytes in following sequence: device status 1st key (range 0 C 47) 100 ms counter (host must read for iec/en60730 compliance) matrix scan counter (host must read for iec/en60730 compliance) signal fail counter (host must read for iec/en60730 compliance) 16-bit crc (of command + return data) is appended to return 28 0x07 report all keys sends back all key detect status bits (bit-field) 1 8 0C 0xff 6 bytes 16 16-bit crc (of command + return data) is appended to return 30 0x0b error flags for all error bit fields 1 8 0C 0xff 6 bytes 16 16-bit crc (of command + return data) is appended to return 30 0x0d dump setups returns setups block area followed by crc. scanning is halted and then autorestarted after the command has completed. 1 nn+2 0C 0xff nn + 2 bytes 16 dump of fixed length nn followed by crc-16 crc is same as crc at end of setups block load. lsl and crc words are sent back to host low byte first. in uart mode, part times out if each byte not transmitted within 110 ms of previous byte. this can happen if drdy is driven by the host. in spi mode, the entire command must be completed within 110 ms. 31 0x0e eeprom crc gets eeprom crc 1 2 0C 0xffff 16 crc-16 only on setups block this crc is the same as the crc at the end of setups block load. this word is returned low byte first. 31 0x0f return last command returns last command received 1 1 0C 0xff C returns 1's complement of last command even if bad 31 0x10 return internal code diagnostic code for factory use. 1 3 0C 0xff 16 returns internal code. 16-bit crc (of command + return data) is appended to return 31 0x13 return internal code diagnostic code for factory use. 1 3 0C 0xff 16 returns internal code. 16-bit crc (of command + return data) is appended to return 31 table 4-5. command summary (continued) hex name description #/cmd # rtnd rtn range crc description page
37 at42qt1481 [datasheet] 9621exCat42C07/2014 at42qt1481 0x16 sleep enter sleep at end of each matrix scan if no activity and if sleep is also enabled in setups 1 1 0xe9 C returns 1's complement of command to acknowledge; wakes on int to scan matrix before returning to sleep. sleep disabled on receipt of any other valid command. 31 0x4k data for 1 key get signal, ref, norm di for key k {0 C 47} signal: 2 bytes; ref: 2 bytes; norm di: 1 byte 1 7 0C 0xff each byte 16 signal and ref are tx as 2 bytes, lsbyte first. 16-bit crc (of command + return data) is appended to return 31 0x8k status for key k get status byte for key k {0 C 47} 1 3 0C 0xff 16 bits 7 C 5: reserved bit 4: 1 = fmea kgtt test failed on this key bit 3: 1 = key is in detect bit 2: 1 = (ref < lsl) bit 1: 1 = key is in calibration bit 0: 1 = calibration of this key failed 16-bit crc (of command + return data) is appended to return 32 0xck cal key k force calibration of key k where k = 0 C 47. command must be repeated twice consecutively without any intervening command in 110 ms to execute 2 1 0x10 C 0x3f C used in run mode. normal sensing of other keys not affected. cal of k only takes place in the keys normal timeslot. returns the ones complement of the command char, once the calibration is scheduled. 32 table 4-5. command summary (continued) hex name description #/cmd # rtnd rtn range crc description page
38 at42qt1481 [datasheet] 9621exCat42C07/2014 5. setups the qt1481 calibrates and processes all signals using a number of algorithms specifically designed to provide for high survivability in the face of adverse environmental challenges. it provides a large number of processing options which can be user-selected to implement very flexible, robust keypanel solutions. user-defined setups are employed to alter the algorithm to suit each application. the setups are loaded into the qt1481 in a block load over one of the serial interfaces and stored in an onboard eeprom array. after a setups block load, the qt1481 should be reset to allow the new se tups block to be shadowed in internal flash rom and to allow all the new parameters to take effect. this reset can be either a hardware or software reset. refer to table 5-4 on page 53 for a list of all setups. block length issues: t he setups block is 350 bytes long (including the two crc bytes) to accommodate 48 keys. this can be a burden on sma ller host controllers with limited memory. in larger quantities the qt1481 can be procured with the setups block preprogrammed from atmel. if the application only requires a small number of keys (such as 16) then the setups table can be compressed in the host by filling large stretches of the setups area with nulls. many setups employ lookup-table (lut) value translation. the setups block summary on page 56 shows all translation values. default values shown are factory defaults. 5.1 negative threshold ? nthr the negative threshold value is established relative to a key signal reference value. the threshold is used to determine key touch when crossed by a negative-going signal swing after having been filtered by the detection integrator. larger absolute values of threshold desensitize ke ys since the signal must travel farther in order to cross the threshold level. conversely, lower thresholds make keys more sensitive. as cx and cs drift, the reference point drift-compensates for these changes at a user-settable rate. the threshold level is recomputed whenever the reference point moves, and thus it is also drift compensated . the amount of nthr required depends on the amount of signal swing that occurs when a key is touched. thicker panels or smaller key geometries reduce key gain (signal sw ing from touch), thus requiring smaller nthr values to detect touch. the negative threshold is programmed on a per-key basis using the setup process . see table 5-7 on page 56 and also section 5.2 on page 39 (threshold multiplier C thrm) typical values: 3 to 8 (7 to 12 counts of threshold; 4 is internally added to nthr to generate the threshold). default value: 6 (10 counts of threshold)
39 at42qt1481 [datasheet] 9621exCat42C07/2014 5.2 threshold multiplier ? thrm it is sometimes useful to be able to operate the qt1481 with much higher detect thresholds than can be set with nthr alone. the threshold multiplier (thrm) is a multiplier which extends the range of nthr and pthr considerably. the operating detect threshold for a key is arrived at by multiplying nthr or pthr for that key by thrm. note that the detect threshold range is extended at the expense of the step size. table 5-1 shows the extended threshold range for each value of thrm. this function is programmed on a global basis. see table 5-7 on page 56 . thrm possible range: 0, 1, 2, 3 ( 1, 2, 4, 8) thrm default value: 0 ( 1) 5.3 positive threshold ? pthr the positive threshold is used to provide a mechanism for recalibration of the reference point when a key signal moves abruptly to the positive. this condition is not no rmal, and usually occurs only after a reca libration when an object is touching the key and is subsequently removed. the desire is normally to recover from these events quickly. positive hysteresis: physt is fixed at 12.5% of the positive threshold value and cannot be altered. positive threshold levels are programmed using the setup process on a per-key basis. see also section 5.2 on page 39 (threshold multiplier C thrm) typical values: 1 to 4 (5 to 8 counts of threshold; 4 is internally added to pthr to generate the threshold) default value: 2 (6 counts of threshold) table 5-1. extended detect threshold thrm multiplier extended detect threshold 0 1 4C18 1 2 8C36 2 4 16 C 72 3 8 32C144
40 at42qt1481 [datasheet] 9621exCat42C07/2014 5.4 drift compensati on ? ndrift, pdrift signals can drift because of changes in cx and cs over time and temperature. it is crucial that such drift be compensated for, or false detections and sensitivity shifts can occur. drift compensation ( figure 5-1 on page 40 ) is performed by making the reference level track the raw signal at a slow rate, but only while there is no detection in effect. the ra te of adjustment must be performed slowly, otherwise legitimate detections could be ignored. the qt1481 dr ift compensates using a slew-rate limited change to the reference level; the threshold and hysteresis values are slaved to this reference. figure 5-1. thresholds and drift compensation when a finger is sensed, the signal falls since the human body acts to absorb charge from the cross-coupling between x and y lines. an isolated, untouched foreign object (a coin, or a water film) causes the signal to rise very slightly due to an enhancement of coupling. this is contrary to the way most capacitive sensors operate. once a finger is sensed, the drift compensation mechanism ceases since the signal is legitimately detecting an object. drift compensation only works when the signal in question has not crossed the negative threshold level. the drift compensation mechanism can be made asymmetric if desired; the drift-compensation can be made to occur in one direction faster than it does in the other simply by changing the ndrift and pdrift setups parameters. this can be done on a per-key basis. specifically, drift compensation should be set to com pensate faster for increasing signals than for decreasing signals. decreasing signals should not be compensated quickly, since an approaching finger could be compensated for partially or entirely before even touching the touch pad. however, an obstruction over the sense pad, for which the sensor has already made full allowance, could suddenly be removed leaving the sensor with an artificially suppressed reference level and thus become insensitive to touch. in the latter case, the sensor should compensate for the object's removal by raising the reference level relatively quickly. drift compensation and the detection time-outs work together to provide for robust, adaptive sensing. the time-outs provide abrupt changes in reference calibration depending on the duration of the signal event. ndrift and pdrift are effective while the part is awake. if sleep is enabled, sdc must also be configured so drift compensation operates at the desired rate. ndrift typical values: 9 to 11 (2 to 3.3 s / count of drift compensation translation via lut, page 56 ) ndrift default value: 10 (2.5 s / count of drift compensation) pdrift typical values: 9 to 11 (2 to 3.3 s / count of drift compensation; translation via lut, page 56 ) pdrift default value: 10 (2.5 s / count of drift compensation) threshold signal hysteresis reference output driftst
41 at42qt1481 [datasheet] 9621exCat42C07/2014 5.5 detect integrat ors ? ndil, fdil the ndil parameter is used to enable and disable keys in t he matrix and to provide signal filtering. to enable a key, its ndil parameter should be nonzero (ndil = 0 disables a key). to suppress false detections caused by spurious events like electrical noise, the qt1481 incorporates a detection integrator or di counter mechanism. a per-key counter is incremented each time the key has exceeded its threshold and is decremented each time the key does not exceed its threshold. when this counter reaches a preset limit the key is finally declared to be touched. the di mechanism uses two counters. the first is the fast di counter fdil. when a key signal is first noted to be below the negative threshold, the key enters 'fast burst' mode. in this mode the burst is rapidly repeated for up to the specified limit count of the fast di counter. each key has its own counter and its own specified fast-di limit (fdil), which can range from 1 to 15. (fdil = 0 is invalid; do not use). when fast-burst is entered the qt1481 locks onto the key and repeats the acquire burst until the fast-di counter reaches fdil or drops back to zero. after this the qt1481 resumes normal keyscanning and goes on to the next key. the normal di counter counts the number of times the fast-di counter reached its fdil value. the normal di counter can only increment once per complete scan of all keys. only when the normal di counter reaches ndil does the key become formally active. the net effect of this is that the sensor can rapidly lock onto and confirm a detection with many confirmations, while still scanning other keys. the ratio of fast to normal counts is completely user-settable via the setups process. the total number of required confirmations is equal to fdil times ndil. ? if fdil = 6 and ndil = 2, the total detection confirmations required is 12, even though the qt1481 scanned through all keys only twice. the di is extremely effective at reducing false detections at the expense of slower reaction times. in some applications a slow reaction time is desirable. the di can be used to intentionally slow down touch response in order to require the user to touch longer to operate the key. ? if fdil = 1, the qt1481 functions conventionally. each channel acquires only once in rotation, and the normal detect integrator counter (ndil) operates to confir m a detection. fast-di is in essence not operational. ? if fdil 2, then the fast-di counter also operates in addition to the ndil counter. ? if signal nthr then the fast-di counter is decremented due to lack of touch. disabling a key: if ndil = 0, the key becomes disabled. keys disabled in this way are pared from the burst sequence in order to improve sampling rates and thus response time. see section 2. on page 7. note: it is very important to disable keys that do not physically exist in the layout, otherwise real keys can incorrectly report their signal as zero. this function is programmed on a per-key basis. do not use fdil = 0 because it is invalid. ndil typical values :2, 3 ndil default value: 2 fdil typical values : 4 to 6 fdil default value: 5
42 at42qt1481 [datasheet] 9621exCat42C07/2014 5.6 detect integrator multiplier ? dim it is sometimes useful to be able to operate the qt1481 with a higher detect integrator limit than can be set with ndil alone. the detect integrator multiplier (dim) is a multiplier which extends the range of ndil. the operating detect integrator limit for a key is arrived at by multiplying ndil for that key by dim. note that the detect integrator range is extended at the expense of the step size. table 5-2 shows the extended detect integrator range for each value of dim. this function is programmed on a global basis. see table 5-7 on page 56 . if a key is disabled with ndil = 0, dim is ignored for that key. dim default value: 0 ( 1) dim possible range: 0, 1, 2, 3 ( 1, 2, 4, 8) 5.7 negative recal delay ? nrd if an object unintentionally contacts a key resulting in a detection for a prolonged interval it is usually desirable to recalibrate the key in order to restore its function, perhaps after a time delay of some seconds. the negative recal delay timer monitors such detections. if a detection event exceeds the timer's setting, the key is automatically recalibrated. after a recalibration has taken place, the affected key once again functions normally even if it is still being contacted by the foreign object. this feature is set on a per-key basis using the nrd setup parameter. nrd can be disabled by setting it to zero (infinite timeout) in which case the key never autorecalibrates during a continuous detection (but the host could still command it). nrd is set using one byte per key, which can range in value from 0 C 254. nrd above 0 is expressed in 0.5 s increments. thus if nrd = 120, the timeout value is actually 60 seconds. note: 255 is an illegal number; do not use. nrd typical values: 20 to 60 (10 s to 30 s) nrd default value: 20 (10 s) nrd range: 0 C 254 ( ? , 0.5 s C 127 s) 5.8 positive recalib ration delay ? prd a recalibration can occur automatically if the signal swings more positive than the positive threshold level. this condition can occur if there is positive drift but insufficient positive drift compensation, or, if the reference moved negative due to a nrd autorecalibration, and thereafter the signal rapidly returned to normal (positive excursion). as an example of the latter, if a foreign object or a finger contacts a key for period longer than the negative recal delay (nrd), the key is by recalibrated to a new lower reference level. then, when the condition causing the negative swing ceases to exist (the object is removed), the signal can suddenly swing back positive to near its normal reference. table 5-2. extended detect integrator limit dim multiplier extended integrator limit 0 1 1C15 1 2 2C30 2 4 4C60 3 8 8C120
43 at42qt1481 [datasheet] 9621exCat42C07/2014 it is almost always desirable in these cases to cause the key to recalibrate quickly so as to restore normal touch operation. the time required to do this is governed by prd. in order for this to work, the signal must rise through the positive threshold level pthr continuously for the prd period. after the prd interval has expired and the auto-recalibrat ion has taken place, the affected key once again functions normally. prd is set on a per-key basis. the functioning of the prd setting is determined by an index to a lookup table, found on page 56 . the values of time can range from 0.1 s to 25 s. setting the parameter to 0 disables the feature. prd typical values: 5 to 8 (0.7 s to 2.0 s) prd default value: 6 (1 s) prd range: 0 C 15 ( ? , 0.1 s C 25 s) 5.9 burst length ? bl the signal gain for each key is controlled by circuit parameters as well as the burst length. the burst length is simply the number of times the charge-transfer (qt) process is performed on a given x line. each qt process is simply the pulsing of an x line once, wit h corresponding y lines enabled to capture the resulting charge passed through the keys capacitance cx. qt1481 uses a fixed number of qt cycles which are execut ed in burst mode. there can be up to 64 qt cycles in a burst, in accordance with the list of permitted values shown in table 5-7 on page 56 . increasing burst length directly affects key sensitivity. this occurs because the accumulation of charge in the charge integrator is directly linked to the burst length. the burst length can be set for each key individually; charge is selectively captured on all y lines simultaneously during the burst on each x line. apparent touch sensitivity is also controlled by the negative threshold level (nthr). burst length and nthr interact. normally burst lengths should be kept as short as possible to limit rf emissions, but nthr should be kept above 6 to reduce false detections due to external noise. the detection integrator mechanism also helps to prevent false detections. bl typical values: 2, 3 (48, 64 pulses / burst) bl default value: 2 (48 pulses / burst) bl possible values: 0, 1, 2, 3 (16, 32, 48, 64 pulses) 5.10 adjacent key suppression technology ? aks the qt1481 incorporates adjacent key suppression (aks) technology that can be selected on a per-key basis. aks technology permits th e suppression of multiple key presses based on relative si gnal strength. this feature assists in solving the problem of surface moisture which can bridge a key touch to an adjacent key, causing multiple key presses. this feature is also useful for panels with tightly spaced keys, where a fingertip might inadvertently activate an adjacent key. aks technology works for keys that are aks-enabled anyw here in the matrix and is not restricted to physically adjacent keys. the qt1481 has no knowledge of which keys are actually physically adjacent. when enabled for a key, adjacent key suppression causes detections on that key to be suppressed if any other aks-enabled key in the panel has a more negative signal deviation from its reference during the di process. once a key reaches detect it stays in detect as long as the touch remains, regardless of the signal strength on any other aks-enabled keys. this feature does not account for varying key gains (burst length) but ignores the actual negative detection threshold setting for the key. if aks-enabled keys have different sizes, it may be necessary to reduce the gains of larger keys to equalize the effects of aks technology. the signal threshold of the larger keys can be altered to compensate for this without causing problems with key suppression. adjacent key suppression works to augment the natural moisture suppression of narrow gated transfer switches creating a more robust sensing method. aks default value: 0 (off)
44 at42qt1481 [datasheet] 9621exCat42C07/2014 5.11 oscilloscope sync ? ssync the s_sync pin can output a positive pulse oscilloscope sync that brackets the burst of a selected x line. more than one burst can output a sync pulse as determined by the setups parameter ssync for each x line (see table 5-3 ). this feature is invaluable for diagnostics; without it, observing signals clearly on an oscilloscope for a particular burst is very difficult. the bits of this setup byte are allocated as shown in table 5-3 . note: sts_debug shares the use of pin 43 with ssync, but only one feature should be enabled at a time. to prevent interference, all ssync bits should be set to zero (off) if debug output is desired. this function is supported in atmel qmbtn pc software. ssync default value: 0 (off) 5.12 negative hysteresis ? nhyst the qt1481 employs programmable hysteresis levels of 6.25%, 12.5%, 25%, or 50%. the hysteresis is a percentage of the distance from the threshold level back towards the reference, and defines the point at which a touch detection drops out. a 12.5% hysteresis point is closer to the threshold level than to the signal reference level. hysteresis prevents chatter and works to make key detection more robust. hysteresis is only used once the key has been declared to be in detection, in order to determined when the key should drop out. excessive amounts of hysteresis can result in stuck keys that do not release. conversely, low amounts of hysteresis can cause key chatter due to noise or minor amounts of finger motion. the hysteresis levels are set for all keys only; it is not possible to set the hysteresis differently from key to key. nhyst typical values: 0, 1 (6.25%, 12.5%) nhyst default value: 1 (12.5%) nhyst possible range: 0, 1, 2, 3 (6.25%, 12.5%, 25%, 50%) table 5-3. ssync bits bit scope sync output when burst on... 7 x7 6 x6 5 x5 4 x4 3 x3 2 x2 1 x1 0 x0
45 at42qt1481 [datasheet] 9621exCat42C07/2014 5.13 dwell time ? dwell the dwell parameter in setups causes the acquisition pul ses to have differing charge capture durations. generally, shorter durations provide for enhanced surface moisture suppr ession, while longer durations are required where the keypanel design includes higher-resistance tracks such as silver and ito. longer durations are also usually more compatible with emc requirements. longer dwell times permit the use of larger series resist ors in the x and y lines to suppress rfi effects, without compromising key gain ( section 2.10 on page 12 ). this setup lets the designer trade one requirement for another. dwell typical value: 1 (188 ns) dwell default value : 1 (188 ns) dwell possible values: 0 C 15 (125 ns C 9.9 s ) , accuracy is 10% 5.14 mains sync ? msync the msync feature uses the ws pin. the sleep and sync features can be used simultaneously, in which case the qt1481 wakes on the mains sync signal, scans the matrix and then returns to sleep automatically. external fields can cause interference leading to false detections or sensitivity shifts. most fields come from ac power sources. rfi noise sources are heavily suppressed by the low impedance nature of the qt circuitry itself. noise such as from 50 hz or 60 hz fields becomes a problem if it is uncorrelated with acquisition signal sampling; uncorrelated noise can cause aliasing effects in the key signals. to suppress this problem the ws input allows bursts to synchronize to the noise source. this same input can also be used to wake the part from a low-power sleep state. the noise sync operating mode is set by parameter msync in setups. the sync occurs only at the burst for the lowest numbered enabled key in the matrix. if it does not sleep at the end of the matrix scan, the qt1481 waits for the sync signal for up to 100 ms after the end of a preceding full matrix scan, then the matrix is scanned in its entirety again. if the qt1481 sleeps, it waits indefinitely for the mains sync. the sync signal drive should be a buffered logic signal, or perhaps a diode-clamped signal, but never a raw ac signal from the mains. if mains sync is enabled and sleep is disabled, the qt1481 synchronizes to the falling sync edge. however, if both mains sync and sleep are enabled, the qt1481 is sensitive to a low level on ws. a first matrix scan occurs when the low level is first detected, and further matrix scans occur for as long as ws is held low. it is therefore recommended that ws is driven low for less than a single matrix scan time. since noise sync is highly effective and inexpensive to implement, it is strongly advised to take advantage of it anywhere there is a possibility of encountering low frequency (50/60 hz) electric fields. atmel qmbtn software can show such noise effects on signals, and therefore assist in determining the need to make use of this feature. if the sync feature is enabled but no sync signal exists, t he sensor continues to operate but with a delay of 100 ms from the end of one scan to the start of the next, and hence has a slow response time. a failed sync signal (one exceeding a 100 ms period) causes an error flag (see command 0x06 ). from reset, the qt1481 first reports a mains sync error after initialisation followed by a delay of 100 ms waiting for the sync signal. this time interval may be determined by adding 100 ms to the initialisation times stated in section 2.14 on page 14. msync default value: 0 (off) msync possible range: 0, 1 (off, on)
46 at42qt1481 [datasheet] 9621exCat42C07/2014 5.15 restart interrupted burst ? rib the rib parameter in setups allows a burst to be interrupted, and restarted, by host communications over the serial bus. the qt1481 has limited processing resources available such that a burst and host communication cannot both be serviced simultaneously. one must give way to the other. this setup lets the designer prioritize one over the other. if rib is configured on, a burst can be interrupted by a host communication, and is automatically restarted. if rib is configured off, bursts cannot be interrupted but, rather, the host communication is delayed until the burst has completed. the drdy low period is stretched by the qt1481 during the burst. this function is programmed on a global basis. see table 5-8 on page 57 . rib default value: 0 (off) rib possible range: 0, 1 (off, on) 5.16 sleep drift compensation ? sdc see also section 5.4 on page 40 sleep, ndrift and pdrift. sdc allows the qt1481 to be configured for automatic sleep, and for modified drift compensation when sleep is enabled. whenever the qt1481 goes to sleep, the whole device is shutdown, including the clock generator. all operations are stopped including matrix scanning and timers, wh ich results in the internal time keeping running very slow and, in particular, drift compensation runs at a rate much slower than configured by ndrift and pdrift. for example, with ndrift and pdrift configured such t hat drift compensation occurs once every second when the qt1481 is awake, and with the qt1481 being awake for 5 ms to scan the matrix before falling asleep for 495 ms, all internal timers are slowed by a factor of 100 (5/500), and dr ift compensation would occur at the much slower rate of just once every 100 s. this would typically result in the key references not tracking signal variations adequately, and could result in false detections. to help resolve this, sdc can be configured so that the qt1481 performs drift compensation after a specific number of sleeps. ? with sdc = 0, sleep is disabled ? with sdc = 1, drift compensation occurs after every sleep ? with sdc = 7, drift compensation is applied after every sixty-four sleeps this function is programmed on a global basis. see table 5-8 on page 57 . sdc default value: 0 (off, sleep disabled) sdc possible range: 0C7 (off, 1C64) 5.17 serial rate ? sr the possible baud rates are shown in table 5-7 on page 56 . the rate chosen by this parameter only affects uart mode. spi mode is slave-only and can clock at any rate from dc up to 4 mhz. the baud rate can be adjusted to one of five values from 9600 to 115.2 kbaud. sr default value: 0 (9600 baud)
47 at42qt1481 [datasheet] 9621exCat42C07/2014 5.18 lower signal limit ? lsl this setup determines the lowest acceptable value of signal level for all keys. if any key reference level falls below this value, the qt1481 declares an error condition in the key status bits (see section 4.7 on page 28 and section 4.9 on page 30 ). testing is required to ensure that there are adequate margins in this determination. key size, shape, panel material, burst length, and dwell time all factor into the detected signal levels. this parameter occupies 2 bytes (11 bits) of the setups. lsl default value: 100 (recommended value) lsl possible range: 0 C 2047 5.19 key gain test threshold ? kgtt the key gain test takes a special sample from each enabled key using half the usual burst length, and compares the resulting signal against each key normal signal. the test passes if the signal has decreased by the key gain test threshold (kgtt). the following equation must hold for the test to pass: (normal signal C test signal) = kgtt disabled keys are not tested. the key gain test threshold can be configured to a value between 4 and 64, via lut (see table 5-8 on page 57 ). kgtt occupies 4 bits only, sharing the same word as the lower signal limit. this function is programmed on a global basis. kgtt default value: 7 (32) kgtt possible range: 0 C 15 (4 C 64) 5.20 status output ? sts the status pin is designed to be used as a status and erro r signaling mechanism for the host controller. one use for this pin is to alert the host that there is key activity, in order to limit the amount of communication between the qt1481 and the host. the status pin should ideally be connected to an interrupt pin on the host that can detect an edge, following which the host can proceed to poll the qt1481 for further information. the status pin is an open-drain output with an internal 20 k ? C 50 k ? pull-up resistor. this allows multiple devices to be connected together in a single wire-or logic connection with the host. when the status pin becomes active, the host can poll all devices to identify which one is reporting. table 5-5 on page 55 shows the possible internal conditions that can cause the status pin to become active. except for sts_debug, the various items in the table are logical-or'd together. sts_touch: when this option (sts, bit 5) is enabled, the status output can be used to alert the host of touch changes. the status output becomes active after reset and when there is a change in key state (either touch or touch release). it does not self-clear but becomes inactive again only after the host issues command 0x06 . after the host has issued command 0x06 , the status output becomes inactive at the end of the matrix scan provided that there are no keys in detect and there are no other conditions demanding it be active. to avoid missing touches and future status assert edges, the host should issue further 0x06 commands until status becomes inactive. sts_debug: when this option is enabled (sts, bit 7, see section b. on page 64 ), the qt1481 streams one frame of data out of the debug port after each matrix scan. when sts_debug is enabled it impacts the key response time because the next matrix scan is delayed until the debug frame has been fully transmitted. to prevent interference, this bit should be used exclusively, and not in conjunction with any other bit.
48 at42qt1481 [datasheet] 9621exCat42C07/2014 sts_rsthost: the status pin can even be used as a watchdog for the host, to reset it should the host fail to send regular transmissions to the qt1481 (bit 0 of sts byte). the comms timeout required to generate the reset signal is about 2 seconds of inactivity. if this feature is enabled, it does not become effective until the first command is received from the host; therefore, it is assumed that there is at least some initial host activity for this feature to work. note: 1. the status output is preserved during sleep. 2. to prevent interference, sts_debug should not be enabled with any other item. 3. the reset pulse should be allowed to complete before the host sends commands to the q t1481. if commands are received from the host while status is low, status will remain low until the commands stop and the 2 s internal host reset timer is allowed to fully cycle. sts default value: 0x20 (sts_touch) 5.21 awake time ? awake the awake feature is effective only if the part has been configured for au tomatic sleep, via sdc, and if the sleep command ( 0x16 ) has been issued. awake determines the period of time that elapses from the last key release before the part tries to sleep. an internal timer is restarted at each key release and runs for the time configured via awake. the part will not enter sleep while this timer is active, or while any of the following conditions are present: ? drdy asserted (low level) ? ss low (assume host trying to send a command) ? a command is being processed or response data is being returned or pending return to the host ? any key calibrating ? any key touch delta exceeds the threshold (positive or negative) note: if the sleep feature has been disabled, the qt1481 never sleeps and the awake setup has no effect. the awake period can be configured to one of 16 values between 100 ms and 25.4 s via lut (see table 5-8 on page 57 ). this function is programmed on a global basis. awake default value: 15 (25.4 s) awake range: 0 C 15 (100 ms C 25.4 s) awake timeout accuracy: to within 50 ms 5.22 drift hold time ? dht drift hold time (dht) is used to suspend drift compensati on from all keys while the keypad is being used. with the feature enabled, drift compensation is suspended while any key is touched and also for a period afterwards. dht defines the length of time the drift compensation continues to be suspended after a key detection has finished. this feature is particularly useful in cases of high-densit y keypads where touching a key or hovering a finger over the keypad would cause untouched keys to drift, and therefore create a sensitivity shift, and ultimately inhibit other touch detections. dht can be configured to one of 16 values between 100 ms and 25.4 s via lut (see table 5-8 on page 57 ). this function is programmed on a global basis. dht default value: 11 (9 s) dht range: 0 C 15 (100 ms C 25.4 s)
49 at42qt1481 [datasheet] 9621exCat42C07/2014 5.23 frequency hopping mode ? fhm frequency hopping can be disabled altogether or enabled to one of three different active modes with fhm. fhm = 0 ? frequency hopping disabled if frequency hopping is disabled, the qt1481 always uses the same frequency, defined by freq0. fhm = 1 or 2 if frequency hopping is enabled with fhm = 1 or fhm = 2, the qt 1481 continually monitors the noise across all keys and switches frequencies dynamically to try and find the frequency with the lower noise amplitude. up to three different frequencies can be selected using freq0, freq1 and freq2. if frequency hopping between only two frequencies is desired, the same frequency should be selected for two of these functions. the signal levels can vary slightly with frequency, an d so the reference for each key might need a corresponding adjustment during frequency hopping to compensate for this and to prevent false detections and unresponsive keys. the mechanism used to adapt the references is different depending on the frequency hop mode set. fhm = 1 ? calibrate after hop if frequency hopping is enabled with fhm = 1, the qt1481 compensates for the variations in signal level by recalibrating each key immediately after each frequency hop. a negative aspect to this mode is the danger that a key is being touched at the time of the frequency hop. if this were to happen, the touched key would be recalibrated to the touching finger and the detect would be cancelled. however, on subsequent removal of the touch (for a time greater than or equal to the prd function) the key would be recalibrated again and the detect flagged when the touch is re-established. fhm = 2 ? adjust each key's reference during hop if frequency hopping is enabled with fhm = 2, the qt1481 adjusts each key's reference at each frequency hop. the amount of the adjustment must first be configured using the setups cfo_1 and cfo_2. the qt1481 will not switch the frequency during calibration if fhm is set to 1 or 2. fhm = 3 ? frequency sweep this mode offers high noise immunity and is recommended as the mode of choice. if frequency hopping is enabled with fhm = 3, the qt1481 repeatedly sweeps the sampling frequency through a range bounded by two frequencies defined by freq0 and freq1. the frequency is changed after every matrix scan. in this hop mode, the reference for each key is not adjusted as the frequency is change d, so the signal levels must not vary significantly over the selected frequency range otherwise false detects or unintentional touch dropouts could occur. variations in signal levels can be limited by restricting the frequency sweep range. if the signal variation for any particular key is found to be too great, the range of frequencies should be narrowed by decreasing the difference in values set at freq0 and freq1. this function is programmed on a global basis. see table 5-7 on page 56 . fhm default value: 1 = calibrate all keys after hop fhm recommended value: 3 = frequency sweep fhm possible range: 0C3 (0 = off 1 = calibrate all keys after hop 2 = adjust each key's reference during hop 3 = frequency sweep)
50 at42qt1481 [datasheet] 9621exCat42C07/2014 5.24 frequency 0 ? freq0 freq0 is used in all frequency hopping modes and even if frequency hopping is disabled. in all modes, it defines the idle time between pulses in the burst. larger values yield longer times between pulses and thus a lower fundamental frequency. fhm = 0 ? frequency hopping disabled if frequency hopping is disabled, the qt1481 always uses the same frequency, defined by freq0. frequency hopping might not be desirable in all applications and it might be more appropriate to preselect a burst freq uency at the factory which is known not to coincide with other operating frequencies within the end product or other frequencies in the operating environment. in such cases, fhm can be set at zero, and the burst frequency set with freq0. together with dwell, freq0 allows the fundamental frequency to be set in the range 31 khz C 943 khz. the frequency for a specific dwell and freq0 combination should be measured using an oscilloscope (temporarily disable frequency hopping to make the measurement easier). fhm = 1 or fhm = 2 ? frequency hopping between three frequencies if frequency hopping is enabled with fhm = 1 or fhm = 2, the qt1481 can hop between three frequencies configured using freq0, freq1 and freq2. fhm = 3 ? frequency sweep with fhm = 3, the qt1481 sweeps a range of frequencies, with the upper frequency boundary (shortest idle time) defined by freq0. freq1 must be set to a value greater than freq0; the behavior is otherwise undefined. this function is programmed on a global basis. see table 5-7 on page 56 . freq0 default value: 24 (delay cycles) freq0 possible range: 0 C 63 (highest frequency to lowest frequency) 5.25 frequency1 ? freq1 freq1 is used only if fhm is set to a non-zero value. it is not used if frequency hopping is disabled with fhm = 0. with fhm = 1 or fhm = 2, freq1 allows configuration of one of three operating frequencies by defining the idle time between pulses in the burst. larger values yield lo nger times between pulses and thus a lower fundamental frequency. with fhm = 3, the qt1481 sweeps a range of frequencies, with the lower frequency boundary (longest idle time) defined by freq1. freq1 must be set to a value greater than freq0; the behavior is otherwise undefined. this function is programmed on a global basis. see table 5-7 on page 56 . freq1 default value: 30 (delay cycles) freq1 possible range: 0 C 63 (highest frequency to lowest frequency) 5.26 frequency2 ? freq2 freq2 is used only if fhm = 1 or fhm = 2; it is not used if fhm is set to zero or 3. with fhm = 1 or fhm = 2, freq2 allows configuration of one of three operating frequencies by defining the idle time between pulses in the burst. larger values yield lo nger times between pulses and thus a lower fundamental frequency. this function is programmed on a global basis. see table 5-7 on page 56 . freq2 default value: 36 (delay cycles) freq2 possible range: 0 C 63 (highest frequency to lowest frequency)
51 at42qt1481 [datasheet] 9621exCat42C07/2014 5.27 noise threshold ? nsthr nsthr is used only if fhm = 1 or fhm = 2; it is not used if fhm is set to 0 or 3. when fhm = 1 or fhm = 2, the qt1481 considers a hop to one of the other frequencies when the noise at the current frequency consistently exceeds the threshold configured with nsthr. nsthr is used by the frequency hopping algorithms to determine if a signal delta should be considered as noise. a delta, of either polarity, greater than or equal to nsthr, is considered as possible noise and forces the noise integrator counter to be incremented. this function is programmed on a global basis. see table 5-7 on page 56 . nsthr default value: 0 (5 counts) nsthr possible range: 0 C 15 (5 C 50 counts) 5.28 noise integrator limit ? nil nil is used only if fhm = 1 or fhm = 2; it is not used if fhm is set to zero or 3. the qt1481 considers a hop to one of the other frequencies when the noise at the current frequency consistently exceeds the threshold configured with nsthr. to prev ent true touch events and other brief signal anomalies being considered as noise, the qt1481 uses counters, called noise integrators, to track the number of signal deltas that exceed the noise threshold. it maintains two counters, one for positive deltas and one for negative deltas. the qt1481 considers a frequency hop only if both counters reac h the noise integrator limit (nil). the counters are reset to zero at the end of each matrix scan. this mechanism provides a robust way of detecting strong noise while suppressing unnecessary frequency hopping. this function is programmed on a global basis. see table 5-7 on page 56 . nil default value: 3 nil possible range: 0 C 15 (0 C 2 = factory use only) 5.29 calibrated frequency offset ? cfo_1 and cfo_2 the calibrated frequency offset (cfo) values are used when the frequency hop mode is set to 2. they are used to adjust each key's reference whenever a frequency hop occurs, taking into account any differences in calibrated signal at the different frequencies. the device uses t he highest selected frequency as a point of reference and calculates offsets in calibrated signals at the other two frequencies relative to the highest one. the following explanation assumes that freq0 defines the highest frequency, for convenience of this discussion, but that does not need to be the case. note: configure freq0, freq1 and freq2 before trying to configure cfo_1 and cfo_2. command 0x02 can be invoked to automatically fill out the cfo_1 and cfo_2 values. alternatively, cfo_1 and cfo_2 can be manually configured, or fine tuned. once freq0, freq1 and freq2 have been configured for the three chosen frequencies, cfo_1 and cfo_2 should be loaded with the signal offsets appropriate for the signal shifts observed when switching between the three different frequencies. follow these steps to determine the different signal levels for each key at each frequency and to determine appropriate values to load into cfo_1 and cfo_2. 1. configure fhm = 0 to disable frequency hopping temporarily. 2. configure freq0 to select the highest of the chosen frequencies. that is, freq0 should be set to a lower value than freq1 and freq2. 3. recalibrate all keys. 4. make a note of each key reference level, ref(k, f0) 5. configure freq0 to select the second of the chosen frequencies. 6. recalibrate all keys. 7. make a note of each key reference level, ref(k, f1).
52 at42qt1481 [datasheet] 9621exCat42C07/2014 8. configure freq0 to select the last of the chosen frequencies. 9. recalibrate all keys. 10. make a note of each key reference level, ref(k, f2). 11. determine the difference in signal for each key in turn when the frequency changes from freq0 to freq1, using the following equation: diff(k, f0, f1) = ref(k, f0) C ref(k, f1) (this value will nearly always be positive. if it is negative, set diff(k, f0, f1) to zero) 12. store diff(k, f0, f1) into the corresponding cfo_1 for the k. 13. determine the difference in signal at each key when the frequency changes from freq0 to freq2, using the following equation: diff(k, f0, f2) = ref(k, f0) C ref(k, f2) (this value will nearly always be positive. if it is negative, set diff(k, f0, f1) to zero) 14. store diff(k, f0, f2) into the corresponding cfo_2 for key k. 15. configure fhm = 2. cfo_1/2 default value: 0 cfo_1/2 possible range: 0 C 255 5.30 setups crc ? scrc the setups block terminates with a 16-bit crc, scrc, of the entire block. the formulae for calculating this crc is shown in appendix a. . the low order byte should be sent first.
53 at42qt1481 [datasheet] 9621exCat42C07/2014 at42qt1481 5.31 setups block setups data is sent from the host to the qt1481 in a block of hex data. the block can only be loaded in setups mode following t wo 0x01 commands ( section 4.3 on page 26 ). refer to table 5-7 on page 56 for further details. table 5-4. setups block byte parameter symbol bytes valid range bits key scope default value description page 0 neg threshold pos threshold nthr pthr 48 nthr = 0C15 pthr = 0 C 15 4 4 1 1 6 2 lower nibble = neg threshold C take operand and add 4 to get value upper nibble = pos threshold C take operand and add 4 to get value 38 39 48 neg drift comp pos drift comp ndrift pdrift 48 ndrift = 0 C 15 pdrift = 0 C 15 4 4 1 1 10 10 lower nibble = neg drift comp C via lut upper nibble = pos drift comp C via lut 40 96 normal di limit fast di limit ndil fdil 48 ndil = 0 C 15 fdil = 0 C 15 4 4 1 1 2 5 lower nibble = normal di limit, values same as operand (0 = disabled burst) upper nibble = fast di limit, values same as operand (0 is invalid; do not use) 41 144 neg recal delay nrd 48 0 C 254 8 1 20 range is in 0.5 sec increments; 0 = infinite; default = 10s (operand = 20) range is {infinite, 0.5 C 127s }; 255 is illegal to use 42 192 pos recal delay burst length aks prd bl aks 48 prd = 0 C 15 bl = 0C3 aks = 0, 1 4 2 1 1 1 1 6 2 0 lower nibble = prd, via lut, default = 6 (1 second) bits 5, 4: = bl, via lut, default = 48 (setting = 2) bit 6 = aks, 1 C enabled 42 43 43 240 cal.freq.offset 1 cfo_1 48 0 C 255 8 1 0 value is the signal offset 51 288 cal.freq.offset 2 cfo_2 48 0 C 255 8 1 0 value is the signal offset 51 336 neg hysteresis mains sync sleep drift comp threshold mult nhyst msync sdc thrm 1 nhyst = 0 C 3 msync = 0, 1 sdc = 0 C 7 thrm = 0 C 3 2 1 3 2 48 48 48 48 1 0 0 0 bits 1,0 = neg hysteresis, all keys; default = 12.5% bits 5 = mains sync, negative edge, 1 = enabled; default = 0 (off) bits 4 C 2 = sleep drift compensation, 0 = sleep disabled (default) bits 7, 6 = threshold multiplier; default = 0 (x1) 44 45 46 39 337 dwell time serial rate dwell sr 1 dwell = 0 C 15 sr = 0C4 4 4 48 device 1 0 lower nibble = dwell time, 15 values via lut, default = 1 (188 ns) upper nibble = serial rate via lut C 9600, 19.200, 38.400, 57.600, 115.200 (uart) 45 46 338 lower signal limit restart int. burst fmea kgtt lsl rib kgtt 2 lsl = 0 C 2047 rib = 0, 1 kgtt = 0 C 15 11 1 4 48 48 48 100 0 7 bits 10 C 0 = lower limit of acceptable signal; below this value, qt1481 declares an error. the low order byte should be sent first. bit 11 = restart interrupted burst, 1 = enabled bits 15 C 12 = kgtt default = 7 (32 counts) 47 46 47 340 status output sts 1 0 C 255 8 device 0x20 defines the status pin behavior; see table 5-5 on page 55 47
54 at42qt1481 [datasheet] 9621exCat42C07/2014 note: a crc calculator for microsoft windows is available free of charge from atmel, on request. 341 awake time drift hold time awake dht 1 0C15 0C15 4 4 48 48 15 11 lower nibble = awake time, default = 15 (25.4s) upper nibble = drift hold time, default = 11 (9s) 48 48 342 scope sync ssync 1 0 C 255 6 6 (x line) 0 each bit enables the scope sync output for the burst on one x line. bit n: 1 = scope sync enabled for burst on xn. 44 343 frequency 0 freq.hop mode freq0 fhm 1 0C63 0C3 6 2 48 24 1 bits 5 C 0 = frequency 0. de fault = 24 delay cycles bits 7, 6 = frequency hop mode. default = 1 (recalibrate after each hop) 50 49 344 detect integrator multiplier frequency 1 dim freq1 1 0C3 0C63 2 6 48 48 0 30 bits 7 C 6 = dim. default = 0 (x1) bits 5 C 0 = frequency 1. de fault = 30 delay cycles 42 50 345 frequency 2 freq2 1 0C63 6 48 36 bits 5 C 0 = frequency 2. de fault = 36 delay cycles 50 346 noise threshold noise integrator limit nsthr nil 1 0C15 0C15 4 4 48 48 0 3 lower nibble = noise threshold. default = 0 (5 counts) upper nibble = noise integrator limit. default = 3 51 51 347 reserved 0 348 setups crc scrc 2 0 C 65k 16 device C crc-16 of above setups, does not include crc of command itself. the low order byte should be sent first. see also crc notes, appendix a. . 52 block length 350 table 5-4. setups block byte parameter symbol bytes valid range bits key scope default value description page
55 at42qt1481 [datasheet] 9621exCat42C07/2014 5.32 sts bits the status pin can be used to indicate a variety of things in combination. the sts parameter controls which states make the status pin active. 5.33 key mapping some commands return bit-fields rela ted to keys. for example, command 0x07 (report all keys) returns 6 bytes containing flag bits, one per key, to indicate which keys are reporting touches. table 5-6 shows the byte and bit order of the keys, and the key number reported in each bit. the key number is related to the x and y scan lines which address each particular key. each byte in the return stream represents one set of keys along a y line, that is, up to 8 keys. for example, key 0 is at location x0, y0 and key 29 is at location x5, y3 note: byte 0 is returned first. table 5-5. control byte bits bit name status output (active low) default 7 sts_debug 1= status output used for debug. this bit cannot be used with any other bit. 0 6 sts_keyerror active on any key error: (calibration failed, low signal) 0 5 sts_touch active on any change in touch status 1 4 reserved C 3 sts_setups active on setups crc mismatch 0 2 sts_msync active on mains sync error 0 1 reserved C 0 sts_rsthost host watchdog C active if no host communications within any 2 s period. host reset pulse length is 150 ms. the host watchdog is not enabled until the first valid command is received from the host. 0 table 5-6. key mapping byte (y line) bit (x line) 7 6 5 4 3 2 1 0 0 7 6 5 4 3 2 1 0 1 15 14 13 12 11 10 9 8 2 23 22 21 20 19 18 17 16 3 31 30 29 28 27 26 25 24 4 39 38 37 36 35 34 33 32 5 47 46 45 44 43 42 41 40
56 at42qt1481 [datasheet] 9621exCat42C07/2014 at42qt1481 5.34 setups block summary typical values: for most touch applications, use the values shown in the shaded ce lls. bold text items indicate default settings. the number to send to the qt1481 is the index number in the leftmost column (0 C 15), not numbers from the table. the qt1481 uses a lookup table internally to translate the indices 0 C 15 to the parameters for each function. nrd is an exception: it can range from 0 C 254 which is translated from 1 = 0.5 s to 254 = 127 s with zero = infinity. cfo_1 and cfo_2 are exceptions. their values, ranging from 0 to 255, are used directly and without any translation. table 5-7. setups block summary ? per key settings parameter index nthr counts pthr counts ndrift secs pdrift secs ndil counts fdil counts nrd secs prd secs bl pulses aks cfo_1 cfo_2 per key 0 4 4 0.1 0.1 key off unused 0 (infinite) 0 (infinite) 16 off 0 0 1 5 5 0.2 0.2 1 1 0.5 C 127 s 0.1 32 on 1 C255 1 C 255 2 6 6 0.3 0.3 2 2 10 s 0.2 48 3 7 7 0.4 0.4 3 3 0.3 64 4 8 8 0.6 0.6 4 4 0.5 5 9 9 0.8 0.8 5 5 0.7 6 10 10 1 1 6 6 1 7 11 11 1.2 1.2 7 7 1.5 8 12 12 1.5 1.5 8 8 2 9 13 13 2 2 9 9 3.2 10 14 14 2.5 2.5 10 10 4.5 11 15 15 3.3 3.3 11 11 6 12 16 16 4.5 4.5 12 12 9 13 17 17 6 6 13 13 12.3 14 18 18 7.5 7.5 14 14 17.5 15 19 19 10 10 15 15 25
57 at42qt1481 [datasheet] 9621exCat42C07/2014 table 5-8. setups block summary ? global settings parameter index rib nhyst sdc msync dwell s sr baud kgtt awake secs dht ssync thrm fhm freq0 freq1 freq2 nsthr nil lsl dim global x line global 0 off 6.25% off off 0.13 9,600 4 0.1 0.1 off 1 off 24 cycles 30 cycles 36 cycles 5 0 (factory only) 100 1 1 on 12.5% 1 on 0.19 19,200 80.20.2on 2 1 8 1 (factory only) 0 C2047 2 2 25% 2 0.4 38,400 12 0.3 0.3 4 2 11 2 (factory only) 4 3 50% 4 0.6 57,600 16 0.5 0.5 8 3 14 3 8 4 8 0.8 115,200 20 0.7 0.7 17 4 5 16 0.9 24 1 1 20 5 6 32 1.1 28 1.5 1.5 23 6 7 64 1.3 32 2 2 26 7 8 1.5 36 3.2 3.2 29 8 9 1.7 40 4.5 4.5 32 9 10 2.1 44 6 6 35 10 11 2.6 48 9 9 38 11 12 3.8 52 12.3 12.3 41 12 13 5.1 56 15 15 44 13 14 7.1 60 19 19 47 14 15 9.9 64 25.4 25.4 50 15
58 at42qt1481 [datasheet] 9621exCat42C07/2014 6. specifications 6.1 absolute maximu m specifications 6.2 recommended op erating conditions parameter specification vdd 6.0 v max continuous pin current, any control or drive pin 10 ma short circuit duration to ground, any pin infinite short circuit duration to vdd, any pin infinite voltage forced onto any pin 0.5 v to (vdd + 0.5 v) frequency of operation 17 mhz eeprom setups maximum writes 100,000 write cycles caution: stresses beyond those listed may cause permanent damage to the device. this is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. exposure to absolute maximum specification conditions for extended periods may affect device reliability. parameter specification operating temp C40 o c to +105 o c storage temp C55 o c to +125 o c vdd +4.75 v to 5.25 v supply ripple + noise 20 mv p-p max cx transverse load capacitance per key 0 to 20 pf fosc oscillator frequency 16 mhz 2%
59 at42qt1481 [datasheet] 9621exCat42C07/2014 6.3 dc specifications 6.4 timing specifications vdd = 5.0 v, cs = 4.7 nf, freq = 16 mhz, ta (ambient temperature) = recommended range, unless otherwise noted parameter description min typ max units notes iddr supply current, running C 13 C ma idds supply current, sleeping C 15 C a vr vdd internal reset voltage C 4 C v vil low input logic level C C 0.2 vd d v vih high input logic level 0.6 vd d C C v vol low output voltage C C 0.6 v 4ma sink voh high output voltage 4.2 C C v 1 ma source iil input leakage current C C 1 a ar acquisition resolution C 9 11 bits rp internal pull-up resistors 20 C 50 k? drdy , ss , tx, status pins rrst internal rst pull-up resistor 30 C 60 k? vdd = 5.0 v, cs = 4.7 nf, freq = 16 mhz, ta (ambient temperature) = recommended range, unless otherwise noted parameter description min typ max units notes s1 ? ss to first ? clk edge 125 C C ns spi parameter controlled by host s2 ? clk to valid miso C C 20 ns spi parameter controlled by qt1481 s3 last ? clk to ? ss 25 C C ns spi parameter controlled by host s4 ? ss to 3-state miso C C 20 ns spi parameter controlled by qt1481 s5 ? ss to falling drdy C C 20 s spi parameter controlled by qt1481 s6 drdy low pulse width 1 C C s spi parameter controlled by qt1481 s7 clk low pulse width 125 C C ns spi parameter controlled by host s8 clk high pulse width 125 C C ns spi parameter controlled by host s9 clk period 250 C C ns spi parameter controlled by host fck spi clock rate C C 4 mhz spi parameter controlled by host
60 at42qt1481 [datasheet] 9621exCat42C07/2014 6.5 mechanical dimensions
61 at42qt1481 [datasheet] 9621exCat42C07/2014 6.6 marking the following part marking is used. 1 44 pin 1 id shortened part number 70= code revision 7.0 atmel logo au 70 qt1481 atmel yy = last two digits of the mark year ww = test workweek date code date code description yyww
62 at42qt1481 [datasheet] 9621exCat42C07/2014 6.7 part number the part number comprises: at = atmel 42 = touch business unit qt = charge-transfer technology 1481 = (1) keys, (48) number of channels, (1) variant number au = tqfp chip r= tape and reel 6.8 moisture sensitivity level (msl) part number qs number description at42qt1481-au qs738 44-pin 10 10 mm tqfp rohs compliant ic at42qt1481-aur qs738 44-pin 10 10 mm tqfp rohs compliant ic - tape and reel msl rating peak body temperature specifications msl3 260 o c ipc/jedec j-std-020
63 at42qt1481 [datasheet] 9621exCat42C07/2014 appendix a. 16-bit crc algorithm // 16 bits crc calculation. initial crc entry value must be 0. // the message is not augmented with 'zero' bits. // polynomial = x16 + x12 + x5 + 1 // data is an 8 bit number, unsigned // crc is a 16 bit number, unsigned // repeat this function for each data block byte, folding the result // back into the call parameter crc unsigned long sixteen_bit_crc(unsigned long crc, unsigned char data) { unsigned char index;// shift counter crc ^= (unsigned long)(data) << 8; index = 8; do // loop 8 times { if(crc & 0x8000) { crc= (crc << 1) ^ 0x1021; } else { crc= crc << 1; } } while(--index); return crc; } a crc calculator for microsoft windows is available free of charge from atmel.
64 at42qt1481 [datasheet] 9621exCat42C07/2014 appendix b. debug output the qt1481 includes a debug interface which may be used for observing many internal operating variables, in real time, even while the part is actively communicating with a host over either the spi or uart serial interfaces. the debug interface provides a useful aid during product development and uses two pins, one for clock and one for data, to stream data out of the part. if sts_debug is enabled in the sts setups byte the qt1481 streams a 465-byte frame of data out of the two debug pins after each keyscan cycle. the transmission format is compatible with atmel plug-in usb card (part number 9206) and the data can be viewed using atmel hawkeye pc software (contact atmel for information). table b-1 shows the debug interface details. the meaning of each byte in the 465-byte frame is described in table b-2 . table b-1. debug interface debug clock output pin 43 (dbg_clk) debug data output pin 40 (dbg_data) data valid clock high data changing clock low clock frequency approximately 500 khz blank time between byte transmissions 5.5 s frame transmission time 8.8 ms byte transmission order most significant bit (msb) first table b-2. debug output data frame frame byte # description 0 detect status for keys 0 (bit0) to 7 (bit7), one bit per key 1 detect status for keys 8 (bit0) to 15 (bit7), one bit per key 2 detect status for keys 16 (bit0) to 23 (bit7), one bit per key 3 detect status for keys 24 (bit0) to 31 (bit7), one bit per key 4 detect status for keys 32 (bit0) to 39 (bit7), one bit per key 5 detect status for keys 40 (bit0) to 47 (bit7), one bit per key 6 device status (identical to first byte returned from command 0x06 ) 7 count of keys declaring detect 8 a 6-bit unsigned value encoding the first or only key to be touched, in the range 0 C 47 9 time remaining before host reset pulse is issued at status pin. each count is 10 ms 10 time remaining until normal drift compensation is resumed. each count is 100 ms 11 time remaining before qt1481 tries to sleep (if enabled). each count is 100 ms 12 time remaining before the current spi or ua rt command times out. each count is 10 ms 13 time remaining before the wait for the next msync signal times out. each count is 10 ms
65 at42qt1481 [datasheet] 9621exCat42C07/2014 14 100 ms counter (iec/en60730) 15 signal fail counter (iec/en60730) 16 matrix scan counter (iec/en60730) 17 index of current frequency 18C26 data for key 0. see table b-3 on page 67 for details of the data set for one key. 27C35 data for key 8 36C44 data for key 16 45C53 data for key 24 54C62 data for key 32 63C71 data for key 40 72C80 data for key 1 81C89 data for key 9 90C98 data for key 17 99C107 data for key 25 108 C 116 data for key 33 117C125 data for key 41 126 C 134 data for key 2 135 C 143 data for key 10 144 C 152 data for key 18 153 C 161 data for key 26 162 C 170 data for key 34 171 C 179 data for key 42 180 C 188 data for key 3 189 C 197 data for key 11 198 C 206 data for key 19 207 C 215 data for key 27 216 C 224 data for key 35 225 C 233 data for key 43 234 C 242 data for key 4 243 C 251 data for key 12 252 C 260 data for key 20 261 C 269 data for key 28 270 C 278 data for key 36 table b-2. debug output data frame (continued) frame byte # description
66 at42qt1481 [datasheet] 9621exCat42C07/2014 279 C 287 data for key 44 288 C 296 data for key 5 297 C 305 data for key 13 306 C 314 data for key 21 315 C 323 data for key 29 324 C 332 data for key 37 333 C 341 data for key 45 342 C 350 data for key 6 351 C 359 data for key 14 360 C 368 data for key 22 369 C 377 data for key 30 378 C 386 data for key 38 387 C 395 data for key 46 396 C 404 data for key 7 405 C 413 data for key 15 414 C 422 data for key 23 423 C 431 data for key 31 432 C 440 data for key 39 441 C 449 data for key 47. see table b-3 for details of the data set for one key. 450 C 451 setups crc (scrc), value most recently computed by the qt1481 452 test pattern currently being used for various internal iec/en60730 tests 453 C 454 key gain test sample taken on y0 455 C 456 key gain test sample taken on y1 457 C 458 key gain test sample taken on y2 459 C 460 key gain test sample taken on y3 461 C 462 key gain test sample taken on y4 463 C 464 key gain test sample taken on y5 table b-2. debug output data frame (continued) frame byte # description
67 at42qt1481 [datasheet] 9621exCat42C07/2014 table b-3. format of data set for one key offset within data set description 1C0 bits 12 C 0: signal bits 15 C 13: calibration: 0=pending 1 C 4 = in progress 5 = success 6 = failed 3C2 bits 12C0: reference bit 13: 1= lsl fail bit 14: 1= detect bit 15: 1= kgtt fmea fail 4 normal di 5 bits 3C0: fast di 6 negative detect time. time remaining before key is recalibrated. each count = 500 ms 7 positive detect time. time remaining before key is recalibrated. each count = 500 ms 8 drift compensation count, range C127 to +127. each count = 100 ms. recalibration occurs when the drift counter reaches the value set by ndrift (negative count) or pdrift (positive count)
68 at42qt1481 [datasheet] 9621exCat42C07/2014 appendix c. condu cted noise immunity electrically conducted noise can increase the noise on the touch signals considerab ly and can lead to both false detects and missed touches. there is a specific test for conducted immunity, as part of typical emc testing, which injects noise into the device under test across a broad range of frequencies and with significant amplitude. this test is designed to test the immunity of devices and products against environmental noise that is generated by commercial radio transmitters and other sources. passing this test can be a challenge and might appear daunting, but with good design practise from the outset coupled with fine tuning of the qt1481 frequency hopping setups and, designs based on the qt1481 show excellent noise immunity and can pass the conducted noise test by some margin. from the outset, the design must target achieving the best possible touch sensitivity while minimizing noise. a clean design can achieve excellent signal delta on touch, but its easy to destroy this quality by pushing the overall product requirements too far and poor attention to detail during the desig n. the more imperfections that exist in a design, the more the sensitivity will be eroded and the conducted immunity performance with it. a good target for signal delta on touch is 100 or even 150 counts. best touch performance is achieved with thinner overlay panels, optimum key electrode design, clean tracking between the qt1481 and the keys with low stray capacitance between x and y traces and low stray capacitance from x and y traces to ground, coupled with appropriate selection of the external matrix components. see the documents referred to in associated documents on page 70 for further details on best practice for designing a touch sensor interface. the following paragraphs make some recommendations for initial values or type for the additional matrix components to accompany a qt1481 design together with some setups the have been found to produce good noise immunity results. cs - npo/cog use cog type for the charge sample capacitors (cs0 - cs7). this type of capacitor exhibits excellent stability, albeit at a higher cost, and is preferred over x7r an d other types. lower values can be used to reduce the cost or help with availability provided the charge transfer is not too high such as to saturate cs. an excellent layout with low stray capacitance will typically allow cs to be reduced as low as 1 nf. rs - 1 m ? increasing the digital conversion ramp resistors (rs0 C rs7) increases sensitivity. the optimum selection for rs is one that balances highest achievable sensitiv ity against conversion time and other undesirable side effects such as increased noise and possibly some reduction in temperature stability. any increase in noise is typically insignificant compared to conducted noise observed during conducted immunity emc testing. rs can be increased as high as 5 m ? , although this is probably extreme in most cases. a good initial value is 1m ? . this value increases sensitivity to a good level with acceptable additional signal noise and often achieves the best compromise in signal-to-noise ra tio (snr). the increased sensitivity allows a higher detect threshold to be employed, preventing noise spik es exceeding the threshold and thus preventing false detects. ry - 47 k ? immunity to conducted electrical noise can be increased c onsiderably by increasing the series resistors in the matrix y lines (ry0 - ry7) at the expense of moisture tole rance. there is a practical limit to how far their value can be increased because higher values must be accompanied by longer dwell times, possibly in excess of the longest settings available in the device. in any case excessively long dwell times would slow the response time intolerably. dwell increasing the ry values alone results in a reduction in charge transfer and sensitivity. this can be recovered by increasing the charge transfer time, or dwell time, through higher dwell settings. to achieve the optimum dwell setting, start with the maximum value and observe the reference values. then reduce the dwell, con-
69 at42qt1481 [datasheet] 9621exCat42C07/2014 tinue to observe the reference values, and choose the lo west dwell setting where the reference values are not significantly reduced from their maximum. longer dwell times also result in reduced moisture tolerance, and so a careful balance might be necessary between these conflicting requirements. nthr & thrm together nthr(and pthr) and thrm allow the threshold to be set. the threshold should be set as high as possible to prevent false detects but should not be set so high that true touches are not detected. the atmel qmbtn or hawkeye software can be used to observe the signals and signal delta on touch, and used to deter- mine the optimum threshold settings for a specific design. the threshold will typically need setting at a lower value to accommodate noise than is evident when testing in the absence of noise. this may initially seem counter intuitive until consideration is given to the fact that heavy noise can cause undesirable detect dropouts as well as missed touch events. the threshold should be set as high as possible, but not so high that the noise causes detect dropouts while the key is still touched. frequency hopping - fhm = 3 (sweep) the immunity of qt1481 based designs to higher noise amplitude can be increased by configuring the fre- quency hopping with 3 different frequencies and using fhm = 2. choosing the 3 frequencies is a process of trial and error and varies from design to design, but a considerable increase in tolerable noise amplitude can be achieved once 3 appropriate frequencies have been identified. however, frequency hopping using sweep mode (fhm = 3) is much easier to configure and may provide suffi- cient immunity for many applications and products.
70 at42qt1481 [datasheet] 9621exCat42C07/2014 associated documents the following documents are a good source of general information regarding design and development of atmel touch sensors and should be studied before starting the development of a new touch interface. ? qtan0079 C buttons, sliders and wheels sensor design guide refer to this application note for details of different possible x/y electrode designs and patterns, and the optimum geometry to match the panel thickness. ? qtan0062 C qtouch and qmatrix sensitivity tuning for keys, sliders and wheels ? avr3000 qtouch conducted immunity refer to this guide for further information on immunity from conducted noise. these documents are available on the atmel website ( www.atmel.com ).
71 at42qt1481 [datasheet] 9621exCat42C07/2014 revision history revision no. history revision ax C december 2010 ? initial release of datasheet for chip revision 4.0. revision bx C june 2011 ? datasheet updated for chip revision 6.0. ? command 0x02 added. ?? frequency hopping updated. ?? nvt removed. ?? khopof1, khopof2, hopof removed and replaced by cfo_1 and cfo_2. ?? setups block C some setup values changed. ?? debug output data frame values changed. ?? some timings have changed. ?? some text has been edited for clarification. revision cx C march 2013 ?? datasheet updated for code revision 7.0 C preliminary. ? front page C key outline size changed from 10 x 10 mm to 6x6mm. ?? front page C fmea and iec/en60730 compliance reworded. ? front page C spi text added to. ?? section 2.5 C note added to end ? section 2.16 C text amended. ? updated text in section 2.17 on page 16 ? removed incorrect text from section 2.18 on page 16 ? section 2.20 C frequency hopping text amended. ?? section 4.7 C in description of individual data bytes, the content of the bytes has been indented to make a clearer distinction between each one. ? table 4-5 C the crc of 0x13 has changed to 16. ?? table 4-5 C the return range of 0xc k is now 0x10 C 0x3f . ? table 4-5 C the return range of 0x4k is now 0C 0xff . ?? section 5.19 C reference has changed to normal signal. ? table 5-4 C the number of bits for address 342 scope sync has changed to 6. ?? table 5-4 C address 347 has been added. it is reserved. ? table 5-7 C text added at bottom of table to say that cfo_1 and cfo_2 are exceptions. ? table 5-8 C the values for fhm have changed. ? section 5.23 to section 5.28 C text amended and added. ? section 6.1 C vdd and voltage forced onto any pin values changed. ? section 6.1 C various values changed. ? added conducted noise immunity on page 68 ? added documents to list in associated documents on page 70
72 at42qt1481 [datasheet] 9621exCat42C07/2014 revision no. history revision dx - august 2013 ? section 6.3 C expanded ta (ambient temperature) ? section 6.6 C updated the part marking diagram ? section 6.7 C updated the part number details revision ex - july 2014 non-technical updates
atmel corporation 1600 technology drive san jose, ca 95110 usa tel: (+1) (408) 441-0311 fax: (+1) (408) 487-2600 www.atmel.com atmel asia limited unit 01-5 & 16, 19f bea tower, millennium city 5 418 kwun tong roa kwun tong, kowloon hong kong tel: (+852) 2245-6100 fax: (+852) 2722-1369 atmel mnchen gmbh business campus parkring 4 d-85748 garching bei mnchen germany tel: (+49) 89-31970-0 fax: (+49) 89-3194621 atmel japan g.k. 16f shin-osaki kangyo bldg 1-6-4 osaki, shinagawa-ku tokyo 141-0032 japan tel: (+81) (3) 6417-0300 fax: (+81) (3) 6417-0370 ? 2014 atmel corporation. all rights reserved. / rev.: 9621exCat42C07/2014 disclaimer: the information in this document is provided in conn ection with atmel products. no license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of atmel products. exc ept as set forth in the atmel terms and conditions of sales locat ed on the atmel website, atmel assumes no liability whatsoever and disclaims any express, implied or statutory warranty relating to its products including, bu t not limited to, the implied warranty of merchantability, fitness for a particular purp ose, or non-infringement. in no event shall atmel be liable f or any direct, indirect, consequential, punitive, special or incide ntal damages (including, without limitation, damages for loss and profits, business i nterruption, or loss of information) arising out of the us e or inability to use this document, even if at mel has been advised of the possibility of suc h damages. atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the ri ght to make changes to specifications and products descriptions at any time without notice. atmel does not make any commitment to upda te the information contained herein. unless specifically provide d otherwise, atmel products are not suitable for, and shall not be used in, automotive applications. atmel products are not intended, authorized, or warranted for use as components in applicatio ns intended to support or sustain life. atmel ? , atmel logo and combinations thereof, enabling unlimited possibilities ? , adjacent key suppression ? , aks ? , and others are registered trademarks, qt ? and others are trademarks of atmel corporation or its subsidiaries. other terms and product names may be registered trademarks or trademarks of others.


▲Up To Search▲   

 
Price & Availability of AT42QT1481-14

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X