MA240029 Microchip Technology, MA240029 Datasheet - Page 88
![no-image](/images/manufacturer_photos/0/4/439/microchip_technology_sml.jpg)
MA240029
Manufacturer Part Number
MA240029
Description
Daughter Cards & OEM Boards PIC24FJ128GA310 Gen Purpose PIM
Manufacturer
Microchip Technology
Datasheet
1.MA240029.pdf
(406 pages)
Specifications of MA240029
Rohs
yes
Product
Daughter Cards
Core
PIC
Description/function
Plug-in module
Interface Type
I2C, SPI
Tool Is For Evaluation Of
PIC24FJ128GA310
For Use With
Explorer 16 Development Board
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
MA240029
Manufacturer:
MICROCHIP
Quantity:
12 000
- Current page: 88 of 406
- Download datasheet (3Mb)
PIC24FJ128GA310 FAMILY
6.6.2
If a Flash location has been erased, it can be pro-
grammed using table write instructions to write an
instruction word (24-bit) into the write latch. The
TBLPAG register is loaded with the 8 Most Significant
Bytes (MSBs) of the Flash address. The TBLWTL and
TBLWTH instructions write the desired data into the
EXAMPLE 6-5:
EXAMPLE 6-6:
DS39996F-page 88
; Setup a pointer to data Program Memory
; Setup NVMCON for programming one word to data Program Memory
// C example using MPLAB C30
unsigned int offset;
unsigned long progAddr = 0xXXXXXX;
unsigned int progDataL = 0xXXXX;
unsigned char progDataH = 0xXX;
//Set up NVMCON for word programming
NVMCON = 0x4003;
//Set up pointer to the first memory location to be written
TBLPAG = progAddr>>16;
offset = progAddr & 0xFFFF;
//Perform TBLWT instructions to write latches
__builtin_tblwtl(offset, progDataL);
__builtin_tblwth(offset, progDataH);
asm(“DISI #5”);
__builtin_write_NVM();
MOV
MOV
MOV
MOV
MOV
TBLWTL W2, [W0]
TBLWTH W3, [W0++]
MOV
MOV
DISI
MOV.B
MOV
MOV.B
MOV
BSET
NOP
NOP
PROGRAMMING A SINGLE WORD
OF FLASH PROGRAM MEMORY
#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
PROGRAMMING A SINGLE WORD OF FLASH PROGRAM MEMORY
PROGRAMMING A SINGLE WORD OF FLASH PROGRAM MEMORY
(‘C’ LANGUAGE CODE)
;
;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
; Required delays
// Address of word to program
// Data to program lower word
// Write to address low word
// Write to upper byte
// Data to program upper byte
// Initialize NVMCON
// Initialize PM Page Boundary SFR
// Initialize lower word of address
// Block interrupts with priority <7
// for next 5 instructions
// C30 function to perform unlock
// sequence and set WR
write latches and specify the lower 16 bits of the pro-
gram memory address to write to. To configure the
NVMCON register for a word write, set the NVMOP bits
(NVMCON<3:0>) to ‘0011’. The write is performed by
executing the unlock sequence and setting the WR bit
(see
compiler, using the MPLAB C30 compiler and built-in
hardware functions, is shown in
Example
6-5). An equivalent procedure in ‘C’
2010-2011 Microchip Technology Inc.
Example
6-6.
Related parts for MA240029
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![TC1014-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1014-5.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.8VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-4.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.85VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: