PIC24FV16KA301-I/P Microchip Technology, PIC24FV16KA301-I/P Datasheet - Page 64

no-image

PIC24FV16KA301-I/P

Manufacturer Part Number
PIC24FV16KA301-I/P
Description
MCU 16KB FLASH 2KB RAM 20-PDIP
Manufacturer
Microchip Technology
Datasheet

Specifications of PIC24FV16KA301-I/P

Controller Family/series
PIC24F
Core Size
16bit
No. Of I/o's
17
Program Memory Size
16KB
Eeprom Memory Size
512Byte
Ram Memory Size
2KB
Cpu Speed
32MHz
Oscillator Type
External, Internal
Rohs Compliant
Yes
Processor Series
PIC24FV
Core
PIC
Data Bus Width
16 bit
Program Memory Type
Flash
Data Ram Size
2 KB
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
Package / Case
PDIP-20
Development Tools By Supplier
MPLAB IDE Software
Minimum Operating Temperature
- 40 C
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PIC24FV32KA304 FAMILY
EXAMPLE 5-4:
EXAMPLE 5-5:
EXAMPLE 5-6:
DS39995B-page 64
// C example using MPLAB C30
// C example using MPLAB C30
asm("DISI #5");
__builtin_write_NVM();
#define NUM_INSTRUCTION_PER_ROW 64
unsigned int offset;
unsigned int i;
unsigned int progData[2*NUM_INSTRUCTION_PER_ROW];
//Set up NVMCON for row programming
NVMCON = 0x4001;
//Set up pointer to the first memory location to be written
TBLPAG = __builtin_tblpage(&progAddr);
offset = &progAddr & 0xFFFF;
//Perform TBLWT instructions to write necessary number of latches
for(i=0; i < 2*NUM_INSTRUCTION_PER_ROW; i++)
{
int __attribute__ ((space(auto_psv))) progAddr = &progAddr;// Global variable located in Pgm Memory
}
__builtin_tblwtl(offset, progData[i++]);
__builtin_tblwth(offset, progData[i]);
offset = offset + 2;
DISI
MOV
MOV
MOV
MOV
BSET
NOP
NOP
BTSC
BRA
#5
#0x55, W0
W0, NVMKEY
#0xAA, W1
W1, NVMKEY
NVMCON, #WR
NVMCON, #15
$-2
LOADING THE WRITE BUFFERS – ‘C’ LANGUAGE CODE
INITIATING A PROGRAMMING SEQUENCE – ASSEMBLY LANGUAGE CODE
INITIATING A PROGRAMMING SEQUENCE – ‘C’ LANGUAGE CODE
// Block all interrupts for next 5 instructions
// Perform unlock sequence and set WR
; 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
;
for next 5 instructions
// Buffer of data to write
// Initialize NVMCON
// Initialize PM Page Boundary SFR
// Initialize lower word of address
// Write to address low word
// Write to upper byte
// Increment address
 2011 Microchip Technology Inc.

Related parts for PIC24FV16KA301-I/P