Electronic Components Datasheet Search
  English  ▼

X  

DC23C Datasheet(PDF) 74 Page - Microchip Technology

Part # DC23C
Description  16-Bit General Purpose Microcontrollers with 256-Kbyte Flash and 16-Kbyte RAM in Low Pin Count Packages
PDF  416 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

DC23C Datasheet(HTML) 74 Page - Microchip Technology

Back Button DC23C Datasheet HTML 70Page - Microchip Technology DC23C Datasheet HTML 71Page - Microchip Technology DC23C Datasheet HTML 72Page - Microchip Technology DC23C Datasheet HTML 73Page - Microchip Technology DC23C Datasheet HTML 74Page - Microchip Technology DC23C Datasheet HTML 75Page - Microchip Technology DC23C Datasheet HTML 76Page - Microchip Technology DC23C Datasheet HTML 77Page - Microchip Technology DC23C Datasheet HTML 78Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 74 / 416 page
background image
PIC24FJ256GA705 FAMILY
DS30010118D-page 74
 2016-2018 Microchip Technology Inc.
6.6.1
PROGRAMMING ALGORITHM FOR
FLASH PROGRAM MEMORY
The user can program one row of Flash program memory
at a time. To do this, it is necessary to erase the 8-row
erase block containing the desired row. The general
process is:
1.
Read
eight
rows
of
program
memory
(1024 instructions) and store in data RAM.
2.
Update the program data in RAM with the
desired new data.
3.
Erase the block (see Example 6-1):
a)
Set the NVMOP<3:0> bits (NVMCON<3:0>)
to ‘0011’ to configure for block erase. Set the
WREN (NVMCON<14>) bit.
b)
Write the starting address of the block to
be erased into the NVMADRU/NVMADR
registers.
c)
Write 55h to NVMKEY.
d)
Write AAh to NVMKEY.
e)
Set the WR bit (NVMCON<15>). The erase
cycle begins and the CPU stalls for the dura-
tion of the erase cycle. When the erase is
done, the WR bit is cleared automatically.
4.
Update the TBLPAG register to point to the pro-
gramming latches on the device. Update the
NVMADRU/NVMADR registers to point to the
destination in the program memory.
5.
Write the first 128 instructions from data RAM into
the program memory buffers (see Table 6-1).
6.
Write the program block to Flash memory:
a) Set the NVMOPx bits to ‘0010’ to configure
for row programming. Set the WREN bit.
b) Write 55h to NVMKEY.
c)
Write AAh to NVMKEY.
d) Set the WR bit. The programming cycle
begins and the CPU stalls for the duration
of the write cycle. When the write to Flash
memory is done, the WR bit is cleared
automatically.
7.
Repeat Steps 4 through 6, using the next
available 128 instructions from the block in data
RAM, by incrementing the value in NVMADRU/
NVMADR until all 1024 instructions are written
back to Flash memory.
For protection against accidental operations, the write
initiate sequence for NVMKEY must be used to allow
any erase or program operation to proceed. After the
programming command has been executed, the user
must wait for the programming time until programming
is complete. The two instructions following the start of
the programming sequence should be NOPs, as shown
in Example 6-2.
TABLE 6-1:
EXAMPLE PAGE ERASE
Step 1: Set the NVMCON register to erase a page.
MOV
#0x4003, W0
MOV
W0, NVMCON
Step 2: Load the address of the page to be erased into the NVMADR register pair.
MOV
#PAGE_ADDR_LO, W0
MOV
W0, NVMADR
MOV
#PAGE_ADDR_HI, W0
MOV
W0, NVMADRU
Step 3: Set the WR bit.
MOV
#0x55, W0
MOV
W0, NVMKEY
MOV
#0xAA, W0
MOV
W0, NVMKEY
BSET
NVMCON, #WR
NOP
NOP
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