PIC12F508/509/16F505
Data Sheet
8/14-Pin, 8-Bit Flash Microcontrollers
©
2009 Microchip Technology Inc.
DS41236E
Note the following details of the code protection feature on Microchip devices:
•
•
Microchip products meet the specification contained in their particular Microchip Data Sheet.
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.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
EE
L
OQ
, K
EE
L
OQ
logo, MPLAB, PIC, PICmicro, PICSTART,
rfPIC and UNI/O are registered trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Octopus, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, PIC
32
logo, REAL ICE, rfLAB, Select Mode, Total
Endurance, TSHARC, UniWinDriver, WiperLock and ZENA
are trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
© 2009, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
®
MCUs and dsPIC
®
DSCs, K
EE
L
OQ
®
code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
DS41236E-page 2
©
2009 Microchip Technology Inc.
PIC12F508/509/16F505
8/14-Pin, 8-Bit Flash Microcontrollers
Devices Included In This Data Sheet:
• PIC12F508
• PIC12F509
• PIC16F505
Low-Power Features/CMOS Technology:
• Operating Current:
- < 175
μA
@ 2V, 4 MHz, typical
• Standby Current:
- 100 nA @ 2V, typical
• Low-Power, High-Speed Flash Technology:
- 100,000 Flash endurance
- > 40 year retention
• Fully Static Design
• Wide Operating Voltage Range: 2.0V to 5.5V
• Wide Temperature Range:
- Industrial: -40°C to +85°C
- Extended: -40°C to +125°C
High-Performance RISC CPU:
• Only 33 Single-Word Instructions to Learn
• All Single-Cycle Instructions Except for Program
Branches, which are Two-Cycle
• 12-Bit Wide Instructions
• 2-Level Deep Hardware Stack
• Direct, Indirect and Relative Addressing modes
for Data and Instructions
• 8-Bit Wide Data Path
• 8 Special Function Hardware Registers
• Operating Speed:
- DC – 20 MHz clock input (PIC16F505 only)
- DC – 200 ns instruction cycle (PIC16F505
only)
- DC – 4 MHz clock input
- DC – 1000 ns instruction cycle
Peripheral Features (PIC12F508/509):
• 6 I/O Pins:
- 5 I/O pins with individual direction control
- 1 input only pin
- High current sink/source for direct LED drive
- Wake-on-change
- Weak pull-ups
• 8-Bit Real-Time Clock/Counter (TMR0) with 8-Bit
Programmable Prescaler
Special Microcontroller Features:
• 4 MHz Precision Internal Oscillator:
- Factory calibrated to ±1%
• In-Circuit Serial Programming™ (ICSP™)
• In-Circuit Debugging (ICD) Support
• Power-On Reset (POR)
• Device Reset Timer (DRT)
• Watchdog Timer (WDT) with Dedicated On-Chip
RC Oscillator for Reliable Operation
• Programmable Code Protection
• Multiplexed MCLR Input Pin
• Internal Weak Pull-Ups on I/O Pins
• Power-Saving Sleep mode
• Wake-Wp from Sleep on Pin Change
• Selectable Oscillator Options:
- INTRC: 4 MHz precision Internal oscillator
- EXTRC: External low-cost RC oscillator
- XT:
Standard crystal/resonator
- HS:
High-speed crystal/resonator
(PIC16F505 only)
- LP:
Power-saving, low-frequency crystal
- EC:
High-speed external clock input
(PIC16F505 only)
Peripheral Features (PIC16F505):
• 12 I/O Pins:
- 11 I/O pins with individual direction control
- 1 input only pin
- High current sink/source for direct LED drive
- Wake-on-change
- Weak pull-ups
• 8-Bit Real-Time Clock/Counter (TMR0) with 8-Bit
Programmable Prescaler
©
2009 Microchip Technology Inc.
DS41236E-page 3
PIC12F508/509/16F505
Pin Diagrams
PDIP, SOIC, TSSOP
PDIP, SOIC, MSOP
PIC12F508/509
V
DD
RB5/OSC1/CLKIN
RB4/OSC2/CLKOUT
RB3/MCLR/V
PP
RC5/T0CKI
RC4
RC3
1
2
PIC16F505
3
4
5
6
7
14
13
12
11
10
9
8
V
SS
RB0/ICSPDAT
RB1/ICSPCLK
RB2
RC0
RC1
RC2
V
DD
GP5/OSC1/CLKIN
GP4/OSC2
GP3/MCLR/V
PP
1
2
3
4
8
7
6
5
V
SS
GP0/ICSPDAT
GP1/ICSPCLK
GP2/T0CKI
DFN
V
DD
GP5/OSC1/CLKIN
GP4/OSC2
GP3/MCLR/V
PP
1
2
3
4
PIC12F508/509
8
7
6
5
V
SS
GP0/ICSPDAT
GP1/ICSPCLK
GP2/T0CKI
PIC16F505 16-Pin Diagram (QFN)
V
DD
16
15
14
RB5/OSC1/CLKIN
RB4/OSC2/CLKOUT
RB3/MCLR/V
PP
RC5/TOCKI
13
V
SS
NC
NC
1
2
3
4
5
6
7
PIC16F505
12
11
10
9
8
RB0/ICSPDAT
RB1/ICSPCLK
RB2
RC0
RC4
RC3
RC2
RC1
DS41236E-page 4
©
2009 Microchip Technology Inc.
PIC12F508/509/16F505
Program Memory
Device
Flash (words)
PIC12F508
PIC12F509
PIC16F505
512
1024
1024
SRAM (bytes)
25
41
72
6
6
12
Data Memory
I/O
Timers
8-bit
1
1
1
©
2009 Microchip Technology Inc.
DS41236E-page 5