Configuring and Using the Alarm Module of the MCP795WXX Real-Time Clock/Calendars
Transcript of Configuring and Using the Alarm Module of the MCP795WXX Real-Time Clock/Calendars
AN2140Configuring and Using the Alarm Module of the
MCP795WXX Real-Time Clock/Calendars
INTRODUCTION
An increasing number of applications that involve timemeasurement require a Real-Time Clock/Calendar(RTCC) device. The MCP795WXX is a feature-rich SPIRTCC that incorporates EEPROM, SRAM, unique ID,timestamp, Watchdog Timer and event-detect module.This application note describes how to build an alarmsystem based on the above mentioned SPI RTCC, usingthe related alarm and control registers. In addition, itindicates how to configure/prepare the SPI RTCC for aspecific alarm application. This document is applicable tothe use of the following devices: MCP795W10,MCP795W11, MCP795W12, MCP795W20,MCP795W21 and MCP795W22.
FEATURES OF THE SPI RTCC
• Real-Time Clock/Calendar:- Hours, minutes, seconds, hundredths of
seconds, day of week, month and year- Support for leap year
• Leap Year Calculation up to 2399• Timestamp Function• 2 Kbit (256 x 8) EEPROM Memory
• Low-Power CMOS Technology• 64-Byte x 8 Organization Battery-Backed SRAM• Input for External Battery Backup• On-Board Crystal Oscillator for RTCC Functions:
- Battery operated when VCC removed• Programmable Clock-out Function• Two Programmable Alarms• 64-Bit Unique ID in Protected Area:
- Support EUI-48/64• Programmable Watchdog Timer• On-Board Event Detection:
- High-speed digital event detection on the 1st, 4th, 16th or 32nd event (glitch filter)
- Low-speed detection with programmable debounce time
- Dual configurable inputs• On-Chip Digital Trimming/Calibration
The SPI RTCC has many other features that make thechip useful for applications such as:
• time keeping (calibrated or not)• alarm systems• event detection• Watchdog Timer
SCHEMATICThe schematic includes a PIC18 Explorer demo boardand the SPI RTCC PICtail™ daughter board as shown inFigure 1.
FIGURE 1: SCHEMATIC
Author: Alexandru ValeanuMicrochip Technology Inc.
RC5/SD01 RA2
RA4/T0 CKI
RC3/SCK1/SCL1
RA5
RB0
PIC18F87J11
VDD
VDD
S1
S2
MENU KEY
SCK
SDI
MCP23S17SPI Expander
CS
RS
E
DB7 - 0
LCDLUMEX
10K
10K
BAT
1K
R4
100 pF
BAT 85
Y
C4
C3
10 pF
32.768 kHz
X1
X2
VBAT
WD
IRQ
CS
VSS
VCC
CLKOUT
EVHS
EVLS
SCK
SDI
SDO
SPI RTCCMCP795W
3
7
13
14
12
11
10
9
8
1
2
RC5/SDO1
RC4/SDI1
C1 = 0.1 µF
VDD VDD
INC KEY
6
4
5
VDD VDD
RC2 RB1/INT1 RB2/INT2
WD IRQ
IRQ WD
12 pF
J1
J2
1K
VDD 10K
POT R3
RA0/AN0C2
Note: AC164147 PICtail™ Board with MCP795W20 is used for this application.
2016 Microchip Technology Inc. DS00002140A-page 1
AN2140
The hardware structures used on the demo board are:
• LCD module
• Two push buttons
• The on-board potentiometer related to RA0 input and internal 10-bit Analog-to-Digital Converter (ADC)
• AC164147 SPI RTCC PICtail™ daughter board
To access the LCD through a minimum of pins, the SPIon the MSSP1 module is used, in conjunction with a16-bit I/O expander with SPI interface (MCP23S17).
The two on-board push buttons are S1 and S2,connected to RB0, RA5 GPIOs. The SPI RTCC is partof the PICtail evaluation board and is directlyconnected to the MSSP1 module of the microcontrollerthrough the related SPI lines: SCK, SDI, SDO, CS.
Another necessary connection is between the IRQsignal of the SPI RTCC and the RB1/INT1 pin of themicrocontroller. The RTCC is programed to assert lowthe IRQ pin at the end of the delay.
The PICtail daughter board has three other compo-nents:
• a 32,768 Hz crystal driving the internal clock of the RTCC
• a 3-volt battery sustaining the RTCC when VDD is not present on the demo board
• a SPI temperature sensor (TC72)
DETAILS ABOUT IMPLEMENTATION
The application is designed around the PIC18 Explorerboard, running on a PIC18F87J11 microcontroller. Thecode is written in C using MPLAB® X IDE and the XC8compiler. The firmware implements a delayed alarmsystem, based on the internal alarm registers forAlarm 0.
The value of the delay is imposed using the on-boardpotentiometer (R3) measured through the internal ADCand is enabled by the S1 push button.
The delay is then written to the Alarm 0 registers. Once this sequence is finished, the firmware displaysminutes and seconds (up to 17 minutes and3 seconds). After this time has been reached, an alarmmessage will be shown on the LCD. The applicationrestarts automatically after two seconds.
FUNCTIONAL DESCRIPTION
MCP795WXX works as an SPI slave, connected to theSPI bus of the PIC18 microcontroller (MSSP1 module).The Chip Select of the RTCC (CS = pin 6) is controlledby the RC2 GPO pin, defined in the spi_drivers.hheader as: #define NCS_SPI_RTCC PORTCbits.RC2.
As stated in the MCP795WXX data sheet (DS22280),for reads, the part is selected by pulling CS low, thenthe 8-bit READ instruction (13h) is transmitted to theMCP795WXX followed by the 8-bit address (A7through A0). After the correct READ instruction andaddress are sent, the data stored in the memory at theselected address is shifted out on the SO pin.
The data stored in the memory at the next address canbe read sequentially by continuing to provide clockpulses. The internal Address Pointer is automaticallyincremented to the next higher address after each byteof data is shifted out.
As the RTCC registers are separate from the SRAMarray, when reading the RTCC registers set, theaddress will wrap back to the start of the RTCCregisters.
Also when an address within the SRAM array is loaded,the internal Address Pointer will wrap back to the startof the SRAM array. The READ instruction can be usedto read the arrays indefinitely by continuing to clock thedevice. The read operation is terminated by raising theCS pin (Figure 2).
FIGURE 2: SPI READ SEQUENCE
SO
SI
SCK
CS
0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 221
0 101000 1 A7 6 5 4 1 A0
7 6 5 4 3 2 1 0
Instruction Address Byte
Data OutHigh-Impedance
23
3 2 Don’t care
Note: The address will roll over to the start of either the RTCC or SRAM block.
DS00002140A-page 2 2016 Microchip Technology Inc.
AN2140
For writes, as the RTCC and SRAM registers do notrequire the WREN sequence like the EEPROM, theuser may proceed by setting the CS low, issuing theWRITE instruction (12h), followed by the address, andthen the data to be written. As no write cycle is requiredfor the RTCC and SRAM registers, the entire array canbe written in a single command.
For the data to be actually written to the array, the CSmust be brought high after the last byte has beenclocked in. If CS is brought high at any other time, thelast byte will not be written. Refer to Figure 3 for moredetailed illustrations on the write sequence.
FIGURE 3: SPI WRITE SEQUENCE
APPLICATION DESCRIPTION
This application performs a delayed alarm system. Thefirmware goes through three states:
• Setting the value of the delay through theon-board potentiometer. The LCD screen readsas indicated in Figure 4.
FIGURE 4: SETTING THE VALUES OF THE DELAY
Once the value is enabled (through the S1 pushbutton), it will be written in the related alarm registersand the RTCC will be initialized.
• Reading the current time count (minutes andseconds). The related LCD screen reads asshown in Figure 5.
FIGURE 5: READING THE CURRENT TIME COUNT
• Reaching the end of the alarm delay. When amatch occurs between the time count and thealarm registers, the IRQ is asserted low. The pinis polled through firmware and the code stopsdisplaying the time count. The LCD screen showsas indicated in Figure 6.
FIGURE 6: REACHING THE END OF THE ALARM DELAY
The application will restart automatically after twoseconds.
SO
SI
SCK
CS
0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 221
0 001000 A7 6 5 4 1 A0 7 6 5 4 3 2 1 0
Instruction Address Byte Data Byte
High-Impedance
23
3 21
ALM= xxmin yysecS1= ENABLE ALARM
ALM= xxmin yysecCNT= mm ss
END OF ALARM
2016 Microchip Technology Inc. DS00002140A-page 3
AN2140
The application described in this application noterepresents an attempt of automation of a microwavebatch. It is important to know that an alarm systembased on a microcontroller and an RTCC cannot besustained on battery because when the VCC falls down,there is nothing to make the final decision at the end ofthe alarm. Moreover, without the VCC, IRQ is no longervalid and no interrupts appear, while SRAM andcounter of the RTCC are still alive.
FIRMWARE DESCRIPTION
The project follows the standard multi-file philosophy.All necessary drivers can be found in the relatedlibraries.
Delay Drivers (delay_drivers.h)
They have two applications in the project:
• LCD functions – Since the controller of the LCD needs some delays to process commands, few auxiliary delays were created, based on TMR1:
- dly39us() (39 µs)
- dly43us() (43 µs)
- dly1_5ms() (1.5 ms)
• Long delays – Used for the keyboard debounce or as general purpose. They are based on TMR3 and include:
- dly5ms() (5 ms)
- dly100ms() (100 ms)
- dly1s() (1s)
DS00002140A-page 4 2016 Microchip Technology Inc.
AN2140
LCD Drivers (lcd_drivers.h)
• Basic LCD functions – They handle data, com-mands and strings written into the LCD. The three drivers used are defined below:
Basic LCD Functions
• High-level LCD functions – They initialize or print date/time and long integers to the LCD.
The library also includes time and date globalvariables: sec, min, hr, day, dat, mon, yr.
High-Level LCD Functions
SPI Drivers (spi_drivers.h)
Represent the low-level communication between theMSSP1 module of the PIC18 and the SPI RTCC.
The related drivers will be detailed in the next para-graph, as called functions.
Software License AgreementThe software supplied herewith by Microchip Technology Incorporated (the “Company”) is intended and supplied to you, theCompany’s customer, for use solely and exclusively with products manufactured by the Company.The software is owned by the Company and/or its supplier, and is protected under applicable copyright laws. All rights are reserved.Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civilliability for the breach of the terms and conditions of this license.THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATU-TORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU-LAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FORSPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
void wrcmnd_lcd (unsigned char cmnd_lcd) ; // writes a command in the LCD
void wrdata_lcd (unsigned char data_lcd) ; // writes a data byte in the LCD
void wrstr_lcd (const unsigned char *str_lcd) ; // writes a string
// the string is stored in the Flash
void clr_lcd(void) ; void ini_lcd(void) ; // initialization of the LCD
void sec_to_lcd(void) ; void min_to_lcd(void) ;
void hr_to_lcd(void) ; // time printed to the LCD
void dat_to_lcd(void) ; void mon_to_lcd(void) ;
void yr_to_lcd(void) ; // date printed to the LCD
void back_lcd(unsigned char pos); // turns back cursor with 'pos' positions
void del_lcd(unsigned char pos) ; // deletes back 'pos' characters
void incr_yr(void) ; // increments YEARS value (2 digits), used in an electronicwatch
void incr_mon(void) ; // increments MONTHS value (2 digits), used in an electronicwatch
void incr_dat(void) ; // increments DATE value (2 digits), used in an electronicwatch
void incr_hr(void) ; // increments HOURS value (2 digits), used in an electronicwatch
void incr_min(void) ; // increments MINUTES ('minutes' have no aux flags)
void incr_sec(void) ; // increments SECONDS ; bit7 = ST = 1, used in an electronicwatch
2016 Microchip Technology Inc. DS00002140A-page 5
AN2140
RTCC Drivers (rtcc_drivers.h)
Represent the medium-level communication betweenthe MSSP1 module of the PIC18 and the SPI RTCC.
The related functions call the SPI drivers, as describedbelow. Moreover, the library defines all necessaryconstants as: register’s addresses and masks.
Writing a Byte to the SPI RTCC
The firmware for writes to the RTCC follows in the chartbelow.
Flowchart for Writes
Reading a byte from the SPI RTCC
void spi_rtcc_wr (unsigned char rtcc_reg, unsigned char time_var) {
// SPI write to the SPI RTCC
spi_rtcc_start() ; // start SPI comm with the SPI RTCC
spi_wrbyte(SPI_RTCC_WRITE) ; // send the SPI WRITE command
spi_wrbyte(rtcc_reg) ; // send the register's address
spi_wrbyte(time_var) ; // send the SPI data byte
spi_rtcc_stop() ;} // stop SPI comm
Assert low CS
Write the SPI WRITE command
Write the register’s address
Write data byte
Assert high CS
unsigned char spi_rtcc_rd(unsigned char rtcc_reg){
// SPI read from the SPI RTCC
spi_rtcc_start() ; // start the SPI comm with the SPI RTCC
spi_wrbyte(SPI_RTCC_READ) ; // send the SPI READ command
spi_wrbyte(rtcc_reg) ; // send the register's address
rtcc_buf = spi_rdbyte() ; // read the result and store it
spi_rtcc_stop() ; // stop the SPI comm with the SPI RTCC
return rtcc_buf ;} // return the read result
DS00002140A-page 6 2016 Microchip Technology Inc.
AN2140
The firmware for reads from the RTCC is shown in theflowchart below.
Flowchart for Reads
CONFIGURING/PREPARING THE SPI RTCC FOR ALARM APPLICATIONS
The function responsible for this important action is:void ini_spi_rtcc(void) and it is included in thespi_rtcc_drivers.h header.
The corresponding code is indicated below:
Assert low CS
Write the SPI REcommand
Write the register’s address
e data byte
Assert high CS
void ini_spi_rtcc(void) // initialization of the SPI RTCC
{
spi_rtcc_wr(ADDR_MNTH, 0x01) ; // month = 01
spi_rtcc_wr(ADDR_ALM0MTH, 0x01) ; // alarm month = 01
spi_rtcc_wr(ADDR_DAY, 0x01) ; // day of week = 01
// since an alarm system doesn’t work on back-up,
// the VBATEN bit was not set
spi_rtcc_wr(ADDR_DATE, 0x01) ; // date of month = 01
spi_rtcc_wr(ADDR_ALM0DAT, 0x01) ; // alarm date = 01
spi_rtcc_wr(ADDR_HOUR, 0x00) ; // hour = 00
spi_rtcc_wr(ADDR_ALM0HR, 0x00) ; // alarm hour = 00
spi_rtcc_wr(ADDR_MIN, 0x00 ; // minutes = 00
spi_rtcc_wr(ADDR_SEC, 0x00) ; // seconds = 00, stop oscillator
spi_rtcc_wr(ADDR_ALM0MIN, alm_min) ; // alarm min = alm_min(imposed by the pot)
spi_rtcc_wr(ADDR_ALM0SEC, alm_sec) ; // alarm sec = alm_sec(imposed by the pot)
spi_rtcc_wr(ADDR_CTRL, ALM_0) ; // enable ALARM0, OUT=0, no SQWAVE
spi_rtcc_wr(ADDR_ALM0CTL, ALMxC_ALL+0x01) ; // match on all variables,
} // alarm day of week = 1
2016 Microchip Technology Inc. DS00002140A-page 7
AN2140
This function initializes the SPI RTCC for a particularalarm application: the Alarm 0 module is activatedwhen all variables match. The below pairs of variablesare set identically, in order to offer a match from thebeginning:
• month & alarm0_month
• date & alarm0_date
• hour & alarm0_hour
The initialization is performed by the below codestatements:
The only exceptions are represented by the two pairsof variables which are active in this application:
• minutes & alarm0_minutes
• seconds & alarm0_seconds
Minutes and seconds are set to zero, but the relatedalarm variables are set to the values obtained from theinternal ADC: alm_min (alarm0_minutes), alm_sec(alarm0_seconds). As can be easily seen, the two pairswill match when the SPI RTCC will reach the final countup.
In addition, keep in mind that the related controlregisters are initialized in order to give an alarm (theIRQ pin will be asserted low) when all variables match.
The most important registers are:
• Control register (ADDR_CTRL) = address 08h
• Alarm 0 Control register (ADDR_ALM0CTL) = address 0fh
The general control register is set to ALM0 = 0x10.This means that only the Alarm 0 module is activated.
The related mask is defined in the “spi_rtcc_driv-ers.h” header as #define ALM0 0x10.
The Alarm 0 Control register (or day register) isprogrammed with the ALMxC_ALL mask, offering analarm interrupt when all variables match: month, date,hour, minutes, seconds. This mask is defined in the“spi_rtcc_drivers.h” header as#define ALMxC_ALL 0x70.
“0x01” must be added to this constant, in order toprogram the three Least Significant bits for the day ofthe week.
spi_rtcc_wr(ADDR_MNTH, 0x01) ; // month = 01
spi_rtcc_wr(ADDR_ALM0MTH, 0x01) ; // alarm month = 01
spi_rtcc_wr(ADDR_DATE, 0x01) ; // date of month = 01
spi_rtcc_wr(ADDR_ALM0DAT, 0x01) ; // alarm date = 01
spi_rtcc_wr(ADDR_HOUR, 0x00) ; // hour = 00
spi_rtcc_wr(ADDR_ALM0HR, 0x00) ; // alarm hour = 00
DS00002140A-page 8 2016 Microchip Technology Inc.
AN2140
ACCESSING THE RTCC REGISTERS
There are two basic functions for accessing the RTCCregisters: one for writes and one for reads. Each ofthem is fully described in the above paragraphs. Bothuse register’s addresses, inside the SRAM zone of theSPI RTCC.
As described in the MCP795WXX data sheet, theaddresses of the RTCC registers are shown in Table 1.
TABLE 1: RTCC REGISTER ADDRESS
According to these addresses, in the basic read/writefunctions, only the register’s address will differ. Readsare used in the RTCC count up until reaching the end.Writes are used in the initialization function.
An SPI access to the RTCC needs two SPI commandsas:
CONCLUSION
This application note presents how to control an alarmsystem, using the related alarm and control registers ofMicrochip’s SPI RTCC, MCP795WXX. The project isperformed on a PIC18 Explorer demo board, using theon-board resources: LCD (accessed through the SPIbus), push buttons and the on-board R3 potentiometerin conjunction with the related 10-bit ADC. The code(drivers and main function) is written in C, usingMPLAB® X IDE and the XC8 compiler. The preferredmicrocontroller is the PIC18F87J11.
Address BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 FUNCTION RANGE
Time and Configuration Registers
00h Tenth Seconds Hundredths of Seconds Hundredths of Seconds
00 - 99
01h ST (CT) 10 Seconds Seconds Seconds 00 - 59
02h 10 Minutes Minutes Minutes 00 - 59
03h CALSGN 12/24 10 HourAM/PM
10 Hour Hour Hours 1-12 + AM/PM00 - 23
04h OSCON VBAT VBATEN Day Day 1 - 7
05h 10 Date Date Date 01 - 31
06h LP 10 Month Month Month 01 - 12
07h 10 Year Year Year 00 - 99
08h OUT SQWE ALM1 ALM0 EXTOSC RS2 RS1 RS0 Control Reg.
09h CALIBRATION Calibration
0Ah WDTEN WDTIF WDDEL WDTPLS WD3 WD2 WD1 WD0 Watchdog
0Bh EVHIF EVLIF EVEN1 EVEN0 EVWDT EVDLB EVHS1 EVHS0 Event Detect
Alarm 0 Registers
0Ch 10 Seconds Seconds Seconds 00 - 59
0Dh 10 Minutes Minutes Minutes 00 - 59
0Eh 12/24 10 HourAM/PM
10 Hours Hour Hours 1-12 + AM/PM00 - 23
0Fh ALM0PIN ALM0C2 ALM0C0 ALM0C1 ALM0IF Day Day 1 - 7
10h 10 Date Date Date 01 - 31
11h 10 Month Month Month 01 - 12
READ 0001 0011 Read RTCC/SRAM arraybeginning at selected address
WRITE 0001 0010 Write RTCC/SRAM data tomemory array beginning atselected address
2016 Microchip Technology Inc. DS00002140A-page 9
AN2140
APPENDIX A: REVISION HISTORY
Revision A (May 2016)
• Initial release of this document.
DS00002140A-page 10 2016 Microchip Technology Inc.
AN2140
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 ourproducts. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such actsallow 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 deviceapplications and the like is provided only for your convenienceand may be superseded by updates. It is your responsibility toensure that your application meets with your specifications.MICROCHIP MAKES NO REPRESENTATIONS ORWARRANTIES OF ANY KIND WHETHER EXPRESS ORIMPLIED, WRITTEN OR ORAL, STATUTORY OROTHERWISE, RELATED TO THE INFORMATION,INCLUDING BUT NOT LIMITED TO ITS CONDITION,QUALITY, PERFORMANCE, MERCHANTABILITY ORFITNESS FOR PURPOSE. Microchip disclaims all liabilityarising from this information and its use. Use of Microchipdevices in life support and/or safety applications is entirely atthe buyer’s risk, and the buyer agrees to defend, indemnify andhold harmless Microchip from any and all damages, claims,suits, or expenses resulting from such use. No licenses areconveyed, implicitly or otherwise, under any Microchipintellectual property rights unless otherwise stated.
2016 Microchip Technology Inc.
Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV
== ISO/TS 16949 ==
Trademarks
The Microchip name and logo, the Microchip logo, AnyRate, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KeeLoq, KeeLoq logo, Kleer, LANCheck, LINK MD, 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.
ClockWorks, The Embedded Control Solutions Company, ETHERSYNCH, Hyper Speed Control, HyperLight Load, IntelliMOS, mTouch, Precision Edge, and QUIET-WIRE are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, MiWi, motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PureSilicon, RightTouch logo, REAL ICE, Ripple Blocker, Serial Quad I/O, SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2016, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
ISBN: 978-1-5224-0573-3
DS00002140A-page 11
DS00002140A-page 12 2016 Microchip Technology Inc.
AMERICASCorporate Office2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-7200 Fax: 480-792-7277Technical Support: http://www.microchip.com/supportWeb Address: www.microchip.com
AtlantaDuluth, GA Tel: 678-957-9614 Fax: 678-957-1455
Austin, TXTel: 512-257-3370
BostonWestborough, MA Tel: 774-760-0087 Fax: 774-760-0088
ChicagoItasca, IL Tel: 630-285-0071 Fax: 630-285-0075
ClevelandIndependence, OH Tel: 216-447-0464 Fax: 216-447-0643
DallasAddison, TX Tel: 972-818-7423 Fax: 972-818-2924
DetroitNovi, MI Tel: 248-848-4000
Houston, TX Tel: 281-894-5983
IndianapolisNoblesville, IN Tel: 317-773-8323Fax: 317-773-5453
Los AngelesMission 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 - TorontoTel: 905-673-0699 Fax: 905-673-6509
ASIA/PACIFICAsia Pacific OfficeSuites 3707-14, 37th FloorTower 6, The GatewayHarbour City, Kowloon
Hong KongTel: 852-2943-5100Fax: 852-2401-3431
Australia - SydneyTel: 61-2-9868-6733Fax: 61-2-9868-6755
China - BeijingTel: 86-10-8569-7000 Fax: 86-10-8528-2104
China - ChengduTel: 86-28-8665-5511Fax: 86-28-8665-7889
China - ChongqingTel: 86-23-8980-9588Fax: 86-23-8980-9500
China - DongguanTel: 86-769-8702-9880
China - HangzhouTel: 86-571-8792-8115 Fax: 86-571-8792-8116
China - Hong Kong SARTel: 852-2943-5100 Fax: 852-2401-3431
China - NanjingTel: 86-25-8473-2460Fax: 86-25-8473-2470
China - QingdaoTel: 86-532-8502-7355Fax: 86-532-8502-7205
China - ShanghaiTel: 86-21-5407-5533 Fax: 86-21-5407-5066
China - ShenyangTel: 86-24-2334-2829Fax: 86-24-2334-2393
China - ShenzhenTel: 86-755-8864-2200 Fax: 86-755-8203-1760
China - WuhanTel: 86-27-5980-5300Fax: 86-27-5980-5118
China - XianTel: 86-29-8833-7252Fax: 86-29-8833-7256
ASIA/PACIFICChina - XiamenTel: 86-592-2388138 Fax: 86-592-2388130
China - ZhuhaiTel: 86-756-3210040 Fax: 86-756-3210049
India - BangaloreTel: 91-80-3090-4444 Fax: 91-80-3090-4123
India - New DelhiTel: 91-11-4160-8631Fax: 91-11-4160-8632
India - PuneTel: 91-20-3019-1500
Japan - OsakaTel: 81-6-6152-7160 Fax: 81-6-6152-9310
Japan - TokyoTel: 81-3-6880- 3770 Fax: 81-3-6880-3771
Korea - DaeguTel: 82-53-744-4301Fax: 82-53-744-4302
Korea - SeoulTel: 82-2-554-7200Fax: 82-2-558-5932 or 82-2-558-5934
Malaysia - Kuala LumpurTel: 60-3-6201-9857Fax: 60-3-6201-9859
Malaysia - PenangTel: 60-4-227-8870Fax: 60-4-227-4068
Philippines - ManilaTel: 63-2-634-9065Fax: 63-2-634-9069
SingaporeTel: 65-6334-8870Fax: 65-6334-8850
Taiwan - Hsin ChuTel: 886-3-5778-366Fax: 886-3-5770-955
Taiwan - KaohsiungTel: 886-7-213-7828
Taiwan - TaipeiTel: 886-2-2508-8600 Fax: 886-2-2508-0102
Thailand - BangkokTel: 66-2-694-1351Fax: 66-2-694-1350
EUROPEAustria - WelsTel: 43-7242-2244-39Fax: 43-7242-2244-393
Denmark - CopenhagenTel: 45-4450-2828 Fax: 45-4485-2829
France - ParisTel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Germany - DusseldorfTel: 49-2129-3766400
Germany - KarlsruheTel: 49-721-625370
Germany - MunichTel: 49-89-627-144-0 Fax: 49-89-627-144-44
Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781
Italy - VeniceTel: 39-049-7625286
Netherlands - DrunenTel: 31-416-690399 Fax: 31-416-690340
Poland - WarsawTel: 48-22-3325737
Spain - MadridTel: 34-91-708-08-90Fax: 34-91-708-08-91
Sweden - StockholmTel: 46-8-5090-4654
UK - WokinghamTel: 44-118-921-5800Fax: 44-118-921-5820
Worldwide Sales and Service
07/14/15