MA240017 Microchip Technology, MA240017 Datasheet - Page 51

MODULE PLUG-IN PIC24F16KA102 PIM

MA240017

Manufacturer Part Number
MA240017
Description
MODULE PLUG-IN PIC24F16KA102 PIM
Manufacturer
Microchip Technology
Series
PIC®r
Datasheets

Specifications of MA240017

Accessory Type
Plug-In Module (PIM) - PIC24F16KA102
Product
Microcontroller Modules
Data Bus Width
16 bit
Core Processor
PIC24F16KA102
Operating Supply Voltage
3 V to 3.6 V
Development Tools By Supplier
Integrated Development Environment, Assembler, ANSI C Compiler
Processor Series
PIC24F
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC24
Silicon Core Number
PIC24F
Silicon Family Name
PIC24FxxKAxx
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Explorer 16 (DM240001 or DM240002)
For Use With
DM240001 - BOARD DEMO PIC24/DSPIC33/PIC32
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MA240017
Manufacturer:
MICROCHIP
Quantity:
12 000
EXAMPLE 5-5:
EXAMPLE 5-6:
EXAMPLE 5-7:
© 2009 Microchip Technology Inc.
// C example using MPLAB C30
asm("DISI #5");
__builtin_write_NVM();
; Setup a pointer to data Program Memory
MOV
MOV
MOV
MOV
MOV
TBLWTL W2, [W0]
TBLWTH W3, [W0++]
; Setup NVMCON for programming one word to data Program Memory
MOV
MOV
DISI
MOV
MOV
MOV
MOV
BSET
DISI
MOV
MOV
MOV
MOV
BSET
NOP
NOP
BTSC
BRA
#tblpage(PROG_ADDR), W0
W0, TBLPAG
#tbloffset(PROG_ADDR), W0
#LOW_WORD_N, W2
#HIGH_BYTE_N, W3
#0x4003, W0
W0, NVMCON
#5
#0x55, W0
W0, NVMKEY
#0xAA, W0
W0, NVMKEY
NVMCON, #WR
#5
#0x55, W0
W0, NVMKEY
#0xAA, W1
W1, NVMKEY
NVMCON, #WR
NVMCON, #15
$-2
INITIATING A PROGRAMMING SEQUENCE – ASSEMBLY LANGUAGE CODE
INITIATING A PROGRAMMING SEQUENCE – ‘C’ LANGUAGE CODE
PROGRAMMING A SINGLE WORD OF FLASH PROGRAM MEMORY
// Block all interrupts for next 5 instructions
// Perform unlock sequence and set WR
Preliminary
; Block all interrupts
; Write the 55 key
;
; Write the AA key
; Start the erase sequence
; 2 NOPs required after setting WR
;
; Wait for the sequence to be completed
;
;
;Initialize PM Page Boundary SFR
;Initialize a register with program memory address
;
;
; Write PM low word into program latch
; Write PM high byte into program latch
;
; Set NVMOP bits to 0011
; Disable interrupts while the KEY sequence is written
; Write the key sequence
; Start the write cycle
PIC24F16KA102 FAMILY
for next 5 instructions
DS39927B-page 49

Related parts for MA240017