PIC16F54T-E/SS Microchip Technology, PIC16F54T-E/SS Datasheet - Page 11
![IC MCU FLASH 512X12 20SSOP](/photos/6/58/65895/150-20-ssop_sml.jpg)
PIC16F54T-E/SS
Manufacturer Part Number
PIC16F54T-E/SS
Description
IC MCU FLASH 512X12 20SSOP
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Specifications of PIC16F54T-E/SS
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
POR, WDT
Number Of I /o
12
Program Memory Size
768B (512 x 12)
Program Memory Type
FLASH
Ram Size
25 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Oscillator Type
External
Operating Temperature
-40°C ~ 125°C
Package / Case
20-SSOP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Data Converters
-
Connectivity
-
4.0
For the PIC16F54, once code protection is enabled, all
program memory locations above 0x3F read all ‘0’s.
Program memory locations 0x00-0x3F are always
unprotected. The ID locations and the Configuration
Word read out in an unprotected fashion. It is possible
to program the ID locations and the Configuration Word
after code-protect is enabled.
4.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 (CP = 1)
using this procedure. However, all data within the
program memory will be erased when this
procedure is executed, and thus, the security of the
code is not compromised.
To disable code-protect:
a)
b)
c)
4.2
TABLE 4-1:
© 2007 Microchip Technology Inc.
PIC16F54
Legend:
To allow portability of code, the programmer is
required to read the Configuration Word and ID
locations from the hex file when loading the hex file.
If Configuration Word information was not present in
the hex file, then a simple warning message may be
issued. Similarly, while saving a hex file, Configura-
tion Word and 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.
Note:
Enter Program mode
Execute
command (001001)
Wait T
Device
CODE PROTECTION
Disabling Code Protection
Embedding Configuration Word
and ID Information in the Hex File
ERA
CFGW = Configuration Word
SUM[a:b] = [Sum of locations a to b inclusive]
SUM_ID = ID locations masked by 0xF then made into a 16-bit value with ID0 as the Most Significant nibble.
*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
For example, ID0 = 0x1, ID1 = 0x2, ID2 = 0x3, ID3 = 0x4, then SUM_ID = 0x1234.
Erase
Protect
Code
OFF
ON
Program
SUM[0x000:0x1FF] + CFGW & 0x00F + 0xFF0
SUM[0x00:0x3F] + CFGW & 0x00F + 0xFF0 + SUM_ID
Memory
Preliminary
(1)
Checksum*
4.3
4.3.1
Checksum is calculated by reading the contents of
the PIC16F54 memory locations and adding up the
opcodes up to the maximum user addressable
bits exceeding 16 bits are neglected. Finally, the
Configuration Word (appropriately masked) is added
to the checksum. Checksum computation for the
PIC16F54 is shown in Table 4-1.
The checksum is calculated by summing the following:
• The contents of all program memory locations
• The Configuration Word, appropriately masked
• Masked 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 device.
location, (e.g., 0x1FF for the PIC16F54). Any carry
Note:
Checksum Computation
CHECKSUM
The checksum calculation differs depend-
ing on the code-protect setting. The
Configuration Word and ID locations can
always be read regardless of the code-
protect settings.
PIC16F54
0x0DFF
0x1DB6
Blank
Value
DS41207D-page 11
0x723 at 0
and Max
Address
0xFC47
0x0322