Beruflich Dokumente
Kultur Dokumente
PIC16F57
The PIC16F57 is programmed using a serial method. RC5
RA1 7 22 RC4
The Serial mode will allow the PIC16F57 to be
RA2 8 21 RC3
programmed while in the user’s system. This allows for
RA3 9 20 RC2
increased design flexibility. This programming
specification applies to PIC16F57 devices in all RB0 10 19 RC1
packages. RB1 11 18 RC0
RB2 12 17 RB7/ICSPDAT
RB3 13 16 RB6/ICSPCLK
1.1 Hardware Requirements
RB4 14 15 RB5
The PIC16F57 requires one power supply for VDD
(5.0V) and one for VPP (12V). SSOP
VSS •1 28 MCLR/VPP
1.2 Program/Verify Mode T0CKI 2 27 OSC1/CLKIN
VDD 3 26 OSC2/CLKOUT
VDD 4 25 RC7
The Program/Verify mode for the PIC16F57 allows RA0 5 24 RC6
programming of user program memory, special RA1 6 23 RC5
RA2 7 PIC16F57 22 RC4
locations used for ID, and the Configuration Word. RA3 8 21 RC3
RB0 9 20 RC2
RB1 10 19 RC1
RB2 11 18 RC0
RB3 12 17 RB7/ICSPDAT
RB4 13 16 RB6/ICSPCLK
VSS 14 15 RB5
User Memory
reserved. Memory (Page 1) 300h
Space
2.2 User ID Locations 3FFh
400h
A user may store identification information (ID) in four On-chip Program
4FFh
user ID locations. The user ID locations are mapped in Memory (Page 2) 500h
[0x800: 0x803]. It is recommended that the user use
5FFh
only the four Least Significant bits (LSb) of each user 600h
ID location. The user ID locations read out normally, On-chip Program
6FFh
even after code protection is enabled. It is recom- Memory (Page 3) 700h
mended that user ID locations are written as ‘xxxx
xxxx bbbb’ where ‘bbbb’ is user ID information. Reset Vector 7FFh
User ID Locations 800h-
The 12 bits may be programmed, but only the four LSbs 803h
are displayed by MPLAB® IDE. The xxxx’s are “don’t 804h
Reserved 83Fh
care” bits and are not read by MPLAB IDE.
840h
ICSPCLK
1 2 3 4 5 6 1 2 3 4 5 15 16
TDLY2
ICSPCLK
TDLY2
1 2 3 4 5 6 1 2 3 4 5 15 16
ICSPCLK
TDLY3
1 0 0 1 0 x x MSb stp_bit
ICSPDAT strt_bit
LSb
TSET1 TDLY1
THLD1
TDLY2
Next Command
1 2 3 4 5 6 1 2
ICSPCLK
0 1 1 0 x x
ICSPDAT
TSET1
THLD1
TPROG
End Programming Command
1 2 3 4 5 6 1 2
ICSPCLK
ICSPDAT 0 0 0 1 x x 0 1
TSET1 THLD1
TDIS
Next Command
1 2 3 4 5 6 1 2
ICSPCLK
ICSPDAT 0 1 1 1 x x
TSET1 THLD1
ICSPCLK
1 0 0 1 x x
ICSPDAT
TSET1
THLD1
Start
Enter Program
Mode
PC = 0xFFF
Increment
Address
Wait TPROG
Report
No
Data Correct? Programming
Failure
End
Yes
Programming
Increment No
Address All Locations
Command Done?
Exit Program
Mode
Program
Configuration
Memory
(Figure 2-11)
Done
Load Data
Enter for
Program Program Memory
Mode
PC = FFF
Increment
Address
Increment Command
Address
Command
Load Data
for
Program Memory
Bulk Erase
Device
Increment
Address
Command
Four-Word
Program Cycle
Load Data
for
Program Memory
Increment No All Locations
Address
Done?
Command
Increment
Yes Address
Command
Reset and
Re-enter
Program/Verify Load Data
for
Program Memory
Read Data
Command
Begin
Programming
Command
Data No Report (Externally timed)
Correct? Verify Error
Yes
Increment Wait TPROG
Address
Command
End
No Yes Exit Programming
Address = Program
0x800? Mode
Program
Wait TDIS
Configuration
memory
(Figure 2-11)
Done
Start
Enter Program
Mode
PC = 0xFFF
Read Data
Command
Data No Report
Correct? Programming
Failure
Yes
Increment
Address
Command
No Address =
0x800?
Yes
Load Data
Command Programs User ID’s
One-Word
Programming Read Data
Cycle Command
(see Figure 2-9)
Data No Report
Correct Programming
Failure
Yes
Increment
Address
Command
No Address =
0x804?
Yes
Done
Start
Enter
Program/Verify mode
PC = 0x3FF
(Config Word)
Wait TERA
Done
Start
Enter
Program/Verify mode
PC = 0x3FF
(Config Word)
Increment No PC = 0x200?
PC (First user ID)
Yes
Bulk Erase
Device
Wait TERA
Done
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
• Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
01/02/08