PIC24F16KA101-E/P Microchip Technology, PIC24F16KA101-E/P Datasheet - Page 51

no-image

PIC24F16KA101-E/P

Manufacturer Part Number
PIC24F16KA101-E/P
Description
16KB Flash, 1.5KB RAM, 512B EEPROM, 16 MIPS, 18 I/O,16-bit PIC24F Family, NanoWa
Manufacturer
Microchip Technology
Series
PIC® XLP™ 24Fr
Datasheet

Specifications of PIC24F16KA101-E/P

Core Processor
PIC
Core Size
16-Bit
Speed
32MHz
Connectivity
I²C, IrDA, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
18
Program Memory Size
16KB (5.5K x 24)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
1.5K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 9x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
20-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
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 PIC24F16KA101-E/P