Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC24FJ64GA Datasheet(PDF) 48 Page - Microchip Technology

Part # PIC24FJ64GA
Description  28/44-Pin General Purpose, 16-Bit Flash Microcontrollers
PDF  262 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC24FJ64GA Datasheet(HTML) 48 Page - Microchip Technology

Back Button PIC24FJ64GA Datasheet HTML 44Page - Microchip Technology PIC24FJ64GA Datasheet HTML 45Page - Microchip Technology PIC24FJ64GA Datasheet HTML 46Page - Microchip Technology PIC24FJ64GA Datasheet HTML 47Page - Microchip Technology PIC24FJ64GA Datasheet HTML 48Page - Microchip Technology PIC24FJ64GA Datasheet HTML 49Page - Microchip Technology PIC24FJ64GA Datasheet HTML 50Page - Microchip Technology PIC24FJ64GA Datasheet HTML 51Page - Microchip Technology PIC24FJ64GA Datasheet HTML 52Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 48 / 262 page
background image
PIC24FJ64GA004 FAMILY
DS39881C-page 46
Preliminary
© 2008 Microchip Technology Inc.
4.6.2
PROGRAMMING A SINGLE WORD
OF FLASH PROGRAM MEMORY
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 of the Flash address. The TBLWTL and TBLWTH
instructions write the desired data into the write latches
and specify the lower 16 bits of the program 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
Example 4-4).
EXAMPLE 4-4:
PROGRAMMING A SINGLE WORD OF FLASH PROGRAM MEMORY
; Setup a pointer to data Program Memory
MOV
#tblpage(PROG_ADDR), W0
;
MOV
W0, TBLPAG
;Initialize PM Page Boundary SFR
MOV
#tbloffset(PROG_ADDR), W0
;Initialize a register with program memory address
MOV
#LOW_WORD_N, W2
;
MOV
#HIGH_BYTE_N, W3
;
TBLWTL W2, [W0]
; Write PM low word into program latch
TBLWTH W3, [W0++]
; Write PM high byte into program latch
; Setup NVMCON for programming one word to data Program Memory
MOV
#0x4003, W0
;
MOV
W0, NVMCON
; Set NVMOP bits to 0011
DISI
#5
; Disable interrupts while the KEY sequence is written
MOV
#0x55, W0
; Write the key sequence
MOV
W0, NVMKEY
MOV
#0xAA, W0
MOV
W0, NVMKEY
BSET
NVMCON, #WR
; Start the write cycle
NOP
; 2 NOPs required after setting WR
NOP
;



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com