Section 5. Flash Programming
|
|
|
- Chester Horton
- 9 years ago
- Views:
Transcription
1 Section 5. Flash Programming HIGHLIGHTS This section of the manual contains the following topics: 5.1 Introduction Control Registers Run-Time Self-Programming (RTSP) Operation Lock-Out Feature Word Programming Sequence Row Programming Sequence Page Erase Sequence Program Flash Memory Erase Sequence Operation in Power-Saving and Debug Modes Effects of Various Resets Interrupts Related Application Notes Revision History Flash Programming Microchip Technology Inc. DS61121F-page 5-1
2 PIC32 Family Reference Manual Note: This family reference manual section is meant to serve as a complement to device data sheets. Depending on the device variant, this manual section may not apply to all PIC32 devices. Please consult the note at the beginning of the Flash Programming chapter in the current device data sheet to check whether this document supports the device you are using. Device data sheets and family reference manual sections are available for download from the Microchip Worldwide Web site at: INTRODUCTION This section describes techniques for programming the Flash memory. PIC32 devices contain internal Flash memory for executing user code. There are three methods by which the user can program this memory: Run-Time Self-Programming (RTSP) performed by the user s software In-Circuit Serial Programming (ICSP ) performed using a serial data connection to the device, which allows much faster programming than RTSP Enhanced Joint Test Action Group Programming (EJTAG) performed by an EJTAG-capable programmer, using the EJTAG port of the device RTSP techniques are described in this chapter. The ICSP and EJTAG methods are described in the PIC32MX Flash Programming Specification (DS61145), which is available for download from the Microchip web site ( DS61121F-page Microchip Technology Inc.
3 Section 5. Flash Programming 5.2 CONTROL REGISTERS Flash program and erase operations are controlled using the following Non-Volatile Memory (NVM) control registers: NVMCON: Programming Control Register NVMKEY: Programming Unlock Register NVMADDR: Flash Address Register NVMDATA: Flash Program Data Register NVMSRCADDR: Source Data Address Register Table 5-1 provides a brief summary of all of the Flash-programming-related registers. Corresponding registers appear after the summary, followed by a detailed description. Table 5-1: Flash Controller SFR Summary Name Bit 31/23/15/7 Bit 30/22/14/6 Bit 29/21/13/5 Bit 28/20/12/4 Bit 27/19/11/3 Bit 26/18/10/2 Bit 25/17/9/1 Bit 24/16/8/0 NVMCON (1) 31:24 23:16 15:8 WR WREN WRERR LVDERR LVDSTAT 7:0 NVMOP<3:0> NVMKEY 31:24 NVMKEY<31:24> 23:16 NVMKEY<23:16> 15:8 NVMKEY<15:8> 7:0 NVMKEY<7:0> NVMADDR (1) 31:24 NVMADDR<31:24> 23:16 NVMADDR<23:16> 15:8 NVMADDR<15:8> 7:0 NVMADDR<7:0> NVMDATA 31:24 NVMDATA<31:24> 23:16 NVMDATA<23:16> 15:8 NVMDATA<15:8> 7:0 NVMDATA<7:0> NVMSRCADDR 31:24 NVMSRCADDR<31:24> 23:16 NVMSRCADDR<23:16> 15:8 NVMSRCADDR<15:8> 7:0 NVMSRCADDR<7:0> Legend: = unimplemented, read as 0. Note 1: This register has an associated Clear, Set, and Invert register at an offset of 0x4, 0x8, and 0xC bytes, respectively. These registers have the same name with CLR, SET, or INV appended to the end of the register name (e.g., NVMCONCLR). Writing a 1 to any bit position in these registers will clear, set, or invert valid bits in the associated register. Reads from these registers should be ignored. 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-3
4 PIC32 Family Reference Manual NVMCON Register The NVMCON register is the control register for Flash program/erase operations. This register selects whether an erase or program operation can be performed and is used to start the program or erase cycle. The NVMCON register is shown in Register 5-1. The lower byte of NVMCON configures the type of NVM operation that will be performed. A summary of the NVMCON setup values for various program and erase operations is given in Table 5-2. Table 5-2: NVMCON Register Values Operation Page Erase Program Word Program Row No Operation (NOP) NVMCON Value 0x8004 0x8001 0x8003 0x8000 Register 5-1: NVMCON: Programming Control Register U-0 U-0 U-0 U-0 U-0 U-0 U-0 U-0 bit 31 bit 24 U-0 U-0 U-0 U-0 U-0 U-0 U-0 U-0 bit 23 bit 16 HC, R/W-0 R/W-0 HS, R-0 HS, R-0 HS, HC, R-0 U-0 U-0 U-0 WR WREN (1) WRERR (2) LVDERR (2) LVDSTAT (2) bit 15 bit 8 U-0 U-0 U-0 U-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMOP<3:0> bit 7 bit 0 Legend: HS = Set by Hardware HC = Cleared by Hardware R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 -n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown bit Unimplemented: Read as 0 bit 15 WR: Write Control bit This bit is writable when WREN = 1 and the unlock sequence is followed. 1 = Initiate a Flash operation. Hardware clears this bit when the operation completes. 0 = Flash operation complete or inactive bit 14 WREN: Write Enable bit (1) 1 = Enable writes to the WR bit and enables the Low-Voltage Detect (LVD) circuit 0 = Disable writes to the WR bit and disables LVD circuit Note 1: This bit is reset by a device Reset. 2: This bit is cleared by setting NVMOP<3:0> = 0000, and initiating a Flash operation (i.e., WR). DS61121F-page Microchip Technology Inc.
5 Section 5. Flash Programming Register 5-1: NVMCON: Programming Control Register (Continued) bit 13 WRERR: Write Error bit (2) This bit is read-only and is automatically set by hardware. 1 = Program or erase sequence did not complete successfully 0 = Program or erase sequence completed normally bit 12 LVDERR: Low-Voltage Detect Error bit (LVD circuit must be enabled) (2) This bit is read-only and is automatically set by hardware. 1 = Low-voltage detected (possible data corruption, if WRERR is set) 0 = Voltage level is acceptable for programming bit 11 LVDSTAT: Low-Voltage Detect Status bit (LVD circuit must be enabled) (2) This bit is read-only and is automatically set, and cleared by hardware 1 = Low-voltage event active 0 = Low-voltage event NOT active bit 10-4 Unimplemented: Read as 0 bit 3-0 NVMOP<3:0>: NVM Operation bits These bits are writable when WREN = = Reserved 0111 = Reserved 0110 = No operation 0101 = Program Flash (PFM) erase operation: erases PFM, if all pages are not write-protected 0100 = Page erase operation: erases page selected by NVMADDR, if it is not write-protected 0011 = Row program operation: programs row selected by NVMADDR, if it is not write-protected 0010 = No operation 0001 = Word program operation: programs word selected by NVMADDR, if it is not write-protected 0000 = No operation Note 1: This bit is reset by a device Reset. 2: This bit is cleared by setting NVMOP<3:0> = 0000, and initiating a Flash operation (i.e., WR). 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-5
6 PIC32 Family Reference Manual NVMKEY Register NVMKEY is a write-only register that is used to prevent accidental writes/erasures of Flash or EEPROM memory. To start a programming or an erase sequence, the following steps must be taken in the exact order shown: 1. Write 0xAA to NVMKEY. 2. Write 0x556699AA to NVMKEY. After this sequence, only the next transaction on the peripheral bus is allowed to write the NVMCON register. In most cases, the user will simply need to set the WR bit in the NVMCON register to start the program or erase cycle. Interrupts should be disabled during the unlock sequence. Register 5-2: NVMKEY: Programming Unlock Register W-0 W-0 W-0 W-0 W-0 W-0 W-0 W-0 NVMKEY<31:24> bit 31 bit 24 W-0 W-0 W-0 W-0 W-0 W-0 W-0 W-0 NVMKEY<23:16> bit 23 bit 16 W-0 W-0 W-0 W-0 W-0 W-0 W-0 W-0 NVMKEY<15:8> bit 15 bit 8 W-0 W-0 W-0 W-0 W-0 W-0 W-0 W-0 NVMKEY<7:0> bit 7 bit 0 Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 -n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown bit 31-0 NVMKEY<31:0>: Unlock Register bits These bits are write-only, and read as 0 on any read Note: This register is used as part of the unlock sequence to prevent inadvertent writes to the PFM. DS61121F-page Microchip Technology Inc.
7 Section 5. Flash Programming NVMADDR Register The NVM Address register selects the row for Flash memory writes, the address location for word writes, and the page address for Flash memory erase operations. Note: The NVM Address register must be loaded with the physical address of the Flash memory and not the virtual address. Register 5-3: NVMADDR: Flash Address Register R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMADDR<31:24> bit 31 bit 24 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMADDR<23:16> bit 23 bit 16 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMADDR<15:8> bit 15 bit 8 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R-0 R-0 NVMADDR<7:0> bit 7 bit 0 Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 -n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown bit 31-0 NVMADDR<31:0>: Flash Address bits Bulk/Chip/PFM Erase: Address is ignored Page Erase: Address identifies the page to erase Row Program: Address identifies the row to program Word Program: Address identifies the word to program 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-7
8 PIC32 Family Reference Manual NVMDATA Register The NVM Data register holds the data to be programmed during Flash Word program operations. Register 5-4: NVMDATA: Flash Program Data Register R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMDATA<31:24> bit 31 bit 24 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMDATA<23:16> bit 23 bit 16 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMDATA<15:8> bit 15 bit 8 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMDATA<7:0> bit 7 bit 0 Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 -n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown bit 31-0 NVMDATA<31:0>: Flash Programming Data bits Note: The bits in this register are only reset by a Power-on Reset (POR). DS61121F-page Microchip Technology Inc.
9 Section 5. Flash Programming NVMSRCADDR Register The NVM Source Address register selects the source data buffer address in SRAM for performing row programming operations. Note: The address must be word-aligned. Register 5-5: NVMSRCADDR: Source Data Address Register R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMSRCADDR<31:24> bit 31 bit 24 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMSRCADDR<23:16> bit 23 bit 16 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMSRCADDR<15:8> bit 15 bit 8 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R-0 R-0 NVMSRCADDR<7:0> bit 7 bit 0 Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 -n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown bit 31-0 NVMSRCADDR<31:0>: Source Data Address bits The system physical address of the data to be programmed into the Flash when the NVMOP<3:0> bits (NVMCON<3:0>) are set to perform row programming. 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-9
10 PIC32 Family Reference Manual 5.3 RUN-TIME SELF-PROGRAMMING (RTSP) OPERATION Run-Time Self-Programming (RTSP) allows the user code to modify Flash program memory contents. The device Flash memory is divided into two logical Flash partitions: the program Flash memory (PFM), and the boot Flash memory (BFM). The last page in boot Flash memory contains the debug page, which is reserved for use by the debugger tool while debugging. The program Flash array for the PIC32 device is built up of a series of rows to form a page. Refer to the Flash Program Memory chapter of the specific device data sheet to determine the row and page sizes. For example, a row may contain bit instruction words or 512 bytes. A group of 8 rows compose a page; which, therefore, contains = 4096 bytes or 1024 instruction words. A page of Flash is the smallest unit of memory that can be erased at a single time. The program Flash array can be programmed in one of two ways: Row programming, with 128 instruction words at a time Word programming, with 1 instruction word at a time Performing an RTSP operation while executing (fetching) instructions from program Flash memory, the CPU stalls (waits) until the programming operation is finished. The CPU will not execute any instruction, or respond to interrupts, during this time. If any interrupts occur during the programming cycle, they remain pending until the cycle completes. Performing an RTSP operation while executing (fetching) instructions from RAM memory, the CPU can continue to execute instructions and respond to interrupts during the programming operation. Any executable code scheduled to execute during the RTSP operation must be placed in RAM memory. This includes the relevant interrupt vector, and the interrupt service routine instructions. Note: A minimum VDD requirement for Flash erase and write operations is required. Refer to the Electrical Characteristics chapter in the specific device data sheet for more information. DS61121F-page Microchip Technology Inc.
11 Section 5. Flash Programming 5.4 LOCK-OUT FEATURE NVMWREN A number of mechanisms exists within the device to ensure that inadvertent writes to program Flash do not occur. The WREN bit (NVMCON<14>) should be zero, unless the software intends to write to the program Flash. When WREN = 1, the Flash write control bit, WR (NVMCON<15>), is writable and the Flash LVD circuit is enabled NVMKEY In addition to the write protection provided by the WREN bit, an unlock sequence needs to be performed before the WR bit (NVMCOM<15>) can be set. If the WR bit is not set on the next peripheral bus transaction (read or write), WR is locked and the unlock sequence must be restarted Unlock Sequence To unlock Flash operations, perform steps 4 through 8 in order. If sequence is not followed, WR is not set. 1. Suspend or disable all initiators that can access the Peripheral Bus and interrupt the unlock sequence, e.g., DMA and interrupts. 2. Set WREN bit (NVMCON<14>) to allow writes to WR and set NVMOP<3:0> bit (NVMCON<3:0>) to the desired operation with a single store instruction. 3. Wait for LVD to start-up. 4. Load 0xAA to CPU register X. 5. Load 0x556699AA to CPU register Y. 6. Load 0x to CPU register Z. 7. Store CPU register X to NVMKEY. 8. Store CPU register Y to NVMKEY. 9. Store CPU register Z to NVMCONSET. 10. Wait for WR bit (NVMCON<15>) to be cleared. 11. Clear the WREN bit (NVMCON<14>). 12. Check the WRERR (NVMCON<13>) and LVDERR (NVMCON<12>) bits to ensure that the program/erase sequence completed successfully. When the WR bit is set, the program/erase sequence starts and the CPU is unable to execute from Flash memory for the duration of the sequence. 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-11
12 PIC32 Family Reference Manual Example 5-1: Unlock Example unsigned int NVMUnlock (unsigned int nvmop) { unsigned int status; // Suspend or Disable all Interrupts asm volatile ( di %0 : =r (status)); // Enable Flash Write/Erase Operations and Select // Flash operation to perform NVMCON = nvmop; // Write Keys NVMKEY = 0xAA996655; NVMKEY = 0x556699AA; // Start the operation using the Set Register NVMCONSET = 0x8000; // Wait for operation to complete while (NVMCON & 0x8000); // Restore Interrupts if (status & 0x ) asm volatile ( ei ); else asm volatile ( di ); // Disable NVM write enable NVMCONCLR = 0x ; } // Return WRERR and LVDERR Error Status Bits return (NVMCON & 0x3000); DS61121F-page Microchip Technology Inc.
13 Section 5. Flash Programming 5.5 WORD PROGRAMMING SEQUENCE The smallest block of data that can be programmed in a single operation is one 32-bit word. The data to be programmed must be written to the NVMDATA register, and the address of the word must be loaded into the NVMADDR register before the programming sequence is initiated. The instruction word at the location pointed to by the NVMADDR register is then programmed. A program sequence comprises the following steps: 1. Write 32-bit data to be programmed to the NVMDATA register. 2. Load the NVMADDR register with the address to be programmed. 3. Run the unlock sequence using the Word Program command (see Section Unlock Sequence ). The program sequence completes, and the WR bit (NVMCON<15>) is cleared by hardware. Example 5-2: Word Program Example unsigned int NVMWriteWord (void* address, unsigned int data) { unsigned int res; } // Load data into NVMDATA register NVMDATA = data; // Load address to program into NVMADDR register NVMADDR = (unsigned int) address; // Unlock and Write Word res = NVMUnlock (0x4001); // Return Result return res; 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-13
14 PIC32 Family Reference Manual 5.6 ROW PROGRAMMING SEQUENCE The largest block of data that can be programmed is 1 row, which equals to 512 bytes of data (refer to the Flash Program Memory chapter in the specific device data sheet to determine the row size). The row of data must first be loaded into a buffer in SRAM. The NVMADDR register then points to the Flash address where the Flash controller will start programming the row of data. Note: The Flash controller ignores the sub-row address bits and always starts programming at the beginning of a row. A row program sequence comprises the following steps: 1. Write the entire row of data to be programmed into system SRAM. The source address must be word-aligned. 2. Set the NVMADDR register with the start address of the Flash row to be programmed. 3. Set the NVMSRCADDR register with the physical source address from step Run the unlock sequence using the Row Program command (see Unlock Sequence ). 5. The program sequence completes, and the WR bit (NVMCON<15>) is cleared by hardware. Example 5-3: Row Program Example unsigned int NVMWriteRow (void* address, void* data) { unsigned int res; } // Set NVMADDR to Start Address of row to program NVMADDR = (unsigned int) address; // Set NVMSRCADDR to the SRAM data buffer Address NVMSRCADDR = (unsigned int) data; // Unlock and Write Row res = NVMUnlock(0x4003); // Return Result return res; DS61121F-page Microchip Technology Inc.
15 Section 5. Flash Programming 5.7 PAGE ERASE SEQUENCE A page erase performs an erase of a single page of either PFM or BFM. Refer to the specific device data sheet for the page size. The page to be erased is selected using the NVMADDR register. Note: The lower bits of the address are ignored in page selection. A page of Flash can only be erased if its associated page write protection is not enabled. All BFM pages are affected by the Boot write protection Configuration bit PFM pages are affected by the Program Flash write protection Configuration bits If in Mission mode, the application must not be executing from the erased page. A page erase sequence comprises the following steps: 1. Set the NVMADDR register with the address of the page to be erased. 2. Run the unlock sequence using the desired Erase command (see Unlock Sequence ). 3. The erase sequence completes and the WR bit (NVMCON<15>) is cleared by hardware. Example 5-4: Page Erase Example unsigned int NVMErasePage(void* address) { unsigned int res; // Set NVMADDR to the Start Address of page to erase NVMADDR = (unsigned int) address; // Unlock and Erase Page res = NVMUnlock(0x4004); // Return Result return res; } 5.8 PROGRAM FLASH MEMORY ERASE SEQUENCE It is possible to erase the entire PFM area. This mode leaves the boot Flash intact and is intended to be used by a field-upgradeable device. The program Flash can be erased if all pages in the program Flash are not write-protected. Note: The application must not be executing from the PFM address range. A PFM erase sequence comprises the following steps: 1. Run the unlock sequence using the program Flash memory erase command (see Unlock Sequence ). 2. The erase sequence completes and the WR bit (NVMCON<15>) is cleared by hardware. Example 5-5: Program Flash Erase Example unsigned int NVMErasePFM(void) { unsigned int res; 5 } // Unlock and Erase Program Flash res = NVMUnlock(0x4005); // Return Result return res; Flash Programming Microchip Technology Inc. DS61121F-page 5-15
16 PIC32 Family Reference Manual 5.9 OPERATION IN POWER-SAVING AND DEBUG MODES Operation in Sleep Mode When a PIC32 device enters Sleep mode, the system clock is disabled. The Flash controller does not function in Sleep mode. If entry into Sleep mode occurs while an NVM operation is in progress, the device will not go into Sleep mode until the NVM operation is complete Operation in Idle Mode Idle mode has no effect on the Flash controller module when a programming operation is active. The CPU continues to be stalled until the programming operation completes Operation in Debug Mode The Flash controller does not provide debug freeze capability, and therefore, has no effect on the Flash controller module when a programming operation is active. The CPU continues to be stalled until the programming operation completes. Interrupting the normal programming sequence could cause the device to latch-up. The only exception to this is the NVMKEY unlock sequence, which is suspended when in Debug mode, allowing the user to single-step through the unlock sequence EFFECTS OF VARIOUS RESETS Device Reset Only the NVMCON bits for WREN and LVDSTAT are reset on a device Reset. All other SFR bits are only reset by a POR; however, the state of the NVMKEY is reset by a device Reset Power-on Reset All Flash controller registers are forced to their reset states upon a POR Watchdog Timer Reset All Flash controller registers are unchanged upon a Watchdog Timer Reset. DS61121F-page Microchip Technology Inc.
17 Section 5. Flash Programming 5.11 INTERRUPTS The Flash controller can generate an interrupt reflecting the events that occur during the programming operations. The following interrupt can be generated: Flash Control Event Interrupt (FCEIF) The interrupt flag must be cleared in software.the Flash controller is enabled as a source of interrupt via the following bit: Flash Controller Interrupt Enable (FCEIE) The interrupt priority-level bits and interrupt subpriority-level bits must also be configured: FCEIP FCEIS Refer to Section 8. Interrupts (DS61108) in the PIC32 Family Reference Manual for details Interrupt Configuration The Flash controller module has a dedicated interrupt flag bit, FCEIF, and a corresponding interrupt enable/mask bit, FCEIE. These two bits determine the source of an interrupt and enable or disable an individual interrupt source. All the interrupt sources for a specific Flash controller module share one interrupt vector. In addition, the FCEIF bit will be set without regard to the state of the corresponding enable bit, and the FCEIF bit can be polled by software if desired. The FCEIE bit is used to define the behavior of the Vector Interrupt Controller (VIC) when a corresponding FCEIF bit is set. When the corresponding FCEIE bit is clear, the VIC module does not generate a CPU interrupt for the event. If the FCEIE bit is set, the VIC module will generate an interrupt to the CPU when the corresponding FCEIF bit is set (subject to the priority and subpriority as outlined in the following paragraphs). It is the responsibility of the user s software routine that services a particular interrupt to clear the appropriate Interrupt Flag bit before the service routine is complete. The priority of the Flash Controller module can be set independently with the FCEIP<2:0> bits. This priority defines the priority group to which the interrupt source is assigned. The priority groups range from a value of 7 (the highest priority), to a value of 0, which does not generate an interrupt. An interrupt being serviced is preempted by an interrupt in a higher priority group. The subpriority bits allow setting the priority of a interrupt source within a priority group. The values of the subpriority, FCEIS<1:0>, range from 3 (the highest priority), to 0 the lowest priority. An interrupt with the same priority group but having a higher subpriority value, does not preempt a lower subpriority interrupt that is in progress. The priority group and subpriority bits allow more than one interrupt source to share the same priority and subpriority. If simultaneous interrupts occur in this configuration, the natural order of the interrupt sources within a priority/subpriority group pair determine the interrupt generated. The natural priority is based on the vector numbers of the interrupt sources. The lower the vector number, the higher the natural priority of the interrupt. Any interrupts that are overridden by natural order generate their respective interrupts based on priority, subpriority, and natural order, after the interrupt flag for the current interrupt is cleared. After an enabled interrupt is generated, the CPU jumps to the vector assigned to that interrupt. The vector number for the interrupt is the same as the natural order number. Then, the CPU begins executing code at the vector address. The user s code at this vector address should perform any application-specific operations, clear the FCEIF interrupt flag, and then exit. For more information on interrupts and the vector address table details, refer to Section 8. Interrupts (DS61108) in the PIC32 Family Reference Manual and the Interrupt Controller chapter of the specific device data sheet. 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-17
18 PIC32 Family Reference Manual 5.12 RELATED APPLICATION NOTES This section lists application notes that are related to this section of the manual. These application notes may not be written specifically for the PIC32 device family, but the concepts are pertinent and could be used with modification and possible limitations. The current application notes related to Flash Programming include the following: Title Application Note # No related application notes at this time. N/A Note: Please visit the Microchip web site ( for additional application notes and code examples for the PIC32 family of devices. DS61121F-page Microchip Technology Inc.
19 Section 5. Flash Programming 5.13 REVISION HISTORY Revision A (September 2007) This is the initial released version of this document. Revision B (October 2007) Updated document to remove Confidential status. Revision C (April 2008) Revised status to Preliminary; Revised U-0 to r-x. Revision D (June 2008) Revised Register 5-1, bit 14 NVMWREN; Add footnote 1 to Registers 5-12 through 5-14; Add note to Section 5.3; Revise Section 5.4.1; Revised Example 5-1; Change Reserved bits Maintain as to Write. Revision E (December 2010) This revision includes the following updates: Minor updates to the text and formatting have been incorporated throughout the document Added Notes 1, 2 and 3, which describe the Clear, Set and Invert registers to the following: - Table 5-1: Flash Controller SFR Summary - Register 5-1: NVMCON: Programming Control Register (1,2,3) - Register 5-3: NVMADDR: Flash Address Register (1,2,3) Removed all Clear, Set and Invert register descriptions Removed all Interrupt register references Renamed the following NVMCON register bit names were changed throughout the document: - NVMWR was renamed to WR - NVMWREN was renamed to WREN - NVMERR was renamed to WRERR Updated the third paragraph and added a new (fourth) paragraph to 5.3 Run-Time Self-Programming (RTSP) Operation Updated the unlock Flash operations sequence by adding a new step 3 (see Unlock Sequence ) Updated the code in the Unlock Example (see Example 5-1) Removed Table 5-3 Revision F (July 2012) This revision includes the following updates: Updated Note 1 and removed Notes 2 and 3 from the Flash Controller SFR Register Summary (see Table 5-1) Updated NVMCON (see Register 5-1) Removed Notes 1, 2, and 3 from NVMADDR (see Register 5-3) Updated the second paragraph of 5.3 Run-Time Self-Programming (RTSP) Operation Updated the first paragraph of 5.6 Row Programming Sequence Updated the first paragraph of 5.7 Page Erase Sequence Minor updates to the text and formatting have been incorporated throughout the document 5 Flash Programming Microchip Technology Inc. DS61121F-page 5-19
20 PIC32 Family Reference Manual NOTES: DS61121F-page Microchip Technology Inc.
21 Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip Data Sheet. Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable. Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dspic, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC 32 logo, rfpic and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, chipkit, chipkit logo, CodeGuard, dspicdem, dspicdem.net, dspicworks, dsspeak, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mtouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rflab, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock 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. All other trademarks mentioned herein are property of their respective companies , Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS == ISBN: 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 Microchip Technology Inc. DS61121F-page 5-21
22 Worldwide Sales and Service AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ Tel: Fax: Technical Support: support Web Address: Atlanta Duluth, GA Tel: Fax: Boston Westborough, MA Tel: Fax: Chicago Itasca, IL Tel: Fax: Cleveland Independence, OH Tel: Fax: Dallas Addison, TX Tel: Fax: Detroit Farmington Hills, MI Tel: Fax: Indianapolis Noblesville, IN Tel: Fax: Los Angeles Mission Viejo, CA Tel: Fax: Santa Clara Santa Clara, CA Tel: Fax: Toronto Mississauga, Ontario, Canada Tel: Fax: ASIA/PACIFIC Asia Pacific Office Suites , 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: Fax: Australia - Sydney Tel: Fax: China - Beijing Tel: Fax: China - Chengdu Tel: Fax: China - Chongqing Tel: Fax: China - Hangzhou Tel: Fax: China - Hong Kong SAR Tel: Fax: China - Nanjing Tel: Fax: China - Qingdao Tel: Fax: China - Shanghai Tel: Fax: China - Shenyang Tel: Fax: China - Shenzhen Tel: Fax: China - Wuhan Tel: Fax: China - Xian Tel: Fax: China - Xiamen Tel: Fax: ASIA/PACIFIC India - Bangalore Tel: Fax: India - New Delhi Tel: Fax: India - Pune Tel: Fax: Japan - Osaka Tel: Fax: Japan - Yokohama Tel: Fax: Korea - Daegu Tel: Fax: Korea - Seoul Tel: Fax: or Malaysia - Kuala Lumpur Tel: Fax: Malaysia - Penang Tel: Fax: Philippines - Manila Tel: Fax: Singapore Tel: Fax: Taiwan - Hsin Chu Tel: Fax: Taiwan - Kaohsiung Tel: Fax: Taiwan - Taipei Tel: Fax: Thailand - Bangkok Tel: Fax: EUROPE Austria - Wels Tel: Fax: Denmark - Copenhagen Tel: Fax: France - Paris Tel: Fax: Germany - Munich Tel: Fax: Italy - Milan Tel: Fax: Netherlands - Drunen Tel: Fax: Spain - Madrid Tel: Fax: UK - Wokingham Tel: Fax: China - Zhuhai Tel: Fax: /29/11 DS61121F-page Microchip Technology Inc.
AN1286. Water-Resistant Capacitive Sensing INTRODUCTION THEORY OF OPERATION. Sensing Steps. Sensing Steps Description DESIGN
Water-Resistant Capacitive Sensing AN1286 Author: INTRODUCTION Thomas Perme Steven Lin Microchip Technology Inc. This application note describes a new hardware sensing method which is resilient to water
TB3016. Using the PIC MCU CTMU for Temperature Measurement IMPLEMENTATION BASIC PRINCIPLE MEASUREMENT CIRCUIT
Using the PIC MCU CTMU for Temperature Measurement Author: Padmaraja Yedamale Microchip Technology Inc. The Charge Time Measurement Unit (CTMU), introduced on the latest generation of PIC24F and PIC18F
Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices RECOMMENDED CONNECTIONS FOR 23X256,23X640 SERIES DEVICES VCC 23X256/ HOLD.
Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices Author: INTRODUCTION Martin Bowman Microchip Technology Inc. This document details recommended usage of the Microchip 23X256 and 23X640
AN1303. Software Real-Time Clock and Calendar Using PIC16F1827 DATA INTERFACE INTRODUCTION IMPLEMENTATION INTERNAL REGISTER MAP
Software Real-Time Clock and Calendar Using PIC16F1827 Author: INTRODUCTION Cristian Toma Microchip Technology Inc. This application note describes the implementation of software Real-Time Clock and Calendar
Installing and Licensing MPLAB XC C Compilers
Installing and Licensing MPLAB XC C Compilers DS50002059G Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
Universal Programming Module 2
Universal Programming Module OVERVIEW The Universal Programming Module (UPM) is a handy, low-cost board that supports the programming of Microchip devices using MPLAB in-circuit emulators and debuggers.
AN1142. USB Mass Storage Class on an Embedded Host INTRODUCTION. USB Mass Storage Class. Overview
USB Mass Storage Class on an Embedded Host Author: INTRODUCTION With the introduction of Microchip's microcontrollers with the USB OTG peripheral, microcontroller applications can easily support USB Embedded
AN1325. mtouch Metal Over Cap Technology THEORY OF OPERATION INTRODUCTION CROSS SECTION OF METAL OVER CAPACITIVE (UNPRESSED)
mtouch Metal Over Cap Technology AN1325 Authors: INTRODUCTION Keith Curtis Dieter Peter Microchip Technology Inc. As a user interface, capacitive touch has several advantages: it is low power, low cost,
Section 15. Input Capture
Section 15. Input Capture HIGHLIGHTS This section of the manual contains the following topics: 15.1 Introduction...15-2 15.2 Input Capture Registers...15-4 15.3 Timer Selection...15-8 15.4 Input Capture
AN1199. 1-Wire Communication with PIC Microcontroller INTRODUCTION. OVERVIEW OF THE 1-Wire BUS. 1-Wire Protocol. Prerequisites
1-Wire Communication with PIC Microcontroller Author: INTRODUCTION This application note introduces the user to the 1-Wire communication protocol and describes how a 1-Wire device can be interfaced to
Uninstalling Incorrect USB Device Drivers
DEVELOPMENT SYSTEMS Uninstalling Incorrect USB Device Drivers RECOMMENDED UNINSTALL METHODS When using the Microchip development tools listed below, trouble may be experienced as a result of incorrect
TC1047/TC1047A. Precision Temperature-to-Voltage Converter. General Description. Applications. Block Diagram. Features.
Precision Temperature-to-Voltage Converter Features Supply Voltage Range: - TC147: 2.7V to 4.4V - TC147A: 2.V to.v Wide Temperature Measurement Range: - -4 o C to +12 o C High Temperature Converter Accuracy:
AN687. Precision Temperature-Sensing With RTD Circuits RTD OVERVIEW INTRODUCTION EQUATION 1:
Precision Temperature-Sensing With RTD Circuits Author: INTRODUCTION Bonnie C. Baker Microchip Technology Inc. The most widely measured phenomena in the process control environment is temperature. Common
AN1275. KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder KEY FEATURES OVERVIEW. Microchip Technology Inc.
KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder Author: OVERVIEW Enrique Aleman Microchip Technology Inc. This application note describes a KEELOQ with AES code hopping decoder implemented
AN1543. Using MRF24W with PIC32 Internal Program Flash Memory For EZ_CONFIG_STORE ALTERNATIVE LOW-COST SOLUTIONS OVERVIEW SCOPE
Using MRF24W with PIC32 Internal Program Flash Memory For EZ_CONFIG_STORE Author: OVERVIEW This application note describes the EZ_CONFIG_STORE feature used in the Wi-Fi G Demo Board and TCPIP-WiFi EZConfig
AN1470. Manchester Decoder Using the CLC and NCO ABSTRACT INTRODUCTION MANCHESTER ENCODED DATA (AS PER G.E. THOMAS)
Manchester Decoder Using the CLC and NCO Authors: ABSTRACT A Manchester decoder can be built using Microchip s award winning CLC (Configurable Logic Cell) blocks and NCO (Numerically Controlled Oscillator)
AN1857. RGBW Color Mixing DALI Control Gear. COLOR MIXING USING RED, GREEN, BLUE AND WHITE LEDs INTRODUCTION HARDWARE
RGBW Color Mixing DALI Control Gear AN1857 Author: INTRODUCTION Mihai Cuciuc Microchip Technology Inc. This application note provides an example of obtaining custom colors by combining the spectra of the
AN1332. Current Sensing Circuit Concepts and Fundamentals CURRENT SENSING RESISTOR INTRODUCTION. Description. Microchip Technology Inc.
Current Sensing Circuit Concepts and Fundamentals Author: INTRODUCTION Yang Zhen Microchip Technology Inc. Current sensing is a fundamental requirement in a wide range of electronic applications. Typical
Features, Value and Benefits of Digital Control for Power Supplies
Author: INTRODUCTION Sagar Khare Microchip Technology Inc. Control of Switch Mode Power Supplies (SMPSs) has traditionally been a purely analog domain. The advent of low-cost, high-performance Digital
TC7660. Charge Pump DC-to-DC Voltage Converter. Package Types. Features. General Description. Applications. Functional Block Diagram TC7660
Charge Pump DC-to-DC Voltage Converter Features Wide Input Voltage Range:.V to V Efficient Voltage Conversion (99.9%, typ) Excellent Power Efficiency (9%, typ) Low Power Consumption: µa (typ) @ V IN =
AN1492. Microchip Capacitive Proximity Design Guide INTRODUCTION CAPACITIVE SENSING BASICS SENSING
Microchip Capacitive Proximity Design Guide Author: INTRODUCTION Xiang Gao Microchip Technology Inc. Proximity detection provides a new way for users to interact with electronic devices without having
AN1156. Battery Fuel Measurement Using Delta-Sigma ADC Devices INTRODUCTION REVIEW OF BATTERY CHARGING AND DISCHARGING CHARACTERISTICS
Battery Fuel Measurement Using Delta-Sigma ADC Devices Author: INTRODUCTION Youbok Lee, Ph.D. Microchip Technology Inc. The battery fuel status indicator is a common feature of the battery-supported handheld
PIC32 Microcontroller Families
32-bit Microcontrollers Winter 2009 PIC32 Microcontroller Families With USB, CAN and Ethernet www.microchip.com/pic32 Building on the heritage of Microchip Technology s world-leading 8- and 16-bit PIC
AN1066. Microchip MiWi Wireless Networking Protocol Stack INTRODUCTION CONSIDERATIONS TERMINOLOGY FEATURES
Microchip MiWi Wireless Networking Protocol Stack Author: INTRODUCTION Implementing applications with wireless networking is now common. From consumer devices to industrial applications, there is a growing
Timers: Timer0 Tutorial (Part 1)
Timers: Timer0 Tutorial (Part 1) 2007 Microchip Technology Inc. DS51682A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained
AN905. Brushed DC Motor Fundamentals INTRODUCTION PRINCIPLES OF OPERATION. Stator. Rotor SIMPLE TWO-POLE BRUSHED DC MOTOR. Microchip Technology Inc.
Brushed DC Motor Fundamentals AN905 Author: Reston Condit Microchip Technology Inc. INTRODUCTION Brushed DC motors are widely used in applications ranging from toys to push-button adjustable car seats.
AN1353. Op Amp Rectifiers, Peak Detectors and Clamps INTRODUCTION BASIC RECTIFIERS. Choosing the Components. Positive Half-Wave Rectifier.
Op Amp Rectifiers, Peak Detectors and Clamps Author: Dragos Ducu, Microchip Technology Inc. INTRODUCTION This application note covers a wide range of applications, such as halfwave rectifiers, fullwave
Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller
Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller Author: INTRODUCTION Brian Chu Microchip Technology Inc. Batteries often
PIC18F26K20/46K20 Rev. B2/B3/B5/B6 Silicon Errata and Data Sheet Clarification
PIC18F26K20/46K20 Rev. B2/B3/B5/B6 Silicon Errata and Data Sheet Clarification The PIC18F26K20/46K20 family devices that you have received conform functionally to the current Device Data Sheet (DS41303G),
MPLAB XC8 GETTING STARTED GUIDE. MPLAB XC8 Getting Started Guide
MPLAB XC8 GETTING STARTED GUIDE MPLAB XC8 Getting Started Guide This document provides a starting point for programmers who are just starting out with the MPLAB XC8 C Compiler, particularly those who are
MCP73X23 Lithium Iron Phosphate (LiFePO 4 ) Battery Charger Evaluation Board User s Guide
MCP73X23 Lithium Iron Phosphate (LiFePO 4 ) Battery Charger Evaluation Board User s Guide 2009 Microchip Technology Inc. DS51850A Note the following details of the code protection feature on Microchip
AN1265. KEELOQ with AES Microcontroller-Based Code Hopping Encoder INTRODUCTION DUAL ENCODER OPERATION BACKGROUND FUNCTIONAL INPUTS AND
KEELOQ with AES Microcontroller-Based Code Hopping Encoder Authors: INTRODUCTION This application note describes the design of a microcontroller-based KEELOQ Hopping Encoder using the AES encryption algorithm.
AN1465. Digitally Addressable Lighting Interface (DALI) Communication TERMINOLOGY PHYSICAL LAYER DALI FREE-FORM LAYOUT. Topology FIGURE 1:
Digitally Addressable Lighting Interface (DALI) Communication Author: Shaima Husain Microchip Technology Inc. The Digitally Addressable Lighting Interface (DALI) has emerged as a standard in Europe to
AN1212. Using USB Keyboard with an Embedded Host INTRODUCTION. USB Keyboard Overview. USB Keyboard with an Embedded Host USB KEYBOARD OUTPUT REPORT
Using USB Keyboard with an Embedded Host Author: INTRODUCTION Amardeep Gupta Microchip Technology Inc. Microcontroller applications can easily support USB embedded host functionality with the introduction
Touch Through Metal. mtouch Metal Over Capacitive Technology Part 1
Touch Through Metal mtouch Metal Over Capacitive Technology Part 1 2010 Microchip Technology Incorporated. All Rights Reserved. Touch Through Metal Slide 1 Hello and welcome to Microchip s Touch Through
MPLAB Code Configurator User s Guide
MPLAB Code Configurator User s Guide 2013-2014 Microchip Technology Inc. DS40001725B MPLAB CODE CONFIGURATOR USER S GUIDE Note the following details of the code protection feature on Microchip devices:
MCP2200 USB to RS-232 Demo Board User s Guide
MCP2200 USB to RS-232 Demo Board User s Guide DS51901A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
dspic30f3012/3013 dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata Silicon Errata Summary
dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata The dspic30f3012/3013 (Rev. B0) samples you have received were found to conform to the specifications and functionality
Integrated Development Environment
Development Tools Integrated Development Environment Transforming Ideas Into Realities The typical product development life cycle is comprised of smaller cycles each representing an iterative process toward
28-PIN DEMO BOARD USER S GUIDE
28-PIN DEMO BOARD USER S GUIDE 2006-2015 Microchip Technology Inc. DS40001301B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD
WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD 2004 Microchip Technology Inc. DS51512A Note the following details of the code protection feature on Microchip devices: Microchip products meet
Resistive Temperature Detector (RTD) Reference Design
Resistive Temperature Detector (RTD) Reference Design DS51891A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their
AN645. PIC16C57 Based Code Hopping Security System PINOUT OVERVIEW FEATURES BLOCK DIAGRAM RECOMMENDED READING
PI657 Based ode Hopping Security System Author: OVERVIEW This document describes a PI657 based code hopping automotive security system. The security system implements all the basic features found on security
AN1256. Microchip s Power MOSFET Driver Simulation Models INTRODUCTION MODEL DESCRIPTION. Using The Power MOSFET Simulation Models
Microchip s Power MOSFET Driver Simulation Models Author: INTRODUCTION Cliff Ellison (Microchip Technology Inc.) Ron Wunderlich (Innovative Ideas and Design) The simulation models for Microchip s power
Section 33. Programming and Diagnostics
Section 33. Programming and Diagnostics HIGHLIGHTS This section of the manual contains the following topics: 33.1 Introduction... 33-2 33.2 Operation... 33-3 33.3 Interrupts... 33-13 33.4 Operation in
Section 29. Real-Time Clock and Calendar (RTCC)
Section 29. Real-Time Clock and Calendar (RTCC) HIGHLIGHTS This section of the manual contains the following topics: 29.1 Introduction... 29-2 29.2 Status and Control Registers... 29-3 29.3 Modes of Operation...
AN1387. Using PIC32 MCUs to Develop Low-Cost Controllerless (LCC) Graphics Solutions INTRODUCTION. Basic Graphics Definitions
Using PIC32 MCUs to Develop Low-Cost Controllerless (LCC) Graphics Solutions Author: INTRODUCTION Adam Folts, Microchip Technology Inc. As the demand for Graphical Embedded Applications becomes more popular,
MPLAB ICD 3 In-Circuit Debugger User s Guide For MPLAB X IDE
MPLAB ICD 3 In-Circuit Debugger User s Guide For MPLAB X IDE DS52081A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained
Section 15. Quadratrure Encoder Interface (QEI)
Section 15. Quadratrure Encoder Interface (QEI) HIGHLIGHTS This section of the manual contains the following major topics: 15.1 Introduction... 15-2 15.2 Control and Status Registers... 15-4 15.3 Programmable
Serial EEPROM Powered for Automotive
Automotive Memory Products Serial EEPROM Powered for Automotive www.microchip.com/memory Microchip Serial Memory Products Microchip Technology has developed industry-leading processes for each step in
AN1861. Bluetooth Smart Communication Using Microchip RN4020 Module and 16-bit PIC Microcontroller BLUETOOTH SMART COMMUNICATION INTRODUCTION
Bluetooth Smart Communication Using Microchip RN4020 Module and 16-bit PIC Microcontroller Author: Venkatesh Bengeri and Pradeep Shamanna INTRODUCTION Most of the embedded applications require real-time
MCP1701A. 2 µa Low-Dropout Positive Voltage Regulator. Features. General Description. Applications. Package Types
2 µa Low-Dropout Positive Voltage Regulator Features 2.0 µa Typical Quiescent Current Input Operating Voltage Range up to 10.0V Low-Dropout Voltage (LDO): - 120 mv (typical) @ 100 ma - 380 mv (typical)
TCM809/TCM810. 3-Pin Microcontroller Reset Monitors. General Description. Features. Applications. Pin Configurations. Typical Application Circuit
3-Pin Microcontroller Reset Monitors Features Precision Monitor for 2.5V, 3.V, 3.3V, 5.V Nominal System Voltage Supplies 14 msec Minimum RESET Time-Out Period RESET Output to = 1.V (TCM89) Low Supply Current,
Integrated Development Environment
Development Tools Integrated Development Environment Transforming Ideas Into Realities The typical product development life cycle is comprised of smaller cycles each representing an iterative process toward
TCP/IP Networking: Web-Based Status Monitoring
TCP/IP Networking: Web-Based Status Monitoring Microchip TCP/IP Stack HTTP2 Module 2007 Microchip Technology Incorporated. All Rights Reserved. Web-Based Status Monitoring Slide 1 Welcome to the first
Peripheral Brief: Programmable Switch Mode Controller (PSMC) 1, 2, 4, 8 PSMCXTMR CLR PSMCXPR = Period. Event PSMCXPRS. Rising.
Peripheral Brief: Programmable Switch Mode Controller (PSMC) Author: INTRODUCTION John Mouton Microchip Technology Inc. This peripheral brief reviews the basic functionality of the Programmable Switch
MCP2515 CAN Bus Monitor Demo Board User s Guide
MCP2515 CAN Bus Monitor Demo Board User s Guide 2008 Microchip Technology Inc. DS51757A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
AN1426. Design Tips for the MCP3911 INTRODUCTION. Addressable Devices on Single SPI Bus. Addressable SPI for Poly-phase Meter Designs.
Design Tips for the MCP3911 AN1426 Author: Craig King Microchip Technology Inc. Here, pushing the limits of the analog-to-digital conversion will be the focus, showing the true performance limits of the
AN1307 FULL STEP MODE PHASE VOLTAGE AND PHASE CURRENT MICROSTEPPING WITH 1/4 STEP SIZE
Stepper Motor Control with dspic DSCs AN1307 Author: INTRODUCTION Sorin Manea Microchip Technology Inc. This application note describes how to drive a stepper motor with a dspic33f motor control family
AN956. Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software OVERVIEW INTRODUCTION. Microchip Technology Inc.
Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software Author: INTRODUCTION Rawin Rojvanit Microchip Technology Inc. The RS-232 serial interface is no longer a common port found
MCP3021. Low Power 10-Bit A/D Converter With I 2 C Interface. Description. Features. Applications. Functional Block Diagram.
MCP321 Low Power 1-Bit A/D Converter With I 2 C Interface Features 1-bit resolution ±1 LSB DNL, ±1 LSB INL max. 25 µa max conversion current 5 na typical standby current, 1 µa max. I 2 C compatible serial
PIC10F200/202/204/206
Memory Programming Specification This document includes the programming specifications for the following devices: PIC10F200 PIC10F202 PIC10F204 PIC10F206 1.0 PROGRAMMING THE PIC10F200/202/204/206 The PIC10F200/202/204/206
AN1370. Smart Card Communication Using PIC MCUs INTRODUCTION SMART CARD COMMUNICATION USING PC APPLICATION
Smart Card Communication Using PIC MCUs Author: INTRODUCTION Abhay Deshmukh Microchip Technology Inc. This application note describes the fundamentals of the contact type smart cards and how they are communicated
LIN Serial Analyzer User s Guide Rev2.0
LIN Serial Analyzer User s Guide Rev2.0 2008 Microchip Technology Inc. DS51675B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
AN709. System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices INTRODUCTION INSURING BUS-FREE DURING POWER-UP
M AN709 System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices Author: INTRODUCTION Rick Stoneking Developing systems that implement the I 2 C protocol for communicating with serial
AN1305. Sensorless 3-Phase Brushless Motor Control with the PIC16FXXX TYPICAL MOTOR CONNECTION OVERVIEW DRIVE AND CONTROL CIRCUITRY
Sensorless 3-Phase Brushless Motor Control with the PIC16FXXX Author: OVERVIEW Ward Brown Microchip Technology Inc. In 2002, I wrote my first application note on brushless motor control, AN857, which described
TABLE 1: BUCK REGULATOR
A Digital Constant Current Power LED Driver Author: INTRODUCTION Stephen Bowling Microchip Technology Inc. This document describes a power LED driver solution using the PIC12HV615 microcontroller (MCU).
dspic Digital Signal Controllers
dspic Digital Signal Controllers Spring 2011 dspic Digital Signal Controllers Digital Signal Controller Solutions Building on the legacy of Microchip s world-leading 8-bit PIC microcontrollers, 16-bit
How To Use Microchip.Com
PICkit 2 Programmer/Debugger User s Guide 2008 Microchip Technology Inc. DS51553E Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
PICkit 3 Programmer/Debugger User s Guide
PICkit 3 Programmer/Debugger User s Guide 2009 Microchip Technology Inc. DS51795A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
AN1095. Emulating Data EEPROM for PIC18 and PIC24 Microcontrollers and dspic Digital Signal Controllers INTRODUCTION THEORY OF OPERATION
A1095 Emulating Data EEPROM for PIC18 and PIC24 Microcontrollers and dspic Digital Signal Controllers Author: ITRODUCTIO Microchip Technology has expanded its product portfolio to include a wide variety
PDIP, MSOP, SOIC, TSSOP
2.7V Dual Channel 12-Bit A/D Converter with SPI Serial Interface Features 12-bit resolution ±1 LSB maximum DNL ±1 LSB maximum INL (MCP3202-B) ±2 LSB maximum INL (MCP3202-C) Analog inputs programmable as
MCP73811/2. Simple, Miniature Single-Cell, Fully Integrated Li-Ion / Li-Polymer Charge Management Controllers. Description. Features.
Simple, Miniature Single-Cell, Fully Integrated Li-Ion / Li-Polymer Charge Management Controllers Features Complete Linear Charge Management Controller - Integrated Pass Transistor - Integrated Current
AN1160. Sensorless BLDC Control with Back-EMF Filtering Using a Majority Function SENSORED CONTROL VERSUS SENSORLESS CONTROL INTRODUCTION
Sensorless BLDC Control with Back-EMF Filtering Using a Majority Function Author: INTRODUCTION Adrian Lita and Mihai Cheles Microchip Technology Inc. This application note describes a sensorless Brushless
2K SPI Bus Serial EEPROMs with EUI-48 or EUI-64 Node Identity
2K SPI Bus Serial EEPROMs with EUI-48 or EUI-64 Node Identity Device Selection Table Part Number VCC Range Page Size Temp. Ranges Packages Node Address 25AA02E48 1.8-5.5V 16 Bytes I SN, OT EUI-48 25AA02E64
AN232. Low-Frequency Magnetic Transmitter Design ABOUT THIS APPLICATION NOTE INTRODUCTION LFMC LINK COMPONENTS
Low-Frequency Magnetic Transmitter Design AN232 Author: INTRODUCTION Ruan Lourens Microchip Technology Inc. Low-frequency magnetic communications (LFMC) is a viable wireless communications alternative
AN1767. Solutions for Radio Frequency Electromagnetic Interference in Amplifier Circuits WHAT IS ELECTROMAGNETIC INTERFERENCE (EMI)
Solutions for Radio Frequency Electromagnetic Interference in Amplifier Circuits Author: Dragos-George Ducu Microchip Technology Inc. WHAT IS ELECTROMAGNETIC INTERFERENCE (EMI) Nowadays, the number of
etpu Host Interface by:
Freescale Semiconductor Application Note AN2821 Rev. 2, 08/2007 etpu Host Interface by: David Paterson Ming Li MCD Applications 1 Introduction This application note discusses the enhanced Time Processing
PowerQUICC II Pro (MPC83xx) PCI Agent Initialization
Freescale Semiconductor Application Note Document Number: AN3373 Rev. 0, 04/2007 PowerQUICC II Pro (MPC83xx) PCI Agent Initialization by: David Smith Field Application Engineering Raleigh, NC In many designs,
AN1140. USB Embedded Host Stack INTRODUCTION USB OVERVIEW. Host vs. Embedded Host. USB Hosts and Peripheral Devices
USB Embedded Host Stack AN1140 Author: INTRODUCTION USB has become the standard method for devices to communicate with a PC. From general purpose devices, such as Flash drives and mice, to special purpose
MCP14A0151/2. 1.5A MOSFET Driver with Low Threshold Input And Enable. Features. General Description. Applications. Package Types
1.5A MOSFET Driver with Low Threshold Input And Enable Features High Peak Output Current: 1.5A (typical) Wide Input Supply Voltage Operating Range: - 4.5V to 18V Low Shoot-Through/Cross-Conduction Current
PICkit 2 Microcontroller Programmer USER S GUIDE
PICkit 2 Microcontroller Programmer USER S GUIDE 2007 Microchip Technology Inc. DS51553D Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
ZENA Wireless Network Analyzer User s Guide
ZENA Wireless Network Analyzer User s Guide 2008 Microchip Technology Inc. DS51606C Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
Production Flash Programming Best Practices for Kinetis K- and L-series MCUs
Freescale Semiconductor Document Number:AN4835 Application Note Rev 1, 05/2014 Production Flash Programming Best Practices for Kinetis K- and L-series MCUs by: Melissa Hunter 1 Introduction This application
Processor Extension Pak (PEP) and Debug Header Specification
Processor Extension Pak (PEP) and Debug Header Specification 2006-2015 Microchip Technology Inc. DS50001292W Note the following details of the code protection feature on Microchip devices: Microchip products
AN1521. Practical Guide to Implementing Solar Panel MPPT Algorithms SOLAR PANEL MPPT INTRODUCTION
AN5 Practical Guide to Implementing Solar Panel MPPT Algorithms Authors: INTRODUCTION Mihnea Rosu-Hamzescu Sergiu Oprea Microchip Technology Inc. Using a solar panel or an array of panels without a controller
16-bit Microcontrollers. High-Performance PIC24 Microcontroller Family. www.microchip.com/16bit
16-bit Microcontrollers High-Performance PIC24 Microcontroller Family www.microchip.com/16bit The top challenges facing today s embedded system designer are attaining product specifi cation and performance
Analog-to-Digital Converters
Analog-to-Digital Converters In this presentation we will look at the Analog-to-Digital Converter Peripherals with Microchip s midrange PICmicro Microcontrollers series. 1 Analog-to-Digital Converters
HI-TECH C for PIC10/12/16 User s Guide
HI-TECH C for PIC10/12/16 User s Guide DS51865A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip
MCRF202. 125 khz Passive RFID Device with Sensor Input. Not recommended for new designs. Package Type. Features. Description. Applications PDIP/SOIC
Not recommended for new designs. MCRF202 125 khz Passive RFID Device with Sensor Input Features External Sensor input Data polarity changes with Sensor input condition Read-only data transmission 96 or
8-bit Microcontroller. Application Note. AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory
AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory Features Fast Storage of Parameters High Endurance Flash Storage 350K Write Cycles Power Efficient Parameter Storage Arbitrary Size
AN562. Using Endurance Predictive Software. Using the Microchip Endurance Predictive Software INTRODUCTION TOTAL ENDURANCE PREDICTIVE SOFTWARE
AN562 Using the Microchip Endurance Predictive Software INTRODUCTION Endurance, as it applies to non-volatile memory, refers to the number of times an individual memory cell can be erased and/or written
Introduction to the dspic DSC SMPS (Part 1)
Introduction to the dspic DSC SMPS (Part 1) 2008 Microchip Technology Incorporated. All Rights Reserved. Introduction to dspic DSC SMPS Slide 1 Welcome to part 1 of the Introduction to the dspic DSC SMPS
1.5A Dual MOSFET Driver with Low Threshold Input And Enable MCP14A0155 8 7 OUT A OUT A OUT A IN A GND IN B
1.5A Dual MOSFET Driver with Low Threshold Input And Enable Features High Peak Output Current: 1.5A (typical) Wide Input Supply Voltage Operating Range: - 4.5V to 18V Low Shoot-Through/Cross-Conduction
Real-Time Data Monitor User s Guide
Real-Time Data Monitor User s Guide 2008 Microchip Technology Inc. DS70567A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained
PICkit 3 Programmer/Debugger User s Guide
PICkit 3 Programmer/Debugger User s Guide DS51795B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
TC4423A/TC4424A/TC4425A
3A Dual High-Speed Power MOSFET Drivers Features High Peak Output Current: 4.5A (typical) Wide Input Supply Voltage Operating Range: - 4.5V to 18V High Capacitive Load Drive Capability: - 18 pf in 12 ns
Bootloader for dspic30f/33f and PIC24F/24H Devices
Bootloader for dspic30f/33f and PIC24F/24H Devices Author: Leonard Elevich and Veena Kudva Microchip Technology, Inc INTRODUCTION The bootloader for dspic30f/33f and PIC24H/24F devices is used to load
Dual Partition Flash Program Memory
Dual Partition Flash Program Memory HIGHLIGHTS This section of the manual contains the following major topics: 1.0 Introduction... 2 2.0 Program Memory Architecture... 2 3.0 Program Memory Partition Flash
