PIC24H Microchip Technology, PIC24H Datasheet - Page 58
![no-image](/images/manufacturer_photos/0/4/439/microchip_technology_sml.jpg)
PIC24H
Manufacturer Part Number
PIC24H
Description
Flash Programming Specification
Manufacturer
Microchip Technology
Datasheet
1.PIC24H.pdf
(80 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC24HI16GP-3041/PT
Manufacturer:
MICROCHIP
Quantity:
250
Company:
Part Number:
PIC24HJ128GP202-E/MM
Manufacturer:
Microchip Technology
Quantity:
135
Company:
Part Number:
PIC24HJ128GP204-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Company:
Part Number:
PIC24HJ128GP204-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24HJ128GP204-I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Company:
Part Number:
PIC24HJ128GP204T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Company:
Part Number:
PIC24HJ128GP206-I/PT
Manufacturer:
SMSC
Quantity:
7 600
Company:
Part Number:
PIC24HJ128GP206-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24HJ128GP206-I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Company:
Part Number:
PIC24HJ128GP206A-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Company:
Part Number:
PIC24HJ128GP206A-I/MR
Manufacturer:
Microchip Technology
Quantity:
135
Company:
Part Number:
PIC24HJ128GP206A-I/PT
Manufacturer:
Microchip Technology
Quantity:
1 987
dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
TABLE 5-3:
5.4.2
The WR bit (NVMCON<15>) is used to start an erase or
write cycle. Setting the WR bit initiates the programming
cycle.
All erase and write cycles are self-timed. The WR bit
should be polled to determine if the erase or write cycle
has been completed. Starting a programming cycle is
performed as follows:
5.5
The procedure for erasing program memory (all of code
memory, data memory, executive memory and code-
protect bits) consists of setting NVMCON to 0x404F
and then executing the programming cycle. For seg-
ment erase operations, the NVMCON value should be
modified suitably, according to Table 5-2.
Figure 5-5 shows the ICSP programming process for
Bulk Erasing program memory. This process includes
the ICSP command code, which must be transmitted
(for each instruction) Least Significant bit first, using the
PGC and PGD pins (see Figure 5-2).
FIGURE 5-5:
DS70152D-page 58
0x4001
0x4000
0x4003
NVMCON
Note:
Value
BSET
Erasing Program Memory
STARTING AND STOPPING A
PROGRAMMING CYCLE
Program memory must be erased before
writing any data to program memory.
Write 0x404F to NVMCON SFR
Set the WR bit to Initiate Erase
Program 1 row (64 instruction words)
Program a code memory word.
of code memory or executive memory.
Write a Configuration register byte.
NVMCON, #WR
Delay P11 + P10 Time
NVMCON WRITE
OPERATIONS
BULK ERASE FLOW
Done
Start
Write Operation
Preliminary
If a Segment Erase operation is required, Step 3 must
be modified with the appropriate NVMCON value as
per Table 5-2.
The ability to individually erase various segments is a
critical component of the CodeGuard™ Security fea-
tures on dsPIC33F/PIC24H devices. An individual
code segment may be erased without affecting other
segments. In addition, the Configuration register corre-
sponding to the erased code segment also gets
erased. For example, the user might want to erase the
code in the General Segment without erasing a Boot
Loader located in Boot Segment.
The Secure Segment Erase command is used to erase
the Secure Segment and the FSS Configuration regis-
ter. The General Segment Erase command is used to
erase the General Segment and the FGS Configuration
register. This command is only effective if a Boot
Segment or Secure Segment has been enabled.
Before performing any segment erase operation, the
programmer must first determine if the dsPIC33F/
PIC24H device has defined a Boot Segment or Secure
Segment, and ensure that a segment does not get
overwritten by operations on any other segment. Also,
a Bulk Erase should not be performed if a Boot
Segment or Secure Segment has been defined.
The BSS bit field in the FBS configuration register can
be read to determine whether a Boot Segment has
been defined. If a Boot Segment has already been
defined (and probably already been programmed), the
user must be warned about this fact. Similarly, the SSS
bit field in the FSS configuration register can be read to
determine whether a Secure Segment has been
defined. If a Secure Segment has already been defined
(and probably already been programmed), the user
must be warned about this fact.
A Bulk Erase operation is the recommended mecha-
nism to allow a user to overwrite the Boot Segment (if
one chooses to do so).
In general, the segments and CodeGuard Security-
related configuration registers should be programmed
in the following order:
• FBS and Boot Segment
• FSS and Secure Segment
• FGS and General Segment
Note 1: The Boot Segment and FBS Configura-
2: A Secure Segment Erase operation also
tion register can only be erased using a
Bulk Erase.
erases the General Segment and FGS
Configuration register. This is true even if
Secure Segment is present on a device
but not enabled.
© 2007 Microchip Technology Inc.
www.DataSheet4U.com