PIC16F526-I/MG Microchip Technology, PIC16F526-I/MG Datasheet - Page 18

1.5KB Flash Program, 64B Flash Data, 8MHz Internal Oscillator, 8b ADC, 2x Compar

PIC16F526-I/MG

Manufacturer Part Number
PIC16F526-I/MG
Description
1.5KB Flash Program, 64B Flash Data, 8MHz Internal Oscillator, 8b ADC, 2x Compar
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Datasheet

Specifications of PIC16F526-I/MG

Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
POR, WDT
Number Of I /o
11
Program Memory Size
1.5KB (1K x 12)
Program Memory Type
FLASH
Ram Size
67 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 3x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
16-QFN
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F526-I/MG
Manufacturer:
TI
Quantity:
12
PIC16F526
5.0
For the PIC16F526, once code protection is enabled,
all Program Memory locations 0x40-0x3FE, read all
‘0’s. Program Memory locations 0x000-0x03F and
0x3FF are always unprotected. The user ID locations,
backup OSCCAL location and the Configuration Word
read out in an unprotected fashion. It is possible to pro-
gram the user ID locations, backup OSCCAL location
and the Configuration Word after code-protect is
enabled.
The code protection of the Flash data memory is
dependant on the CPDF bit. If the CPDF bit is set, only
the Flash data memory block is code protected. See
Table 3-2 for erase conditions involving the CPDF bit.
5.1
It is recommended that the following procedure be
performed before any other programming is attempted.
It is also possible to turn code protection off using this
procedure. However, all data within the program
memory will be erased when this procedure is exe-
cuted, and thus, the security of the code is not
compromised. See Table 3-2 for more information on
Flash data memory.
To disable code-protect:
a)
b)
c)
TABLE 5-1:
DS41317B-page 18
PIC16F526
Legend:
Note 1:
Enter Program mode
Execute
command (001001).
Wait T
Device
CODE PROTECTION
Disabling Code Protection
ERA
CFGW = Configuration Word
SUM[a:b] = [Sum of locations a to b inclusive]
SUM_ID = User ID locations masked by 0xF then made into a 16-bit value with ID0 as the Most Significant nibble.
For example, ID0 = 0x1, ID1 = 0x2, ID2 = 0x3, ID3 = 0x4, then SUM_ID = 0x1234.
*Checksum = [Sum of all the individual expressions] MODULO [0xFFFF]
+ = Addition
& = Bitwise AND
Checksum shown assumes that SUM_ID contains the unprotected checksum.
Bulk
CHECKSUM COMPUTATIONS
Code-Protect
Erase
OFF
ON
Program
SUM[0x000:0x3FE] + CFGW & 0x0FF
SUM[0x00:0x3F] + CFGW & 0x0FF + SUM_ID
Memory
(1)
Checksum*
5.2
5.2.1
Checksum is calculated by reading the contents of the
PIC16F526 memory locations and adding up the
opcodes up to the maximum user addressable location.
Any Carry bits exceeding 16 bits are neglected. Finally,
the Configuration Word (appropriately masked) is
added to the checksum. The checksum computation
for the PIC16F526 is shown in Table 5-1.
The checksum is calculated by summing the following:
• The contents of all program memory locations
• The Configuration Word, appropriately masked
• Masked user ID locations (when applicable)
The Least Significant 16 bits of this sum is the
checksum.
The following table describes how to calculate the
checksum for each PIC16F526.
Note:
Note:
Checksum Computation
To allow portability of code, the program-
mer is required to read the Configuration
Word and user ID locations from the hex
file when loading the hex file. If Configura-
tion Word information was not present in
the hex file, then a simple warning
message may be issued. Similarly, while
saving a hex file, Configuration Word and
user ID information must be included. An
option to not include this information may
be provided.
Microchip Technology Incorporated feels
strongly that this feature is important for
the benefit of the end customer.
CHECKSUM
The checksum calculation differs depend-
ing on the code-protect setting. The Con-
figuration Word and user ID locations can
always be read regardless of the code-
protect settings.
© 2007 Microchip Technology Inc.
0xEDAF
0xED00
Blank
Value
0x723 at 0
and Max.
Address
0xDB48
0xD31B

Related parts for PIC16F526-I/MG