Low-Cost mTouch® Evaluation Kit User’s Guide 2015 Microchip Technology Inc. DS40001818A Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights unless otherwise stated. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 978-1-63277-997-7 QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == DS40001818A-page 2 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. 2015 Microchip Technology Inc. Object of Declaration: Low-Cost mTouch® Evaluation Kit User’s Guide 2015 Microchip Technology Inc. DS40001818A-page 3 PIC16LF1559 mTouch® Evaluation Kit User’s Guide NOTES: DS40001818A-page 4 2015 Microchip Technology Inc. LOW-COST mTouch® EVALUATION KIT USER’S GUIDE Table of Contents Preface ........................................................................................................................... 6 Chapter 1. Low-Cost mTouch Evaluation Kit Overview 1.1 Introduction ................................................................................................... 11 1.1.1 Kit Contents ............................................................................................... 11 1.2 Board Overview ............................................................................................ 11 1.2.1 Low-Cost Evaluation Board ....................................................................... 11 1.2.2 MCP2221 Breakout Module ...................................................................... 12 1.3 Board Setup ................................................................................................. 13 Chapter 2. Communication and System Register 2.1 Introduction ................................................................................................... 15 2.1.1 mTouch I2C communication protocols ....................................................... 15 2.1.1.1 Write Byte .................................................................................. 15 2.1.1.2 Read Byte .................................................................................. 15 2.1.1.3 Write Block ................................................................................ 15 2.1.1.4 Read Block ................................................................................ 16 2.1.2 System Register Description ..................................................................... 16 Chapter 3. Work with mTouch Dawn GUI 3.1 Dawn GUI Installation ................................................................................... 20 3.2 GUI Overview ............................................................................................... 21 Appendix A. Low-Cost mTouch Evaluation Board Worldwide Sales and Service .................................................................................... 26 2015 Microchip Technology Inc. DS40001818A-page 5 LOW-COST mTouch® EVALUATION KIT USER’S GUIDE Preface NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our website (www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the document. For the most up-to-date information on development tools, see the MPLAB® IDE online help. Select the Help menu, and then Topics to open a list of available online help files. INTRODUCTION This chapter contains general information that will be useful to know before using the Low-Cost mTouch® Evaluation Kit. Items discussed in this chapter include: • • • • • • • • Document Layout Conventions Used in this Guide Warranty Registration Recommended Reading The Microchip Website Development Systems Customer Change Notification Service Customer Support Revision History DOCUMENT LAYOUT This document describes how to use the Low-Cost mTouch Evaluation Kit as a development tool to evaluate mTouch 1D solution, as well as how to develop a capacitive sensing application based on this kit. The document is organized as follows: • Chapter 1. “Low-Cost mTouch Evaluation Kit Overview” – Offers information on the hardware of the evaluation kit. • Chapter 2. “Communication and System Register” – Introduces the I2C communication protocol and registers for the mTouch system. • Chapter 3. “Work with mTouch Dawn GUI” – Explains how to use Dawn GUI for this evaluation kit. • Appendix A. “Low-Cost mTouch Evaluation Board” – Provides the schematic and layout for this evaluation kit. DS40001818A-page 6 2015 Microchip Technology Inc. Preface CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Initial caps Quotes Underlined, italic text with right angle bracket Bold characters N‘Rnnnn Text in angle brackets < > Courier New font: Plain Courier New Represents Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB® IDE User’s Guide ...is the only compiler... the Output window the Settings dialog select Enable Programmer “Save project before build” A dialog button A tab A number in verilog format, where N is the total number of digits, R is the radix and n is a digit. A key on the keyboard Click OK Click the Power tab 4‘b0010, 2‘hF1 Italic Courier New Sample source code Filenames File paths Keywords Command-line options Bit values Constants A variable argument Square brackets [ ] Optional arguments Curly brackets and pipe character: { | } Ellipses... Choice of mutually exclusive arguments; an OR selection Replaces repeated text Represents code supplied by user 2015 Microchip Technology Inc. Examples File>Save Press <Enter>, <F1> #define START autoexec.bat c:\mcc18\h _asm, _endasm, static -Opa+, -Opa0, 1 0xFF, ‘A’ file.o, where file can be any valid filename mcc18 [options] file [options] errorlevel {0|1} var_name [, var_name...] void main (void) { ... } DS40001818A-page 7 Low-Cost mTouch® Evaluation Kit User’s Guide WARRANTY REGISTRATION Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users to receive new product updates. Interim software releases are available at the Microchip website. RECOMMENDED READING This user’s guide describes how to use the Low-Cost mTouch® Evaluation Kit. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources. http://www.microchip.com PIC16LF1554/1559 20-Pin Flash, 8-Bit Microcontroller Data Sheet (DS40001761) This data sheet provides detailed information regarding the PIC16LF1559. DS40001818A-page 8 2015 Microchip Technology Inc. Preface THE MICROCHIP WEBSITE Microchip provides online support via our website at www.microchip.com. This website is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the website contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip website at www.microchip.com, click on Customer Change Notification and follow the registration instructions. The Development Systems product group categories are: • Compilers – The latest information on Microchip C compilers, assemblers, linkers and other language tools. These include all MPLAB C compilers; all MPLAB assemblers (including MPASM™ assembler); all MPLAB linkers (including MPLINK™ object linker); and all MPLAB librarians (including MPLIB™ object librarian). • Emulators – The latest information on Microchip in-circuit emulators.This includes the MPLAB REAL ICE™ and MPLAB ICE 2000 in-circuit emulators. • In-Circuit Debuggers – The latest information on the Microchip in-circuit debuggers. This includes MPLAB ICD 3 in-circuit debuggers and PICkit™ 3 debug express. • MPLAB® IDE – The latest information on Microchip MPLAB IDE, the Windows® Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and MPLAB SIM simulator, as well as general editing and debugging features. • Programmers – The latest information on Microchip programmers. These include production programmers such as MPLAB REAL ICE in-circuit emulator, MPLAB ICD 3 in-circuit debugger and MPLAB PM3 device programmers. Also included are nonproduction development programmers such as PICSTART® Plus and PICkit 2 and 3. 2015 Microchip Technology Inc. DS40001818A-page 9 Low-Cost mTouch® Evaluation Kit User’s Guide CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • • • • Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the website at: http://www.microchip.com/support. REVISION HISTORY Revision A (November 2015) Initial release of this document. DS40001818A-page 10 2015 Microchip Technology Inc. LOW-COST mTouch® EVALUATION KIT USER’S GUIDE Chapter 1. Low-Cost mTouch® Evaluation Kit Overview 1.1 INTRODUCTION The Low-Cost mTouch Evaluation Kit provides a simple and flexible platform for demonstrating and developing a variety of capacitive sensing applications. The controller board utilizes the dual high-speed ADCs with automated hardware CVD modules to scan one proximity and five button sensors. The firmware supplied with the controller board has been optimized for moisture resistance and noise immunity. The kit also includes the MCP2221 breakout module, which allows the controller board to communicate with mTouch Dawn GUI. The Dawn GUI displays touch configuration and signals for real-time debugging. 1.1.1 Kit Contents • Low-Cost Controller Board with detachable sensors • MCP2221 Breakout Module • Mini to USB B Cable 1.2 BOARD OVERVIEW This kit includes the Low-Cost mTouch Controller Board and MCP2221 Breakout Module. They work in conjunction to provide real-time configuration and touch data to PC GUI. 1.2.1 LOW-COST EVALUATION BOARD TM FIGURE 1-1: Low-Cost Evaluation Board ® 2015 Microchip Technology Inc. ® DS40001818A-page 11 Low-Cost mTouch® Evaluation Kit User’s Guide Figure 1-1 shows the Low-Cost mTouch Evaluation board. It includes a proximity loop sensor, five touch button sensors, six LEDs, an ICSP™ header and PICkit™ Serial interface. The default firmware scans the proximity and touch buttons periodically, and uses the LEDs to indicate the proximity and button state. If a proximity or touch event is detected, the corresponding LED will be lit. An I2C interface is also implemented to communicate with a host system through the header marked with “PICkit SA”, which accommodates the PICkit Serial Analyzer pin-out. This feature allows the system not only to report its sensor data in real-time, but to be configured by a host device as well. 1.2.2 MCP2221 Breakout Module The Evaluation Kit comes with the MCP2221 Breakout Module (ADM00559) as shown in Figure 1-2. This module works as an I2C to USB bridge in this evaluation kit. FIGURE 1-2: MCP2221 BREAKOUT MODULE Refer to MCP2221 Breakout Module User’s Guide for more information on this breakout module. DS40001818A-page 12 2015 Microchip Technology Inc. Low-Cost mTouch® Evaluation Kit Overview 1.3 BOARD SETUP Before evaluating the kit, two boards in the kit need to be connected as shown in Figure 1-3, and then powered by the mini USB cable. After powering the kit, the proximity and touch functions will work out-of-box. The LEDs will reflect the state of proximity sensor and each touch button. BOARD SETUP TM FIGURE 1-3: ® ® The sensor portion of the low-cost board can be snapped off from the whole board, so that a different sensor can be connected to the controller through the P3 connector. This provides flexibility for quick prototyping and evaluating different sensor designs. In Figure 1-4, a four-channel slider is connected to the controller board through the P3 connector. SLIDER SENSOR EXAMPLE ® FIGURE 1-4: TM 2015 Microchip Technology Inc. DS40001818A-page 13 Low-Cost mTouch® Evaluation Kit User’s Guide NOTES: DS40001818A-page 14 2015 Microchip Technology Inc. LOW-COST mTouch® EVALUATION KIT USER’S GUIDE Chapter 2. Communication and System Register 2.1 INTRODUCTION The default firmware on the Low-cost Evaluation Board communicates with host system through a register-based I2C communication protocol. mTouch I2C communication protocols 2.1.1 The default I2C slave address for this evaluation board is 0x28 (7-bit address). The evaluation board supports the following protocols: Read Byte, Write Byte, Read Block, and Write Block. Please note that the system register referred in this document is on the firmware level, not the PIC® microcontroller registers in the data sheet. 2.1.1.1 WRITE BYTE The Write Byte protocol is used to write one byte of data to a specific register as shown in Table 2-1. TABLE 2-1: WRITE BYTE PROTOCOL Slave address Start 1->0 W 0b101000 Register Address ACK 0 0 2.1.1.2 XXh Register Data ACK 0 ACK XXh Stop 0 0->1 READ BYTE The Read Byte protocol is used to read one byte of data from the register shown in Table 2-2. TABLE 2-2: Start 1->0 READ BYTE PROTOCOL Slave address 0b101000 W 0 Register Address ACK 0 XXh 2.1.1.3 ACK 0 Start 1->0 Slave address 0b101000 R 1 ACK 0 Register Data XXh Nack 1 Stop 0->1 WRITE BLOCK The Write Block protocol is used to write multiple bytes to a group of contiguous registers as shown in Table 2-3. The internal Address Pointer will be automatically incremented after every byte is received. TABLE 2-3: Start 1->0 WRITE BLOCK PROTOCOL Slave address 0b101000 W 0 ACK 0 Register Address XXh ACK 0 Register Data XXh ACK 0 data @ start address 2015 Microchip Technology Inc. ... ... Register Data XXh ACK 0 Stop 0->1 data @ (start address + n) DS40001818A-page 15 Low-Cost mTouch® Evaluation Kit User’s Guide 2.1.1.4 READ BLOCK The Read Block protocol is used to read multiple data bytes from a group of contiguous registers as shown in Table 2-4. The internal Address Pointer will be automatically incremented after every byte is received. TABLE 2-4: READ BLOCK PROTOCOL Slave address Start W ACK 1->0 0b101000 0 0 ... Register Data n Nack Stop ... XXh 1 0->1 Register Address XXh ACK 0 Start 1->0 Slave address R 0b101000 1 ACK 0 Register Data XXh ACK 0 data @ (start address + n) data @ start address 2.1.2 System Register Description The protocol packet that is described above only contains one byte for system register address, so the addressing range is from 0 to 255 locations for a single command. To extend the addressing range, the firmware has partitioned the system memory in “banks”. Each bank has 256 locations and you can switch the active bank by writing the bank index to the bank register, which will be shown in the following tables. The registers shown in Table 2-5 are accessible from the communication protocol described above. Table 2-6 describes the details of each register. TABLE 2-5: Register Bank REGISTER MAP Register Addresses R/W Register Name Function Default Values 0x00 0x01 R Touch State Mask Returns the touch state of proximity/touch sensor inputs 0x00 0x00 0x10 R Proximity Signal Deviation Stores the delta count for proximity sensor 0x00 0x00 0x11 R Button 0 Signal Deviation Stores the delta count for touch button 0 0x00 0x00 0x12 R Button 1 Signal Deviation Stores the delta count for touch button 1 0x00 0x00 0x13 R Button 2 Signal Deviation Stores the delta count for touch button 2 0x00 0x00 0x14 R Button 3 Signal Deviation Stores the delta count for touch button 3 0x00 0x00 0x15 R Button 4 Signal Deviation Stores the delta count for touch button 4 0x00 0x00 0x40 R/W Proximity Threshold Stores the delta count threshold for proximity sensor 0x64 0x00 0x41 R/W Button 0 Threshold Stores the delta count threshold for touch button 0 0x40 0x00 0x42 R/W Button 1 Threshold Stores the delta count threshold for touch button 1 0x40 0x00 0x43 R/W Button 2 Threshold Stores the delta count threshold for touch button 2 0x40 0x00 0x44 R/W Button 3 Threshold Stores the delta count threshold for touch button 3 0x40 0x00 0x45 R/W Button4 Threshold Stores the delta count threshold for touch button 4 0x40 0x00 0x70 R/W Calibration State Mask Return the calibration state of proximity/touch sensors inputs 0x00 DS40001818A-page 16 2015 Microchip Technology Inc. Communication and System Register TABLE 2-5: Register Bank REGISTER MAP Register Addresses R/W Register Name 0x00 0x80 R/W Proximity Scaling Factor Stores the delta count scaling factor for proximity sensor 0x0A 0x00 0x81 R/W Button 0 Scaling Factor Stores the delta count scaling factor for button 0 0x0A 0x00 0x82 R/W Button 1 Scaling Factor Stores the delta count scaling factor for button 1 0x0A 0x00 0x83 R/W Button 2 Scaling Factor Stores the delta count scaling factor for button 2 0x0A 0x00 0x84 R/W Button 3 Scaling Factor Stores the delta count scaling factor for button 3 0x0A 0x00 0x85 R/W Button 4 Scaling Factor Stores the delta count scaling factor for button 4 0x0A 0x00 0xB0 R/W Reading Gain Store the reading gain for all sensor inputs 0x02 0x00 0xB1 R/W Baseline Gain Store the baseline gain for all sensor inputs 0x04 0x00 0xB2 R/W Baseline Rate Store the Baseline Rate fro all sensor inputs 0x10 0x00 0xC0 R/W Negative Delta Count Store the threshold of consecutive number of negative delta 0x10 0x00 0xC1 R/W Press Timeout Store the timeout count for pressed sensor inputs 0x0A 0x00 0xC2 R/W Debounce Store the debounce count for all sensor inputs 0x00 0x01 0x10 R 0x01 0x11 R Proximity Reading Store the unscaled proximity sensor readings 0x000000 0x01 0x12 R 0x01 0x13 R 0x01 0x14 R Button 0 Reading Store the unscaled button 0 readings 0x000000 0x01 0x15 R 0x01 0x16 R 0x01 0x17 R Button 1 Reading Store the unscaled button 1 readings 0x000000 0x01 0x18 R 0x01 0x19 R 0x01 0x20 R Button 2 Reading Store the unscaled button 2 readings 0x000000 0x01 0x21 R 0x01 0x22 R 0x01 0x23 R Button 3 Reading Store the unscaled button 3 readings 0x000000 0x01 0x24 R 0x01 0x25 R 0x01 0x26 R Button 4 Reading Store the unscaled button 4 readings 0x000000 0x01 0x27 R 0x02 0x10 R 0x02 0x11 R Proximity Baseline Store the unscaled proximity sensor baseline 0x000000 0x02 0x12 R 2015 Microchip Technology Inc. Default Values Function DS40001818A-page 17 Low-Cost mTouch® Evaluation Kit User’s Guide TABLE 2-5: Register Bank REGISTER MAP Register Addresses R/W 0x02 0x13 R 0x02 0x14 R 0x02 0x15 R 0x02 0x16 R 0x02 0x17 R 0x02 0x18 R 0x02 0x19 R 0x02 0x20 R 0x02 0x21 R 0x02 0x22 R 0x02 0x23 R 0x02 0x24 R 0x02 0x25 R 0x02 0x26 R 0x02 0x27 R 0xF0 R/W Active Bank 0xF1 R Sensor Input Count 0xF7 R 0xF8 R 0xF9 R 0xFA R 0xFB R 0xFC R 0xFD R Build Number Stores a fixed value that represents the build number 0x00 0xFE R Minor Version Stores a fixed value that represents the minor version number 0x00 0xFF R Major Version Stores a fixed value that represents the major version number 0x01 Available in all banks DS40001818A-page 18 Register Name Function Default Values Button 0 Baseline Store the unscaled button 0 baseline 0x000000 Button 1 Baseline Store the unscaled button 1 baseline 0x000000 Button 2 Baseline Store the unscaled button 2 baseline 0x000000 Button 3 Baseline Store the unscaled button 3 baseline 0x000000 Button 4 Baseline Store the unscaled button 4 baseline 0x000000 Product ID Manufacture ID Store the current active bank value 0x00 Return the count of sensor inputs 0x06 Store a fixed value that identifies each product (Little Endian) Store a fixed value that identifies Microchip (Little Endian) 0x00000001 0x0001 2015 Microchip Technology Inc. Communication and System Register TABLE 2-6: REGISTER DESCRIPTION Register Name Description Touch State Mask Bit 0 represents the touch state of proximity loop sensor, bit 1-5 represent the touch state of button 1-5, respectively. ‘0’ means no touch, ‘1’ means touch detected. Proximity/Button Signal Deviation This signal deviation register stores an 8-bit 2’s compliment signed value to represent the sensor delta value, which then compares with threshold to determine if a touch has been detected. Proximity/Button Threshold The Proximity/Button Threshold registers store the signal deviation threshold that is used to determine if a touch has been detected. Calibration State Mask Bit 0 represents the calibration state of proximity loop sensor, bit1-5 represent the calibration state of touch button 1-5, respectively. ‘0’ means calibration completed, ‘1’ means calibration is in process. Write ‘1’ to a bit in this register will force a calibration on the corresponding sensor. Proximity/Button Scaling Factor This register controls the sensitivity of proximity/touch detection. The smaller the value is, the more sensitivity the sensor gets. The range is from 0 to 15. Reading Gain This register controls the low pass filter gain for sensor reading. The range is from 0 to 3. Baseline Gain This register controls the low pass filter gain for sensor baseline. The range is from 0 to 3. Reading Rate This register value represents how many scan cycles before baseline update. The range is from 1 to 255. Negative Delta Count This register value determines how many consecutive negative signal deviation samples will trigger the baseline recalibration. The range is from 1 to 255. Debounce This register value determines how many consecutive signal deviation samples across the threshold will trigger the proximity/button touch event. The range is from 1 to 255. 2015 Microchip Technology Inc. DS40001818A-page 19 LOW-COST mTouch® EVALUATION KIT USER’S GUIDE Chapter 3. Work with mTouch® Dawn GUI The mTouch Dawn GUI can be installed on a Windows-based computer with a USB port, in order to further evaluate the performance and features of the PIC16LF1559 touch solution. The MCP2221 board works as the I2C host, polling data from the PIC16LF1559 evaluation board at a fixed time interval, communicating then with the Dawn GUI through USB communication. 3.1 DAWN GUI INSTALLATION Download the “Dawn 1.0 setup.zip” file from Microchip website (http://www.microchip.com/DM160227/). Unzip the file and run Dawn 1.0 setup.exe program. Figure 3-1 shows the initial installation screen, which displays briefly as the setup program loads, and follows the GUI installation to finish the setup. FIGURE 3-1: DS40001818A-page 20 GUI INSTALLATION 2015 Microchip Technology Inc. Work with mTouch® Dawn GUI 3.2 GUI OVERVIEW Before opening the Dawn GUI, connect the evaluation kit to the PC via USB. When the GUI is launched for the first time, a dialog window will show up to select the profile for this kit, as shown in Figure 3-2. FIGURE 3-2: PROFILE SELECTION There are two predefined profiles for this kit, which configures the registers that are displayed in the GUI. The “DM160227_Eval_Kit-Basic” configures the basic and mostly used registers, while the “DM160227_Eval_Kit_Advanced” displays all the mTouch registers. 2015 Microchip Technology Inc. DS40001818A-page 21 Low-Cost mTouch® Evaluation Kit User’s Guide The Dawn GUI contains five panels: Variable Control Panel, Signal Plotter Panel, Signal Level Panel, Signal Control Panel and Event Log Panel, as shown in Figure 3-3. FIGURE 3-3: DAWN GUI Variable Control Panel: Display system register value in text box at a fixed fresh rate, and also allow updating writable register values. Signal Control Panel: Configure the register values that are displayed in Signal Plotter and Signal Level Panels. Signal Plotter Panel: Display the register values configured in Signal Control Panel in the plot diagram fashion. Signal Level Panel: Display the register values configured in Signal Control Panel in the bar diagram fashion. Event Log Panel: Display the board, signals, and variables information. More details on the GUI can be found in the mTouch Dawn GUI User’s Guide. DS40001818A-page 22 2015 Microchip Technology Inc. Work with mTouch® Dawn GUI NOTES: 2015 Microchip Technology Inc. DS40001818A-page 23 DS40001818A-page 24 R18 P2 R14 10k R2 10k R7 10k R6 TX 100R R15 1 J3 DNP GND VDD SDA PGD PGC P1 1 13 12 11 10 19 18 17 4 3 2 RC2 RC3 RC7 RC5 RA1 RA0 PIC16LF1559-E/SS VDD RB4 RB5 RB6 RB7 RA0/ICSPDAT RA1/ICSPCLK RA2 RA3/MCLR/VPP RA4 RA5 U1 R17 GND 20 16 15 14 7 6 5 8 9 Touch output 1 2 3 4 5 6 P4 VSS RC0 RC1 RC2 RC3 RC4 RC5 RC6 RC7 3.3k SCL SDA 3.3k R16 0603 0603 HDR-2.54 Male 1x6 PICkit TM 3 1 2 3 4 5 6 Touch input 1 2 3 4 5 6 7 P3 0.1uF C1 PGD PGC SDA CS0 CS1 GUARD CS2 CS3 CS4 CS5 C2 1uF GND VDD HDR-2.54 Male 1x1 0603 0603 100R SCL RX CS1 0603 CS5 0603 CS4 0603 HDR-2.54 Male 1x6 PICkit TM SA 1 2 3 4 5 6 HDR-2.54 Male 1x1 GND J2 1 VDD HDR-2.54 Male 1x1 DNP J1 1 0603 0R SDA SCL TX RX 0603 0R 0603 0603 220R R10 10k R1 220R R11 R9 R8 10k R4 10k R5 R3 220R 220R VDD RC7 CS0 RC5 GUARD RC3 RC2 CS2 CS3 RED D0 CS1 PAD4 RED D1 CS2 RED D3 CS3 CS0 RED D2 CS4 R13 220R PGD RA0 RED D5 RED CS5 R12 220R PGC RA1 D4 Rubber Pad Cyl D7.9H5.3Rubber Pad Cyl D7.9H5.3 PAD3 Rubber Pad Cyl D7.9H5.3Rubber Pad Cyl D7.9H5.3 PAD2 FIGURE A-1: GND VDD VDD PAD1 LOW-COST mTouch® EVALUATION KIT USER’S GUIDE Appendix A. Low-Cost mTouch® Evaluation Board LOW-COST mTouch® EVALUATION BOARD SCHEMATIC 2015 Microchip Technology Inc. Low-Cost mTouch® Evaluation Board LOW-COST mTouch® EVALUATION BOARD LAYOUT (1 OF 2) TM FIGURE A-2: ® FIGURE A-3: LOW-COST mTouch® EVALUATION BOARD LAYOUT (2 OF 2) 2015 Microchip Technology Inc. DS40001818A-page 25 Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/support Web Address: www.microchip.com Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 Germany - Dusseldorf Tel: 49-2129-3766400 Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Hong Kong Tel: 852-2943-5100 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 Austin, TX Tel: 512-257-3370 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 China - Dongguan Tel: 86-769-8702-9880 China - Hangzhou Tel: 86-571-8792-8115 Fax: 86-571-8792-8116 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 Taiwan - Kaohsiung Tel: 886-7-213-7828 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 Germany - Karlsruhe Tel: 49-721-625370 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Poland - Warsaw Tel: 48-22-3325737 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 07/14/15 DS40001818A-page 26 2015 Microchip Technology Inc.