PIC16F526-E/P Microchip Technology, PIC16F526-E/P Datasheet - Page 18
![IC PIC MCU FLASH 1KX12 14DIP](/photos/6/59/65935/150-14-dip_sml.jpg)
PIC16F526-E/P
Manufacturer Part Number
PIC16F526-E/P
Description
IC PIC MCU FLASH 1KX12 14DIP
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Specifications of PIC16F526-E/P
Core Size
8-Bit
Program Memory Size
1.5KB (1K x 12)
Core Processor
PIC
Speed
20MHz
Peripherals
POR, WDT
Number Of I /o
11
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 ~ 125°C
Package / Case
14-DIP (0.300", 7.62mm)
Controller Family/series
PIC16F
No. Of I/o's
12
Ram Memory Size
67Byte
Cpu Speed
20MHz
No. Of Timers
1
Digital Ic Case Style
DIP
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
67 B
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
12
Number Of Timers
1
Maximum Operating Temperature
+ 125 C
Mounting Style
Through Hole
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, ICE2000
Minimum Operating Temperature
- 40 C
On-chip Adc
8 bit, 3 Channel
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
AC162096 - HEADER MPLAB ICD2 PIC16F526 8/14
Eeprom Size
-
Connectivity
-
Lead Free Status / Rohs Status
Details
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