12F508 Microchip Technology, 12F508 Datasheet

no-image

12F508

Manufacturer Part Number
12F508
Description
Search -----> PIC12F508
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
12F508I/SN
Manufacturer:
SILICON
Quantity:
2 400
PIC12F508/509/16F505
Data Sheet
8/14-Pin, 8-Bit Flash Microcontrollers
*8-bit, 8-pin Devices Protected by Microchip’s Low Pin Count Patent: U.S. Patent No. 5,847,450. Additional U.S. and
foreign patents and applications may be issued or pending.
Preliminary
© 2005 Microchip Technology Inc.
DS41236B
www.DataSheet.in

Related parts for 12F508

12F508 Summary of contents

Page 1

... Devices Protected by Microchip’s Low Pin Count Patent: U.S. Patent No. 5,847,450. Additional U.S. and foreign patents and applications may be issued or pending. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 8/14-Pin, 8-Bit Flash Microcontrollers Preliminary Data Sheet DS41236B ...

Page 2

... PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance and WiperLock 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. © 2005, Microchip Technology Incorporated, Printed in the U ...

Page 3

... Standby Current: • Low-power, high-speed Flash technology: • Fully static design • Wide operating voltage range: 2.0V to 5.5V • Wide temperature range: Peripheral Features (PIC12F508/509): • 6 I/O pins: • 8-bit real-time clock/counter (TMR0) with 8-bit Peripheral Features (PIC16F505): • 12 I/O pins: • 8-bit real-time clock/counter (TMR0) with 8-bit ...

Page 4

... PIC12F508/509/16F505 Pin Diagrams PDIP, SOIC, TSSOP V DD RB5/OSC1/CLKIN RB4/OSC2/CLKOUT RB3/MCLR/V PP RC5/T0CKI RC4 RC3 Device PIC12F508 PIC12F509 PIC16F505 DS41236B-page 2 www.DataSheet.in PDIP, SOIC, MSOP RB0/ICSPDAT 2 13 GP5/OSC1/CLKIN 3 RB1/ICSPCLK RB2 GP3/MCLR RC0 6 9 RC1 8 7 RC2 Program Memory Data Memory ...

Page 5

... Table of Contents 1.0 General Description...................................................................................................................................................................... 5 2.0 PIC12F508/509/16F505 Device Varieties ................................................................................................................................... 7 3.0 Architectural Overview ................................................................................................................................................................. 9 4.0 Memory Organization ................................................................................................................................................................. 15 5.0 I/O Port ....................................................................................................................................................................................... 29 6.0 Timer0 Module and TMR0 Register ........................................................................................................................................... 33 7.0 Special Features Of The CPU.................................................................................................................................................... 39 8.0 Instruction Set Summary ............................................................................................................................................................ 55 9.0 Development Support................................................................................................................................................................. 63 10.0 Electrical Characteristics ............................................................................................................................................................ 67 11.0 DC and AC Characteristics Graphs and Charts ......................................................................................................................... 79 12.0 Packaging Information................................................................................................................................................................ 81 Index .................................................................................................................................................................................................... 91 The Microchip Web Site ....................................................................................................................................................................... 93 Customer Change Notification Service ...

Page 6

... PIC12F508/509/16F505 NOTES: DS41236B-page 4 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 7

... In-Circuit Serial Programming Number of Instructions Packages The PIC12F508/509/16F505 devices have Power-on Reset, selectable Watchdog Timer, selectable code-protect, high I/O current capability and precision internal oscillator. The PIC12F508/509/16F505 device uses serial programming with data pin RB0/GP0 and clock pin RB1/GP1. © 2005 Microchip Technology Inc. ...

Page 8

... PIC12F508/509/16F505 NOTES: DS41236B-page 6 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 9

... A variety of packaging options are available. Depend- ing on application and production requirements, the proper device option can be selected using the information in this section. When placing orders, please use the PIC12F508/509/16F505 Product Identification System at the back of this data sheet to specify the correct part number. 2.1 ...

Page 10

... PIC12F508/509/16F505 NOTES: DS41236B-page 8 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 11

... The PIC12F508/509/16F505 devices can directly or indirectly address its register files and data memory. All Special Function Registers (SFR), including the PC, are mapped in the data memory. The PIC12F508/509/ 16F505 devices have a highly orthogonal (symmetri- cal) instruction set that makes it possible to carry out any operation, on any register, using any addressing mode. This symmetrical nature and lack of “ ...

Page 12

... PIC12F508/509/16F505 FIGURE 3-1: PIC12F508/509 BLOCK DIAGRAM Flash 512 1024 x 12 Program Memory Program 12 Bus Instruction Reg Instruction Decode & Control Timing OSC1/CLKIN Generation OSC2 Internal RC OSC DS41236B-page 10 www.DataSheet. Data Bus Program Counter RAM Stack 1 Stack 2 File Registers RAM Addr ...

Page 13

... TABLE 3-2: PIC12F508/509 PINOUT DESCRIPTION Name GP0/ICSPDAT GP1\ICSPCLK GP2/T0CKI GP3/MCLR/V PP GP4/OSC2 GP5/OSC1/CLKIN Legend Input Output, I/O = Input/Output Power, — = Not used, TTL = TTL input Schmitt Trigger input © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 Input Output Function Type Type GP0 TTL CMOS Bidirectional I/O pin ...

Page 14

... PIC12F508/509/16F505 FIGURE 3-2: PIC16F505 BLOCK DIAGRAM Flash Program Memory Program 12 Bus Instruction Reg Instruction Decode & Control Timing OSC1/CLKIN Generation OSC2/CLKOUT DS41236B-page 12 www.DataSheet. Data Bus Program Counter RAM Stack 1 File Stack 2 Registers RAM Addr 9 Addr MUX Indirect 5 Direct Addr 5-7 Addr ...

Page 15

... RC5/T0CKI Legend Input Output, I/O = Input/Output Power, — = Not used, TTL = TTL input Schmitt Trigger input © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 Input Output Function Type Type RB0 TTL CMOS Bidirectional I/O pin. Can be software programmed for internal weak pull-up and wake-up from Sleep on pin change. ...

Page 16

... PIC12F508/509/16F505 3.1 Clocking Scheme/Instruction Cycle The clock input (OSC1/CLKIN pin) is internally divided by four to generate four non-overlapping quadrature clocks, namely Q1, Q2, Q3 and Q4. Internally, the PC is incremented every Q1 and the instruction is fetched from program memory and latched into the instruction register in Q4 decoded and executed during the following Q1 through Q4 ...

Page 17

... PIC12F509 are Figure 4-1). Accessing a location above these boundaries will cause a wraparound within the first 512 x 12 space (PIC12F508 space (PIC12F509). The effective Reset vector is a 0000h (see Figure 4-1). Location 01FFh (PIC12F508) and location 03FFh (PIC12F509) contain the internal clock oscillator calibration value. This value should never be overwritten. © ...

Page 18

... The General Purpose Registers are used for data and control information under command of the instructions. For the PIC12F508/509, the register file is composed of 7 Special Function Registers, 9 General Purpose Registers and General Purpose Registers accessed by banking (see Figure 4-3 and Figure 4-4). ...

Page 19

... Data Addressing: INDF and FSR Registers”. FIGURE 4-5: FSR<6:5> File Address Note 1: Not a physical register. See Section 4.9 “Indirect Data Addressing: INDF and FSR Registers”. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 PIC12F508 REGISTER FILE MAP (1) INDF TMR0 PCL STATUS FSR OSCCAL ...

Page 20

... Reset Reset was due to wake-up on pin change, then bit All other Resets will cause bit PIC12F509 only. 5: This bit is used on the PIC12F509. For code compatibility do not use this bit on the PIC12F508. DS41236B-page 18 www.DataSheet.in Bit 7 Bit 6 Bit 5 Bit 4 ...

Page 21

... If Reset was due to wake-up on pin change, then bit All other Resets will cause bit Other (non Power-up) Resets include external reset through MCLR, Watchdog Timer and wake-up on pin change Reset. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 ...

Page 22

... Furthermore, the TO and PD bits are not writable. Therefore, the result of an instruction with the STATUS register as destination may be different than intended. REGISTER 4-1: STATUS REGISTER (ADDRESS: 03h) (PIC12F508/509) bit 7 bit 7 GPWUF: GPIO Reset bit 1 = Reset due to wake-up from Sleep on pin change ...

Page 23

... REGISTER 4-2: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 STATUS REGISTER (ADDRESS: 03h) (PIC16F505) R/W-0 R/W-0 R/W-0 R-1 RBWUF — PA0 TO bit 7 RBWUF: PORTB Reset bit 1 = Reset due to wake-up from Sleep on pin change 0 = After power-up or other Reset Reserved: Do not use ...

Page 24

... Timer0/WDT prescaler and Timer0. By executing the OPTION instruction, the contents of the W register will be transferred to the OPTION regis- ter. A Reset sets the OPTION<7:0> bits. REGISTER 4-3: OPTION REGISTER (PIC12F508/509) bit 7 GPWU: Enable Wake-up on Pin Change bit (GP0, GP1, GP3 Disabled 0 = Enabled bit 6 ...

Page 25

... REGISTER 4-4: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2-0 © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 OPTION REGISTER (PIC16F505) W-1 W-1 W-1 W-1 RBWU RBPU T0CS T0SE bit 7 RBWU: Enable Wake-up on Pin Change bit (RB0, RB1, RB3, RB4 Disabled 0 = Enabled RBPU: Enable Weak Pull-ups bit (RB0, RB1, RB3, RB4) ...

Page 26

... PIC12F508/509/16F505 4.6 OSCCAL Register The Oscillator Calibration (OSCCAL) register is used to calibrate the internal precision 4 MHz oscillator. It contains seven bits for calibration Note: Erasing the device will also erase the pre- programmed internal calibration value for the internal oscillator. The calibration value must be read prior to erasing the part so it can be reprogrammed correctly later ...

Page 27

... Stack The PIC12F508/509/16F505 devices have a 2-deep, 12-bit wide hardware PUSH/POP stack. A CALL instruction will PUSH the current value of Stack 1 into Stack 2 and then PUSH the current PC value, incre- mented by one, into Stack Level 1 ...

Page 28

... INDF register to indirectly address the data memory area. The FSR<4:0> bits are used to select data memory addresses 00h to 1Fh. PIC12F508 – Does not use banking. FSR <7:5> are unimplemented and read as ‘1’s. PIC12F509 – Uses FSR<5>. Selects between bank 0 and bank 1. FSR<7:6> is unimplemented, read as ‘1’. ...

Page 29

... FIGURE 4-8: Direct Addressing (FSR Bank Select Note 1: For register map detail, see Section 4.3 “Data Memory Organization”. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 DIRECT/INDIRECT ADDRESSING (PIC16F505) 4 (opcode) 0 Location Select 00 01 00h Data 0Fh (1) Memory 10h 1Fh 3Fh 5Fh Bank 0 ...

Page 30

... PIC12F508/509/16F505 NOTES: DS41236B-page 28 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 31

... Input/Output modes. On Reset, all I/O ports are defined as input (inputs are at high-impedance) since the I/O control registers are all set. Note: On the PIC12F508/509, I/O PORTB is ref- erenced as GPIO. On the PIC16F505, I/O PORTB is referenced as PORTB. 5.1 PORTB/GPIO PORTB/GPIO is an 8-bit I/O register. Only the low- order 6 bits are used (RB/GP< ...

Page 32

... Legend: Shaded cells are not used by Port registers, read as ‘0’. – = unimplemented, read as ‘0’ unknown unchanged depends on condition. Note 1: PIC12F508/509 only. 2: PIC16F505 only Reset was due to wake-up on pin change, then bit All other Resets will cause bit ...

Page 33

... FIGURE 5- Instruction Fetched MOVWF PORTB RB<5:0> Instruction Executed © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 SUCCESSIVE I/O OPERATION (PIC16F505 Shown MOVF PORTB, W NOP Port pin Port pin written here sampled here MOVWF PORTB ...

Page 34

... PIC12F508/509/16F505 NOTES: DS41236B-page 32 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 35

... (Program Counter) PC – 1 Instruction Fetch T0 Timer0 Instruction Executed © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 TIMER0 BLOCK DIAGRAM F /4 OSC 0 1 Programmable (2) Prescaler 3 (1) PS2, PS1, PS0 ...

Page 36

... N/A OPTION (2) N/A OPTION (1), (3) N/A TRISGPIO (2), (3) N/A TRISC Legend: Shaded cells are not used by Timer0. – = unimplemented unknown unchanged. Note 1: PIC12F508/509 only. 2: PIC16F505 only. 3: The TRIS of the T0CKI pin is overridden when T0CS = 1. DS41236B-page 34 www.DataSheet. NT0 Write TMR0 Read TMR0 ...

Page 37

... Timer0 input = ± External clock if no prescaler selected; prescaler output otherwise. 3: The arrows indicate the points in time where sampling occurs. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 ) synchroniza- OSC TIMER0 TIMING WITH EXTERNAL CLOCK ...

Page 38

... PIC12F508/509/16F505 6.2 Prescaler An 8-bit counter is available as a prescaler for the Timer0 module postscaler for the Watchdog Timer (WDT), respectively (see Section 7.6 “Watch- dog Timer (WDT)”). For simplicity, this counter is being referred to as “prescaler” throughout this data sheet. Note: The prescaler may be used by either the Timer0 module or the WDT, but not both ...

Page 39

... T0SE Watchdog Timer WDT Enable bit Note 1: T0CS, T0SE, PSA, PS<2:0> are bits in the OPTION register. 2: T0CKI is shared with pin RC5 on the PIC16F505 and pin GP2 on the PIC12F508/509. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 BLOCK DIAGRAM OF THE TIMER0/WDT PRESCALER /4) OSC ...

Page 40

... PIC12F508/509/16F505 NOTES: DS41236B-page 38 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 41

... WDT disabled bit 1-0 FOSC<1:0>: Oscillator Selection bits 11 = EXTRC = external selection bits 10 = INTRC = internal RC oscillator oscillator oscillator Note 1: Refer to the “PIC12F508/509 Memory Programming Specifications” (DS41227) to determine how to access Legend Readable bit -n = Value at POR © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 ...

Page 42

... PIC12F508/509/16F505 REGISTER 7-2: CONFIGURATION WORD FOR PIC16F505 — — — bit 11 bit 11-6 Unimplemented: Read as ‘0’ bit 5 MCLRE: RB3/MCLR Pin Function Select bit 1 = RB3/MCLR pin function is MCLR 0 = RB3/MCLR pin function is digital I/O, MCLR internally tied to V bit 4 CP: Code Protection bit 1 = Code protection off ...

Page 43

... In HS (PIC16F505 modes, a crystal or ceramic resonator is connected to the (GP5/RB5)/ OSC1/(CLKIN) and (GP4/RB4)/OSC2/(CLKOUT) pins to establish oscillation (Figure 7-1). The PIC12F508/ 509/16F505 oscillator designs require the use of a parallel cut crystal. Use of a series cut crystal may give a frequency out of the crystal manufacturers specifications ...

Page 44

... C EXT variation due to tolerance of external R and C components used. Figure 7-5 shows how the R/C combination is con- nected to the PIC12F508/509/16F505 devices. For R EXT become unstable, or stop completely. For very high R EXT sensitive to noise, humidity and leakage. Thus, we recommend keeping R 100 k ...

Page 45

... The calibration value must be read prior to erasing the part so it can be reprogrammed correctly later. For the PIC12F508/509/16F505 devices, only bits <7:1> of OSCCAL are implemented. Bits CAL6-CAL0 are used for calibration. Adjusting CAL6-CAL0 from ‘0000000’ to ‘1111111’ changes the clock speed. See Register 4-5 for more information ...

Page 46

... DS41236B-page 44 www.DataSheet.in 7.3.1 For applications where a clock is already available elsewhere, users may directly drive the PIC12F508/ 509/16F505 devices provided that this external clock source meets the AC/DC timing requirements listed in Section 7.6 “Watchdog Timer (WDT)”. Figure 7-6 below shows how an external clock circuit should be configured ...

Page 47

... MCLR Reset during Sleep WDT Reset during Sleep WDT Reset normal operation Wake-up from Sleep on pin change Legend unchanged unknown, – = unimplemented bit, read as ‘0’. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 Address Power-on Reset (1) — qqqq qqqu 00h xxxx xxxx ...

Page 48

... FIGURE 7-7: MCLR SELECT GPWU/RBWU MCLRE 7.4 Power-on Reset (POR) The PIC12F508/509/16F505 devices incorporate an on-chip Power-on Reset (POR) circuitry, which provides an internal chip Reset for most power-up situations. The on-chip POR circuit holds the chip in Reset until V has reached a high enough level for proper oper- DD ation ...

Page 49

... FIGURE 7-10 MCLR Internal POR DRT Time-out Internal Reset © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 SIMPLIFIED BLOCK DIAGRAM OF ON-CHIP RESET CIRCUIT Power-up Detect POR (Power-on Reset) MCLR Reset WDT Reset Wake-up on pin Change Reset TIME-OUT SEQUENCE ON POWER-UP (MCLR PULLED LOW) ...

Page 50

... PIC12F508/509/16F505 FIGURE 7-11: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED TO V TIME V DD MCLR Internal POR DRT Time-out Internal Reset Note: When V DD value. In this example, the chip will reset properly if, and only if, V1 DS41236B-page 48 www.DataSheet.in V1 TDRT rises slowly, the T time-out expires long before V ...

Page 51

... Device Reset Timer (DRT) On the PIC12F508/509/16F505 devices, the DRT runs any time the device is powered up. DRT runs from Reset and varies based on oscillator selection and Reset type (see Table 7-6). The DRT operates on an internal RC oscillator. The processor is kept in Reset as long as the DRT is active. ...

Page 52

... Note 1: T0CS, T0SE, PSA, PS<2:0> are bits in the OPTION register. TABLE 7-7: SUMMARY OF REGISTERS ASSOCIATED WITH THE WATCHDOG TIMER Address Name (1) N/A OPTION (2) N/A OPTION Legend: Shaded boxes = Not used by Watchdog Timer. – = unimplemented, read as ‘0’ unchanged. Note 1: PIC12F508/509 only. 2: PIC16F505 only. DS41236B-page 50 www.DataSheet.in From Timer0 Clock Source (Figure 6- Time X ...

Page 53

... A brown-out is a condition where device power (V dips below its minimum value, but not to zero, and then recovers. The device should be reset in the event of a brown-out. To reset PIC12F508/509/16F505 devices when a brown-out occurs, external brown-out protection circuits may be built, as shown in Figure 7-13 and Figure 7-14. ...

Page 54

... The first 64 locations and the last location (OSCCAL) can be read, regardless of the code protection bit setting. The last memory location can be read regardless of the code protection bit setting on the PIC12F508/509/ 16F505 devices. 7.11 ID Locations Four memory locations are designated as ID locations where the user can store checksum or other code identification numbers ...

Page 55

... FIGURE 7-16: External Connector Signals + CLK Data I/O To Normal Connections © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 TYPICAL IN-CIRCUIT SERIAL PROGRAMMING CONNECTION To Normal Connections PIC16F505 PIC12F508 PIC12F509 MCLR/V PP GP1/RB1 GP0/RB0 V DD Preliminary DS41236B-page 53 ...

Page 56

... PIC12F508/509/16F505 NOTES: DS41236B-page 54 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 57

... User defined term (font is courier) italics © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 All instructions are executed within a single instruction cycle, unless a conditional test is true or the program counter is changed as a result of an instruction. In this case, the execution takes two instruction cycles. One instruction cycle consists of four oscillator periods ...

Page 58

... PIC12F508/509/16F505 TABLE 8-2: INSTRUCTION SET SUMMARY Mnemonic, Operands ADDWF f, d Add W and f ANDWF f, d AND W with f CLRF f Clear f CLRW — Clear W COMF f, d Complement f DECF f, d Decrement f DECFSZ f, d Decrement f, Skip if 0 INCF f, d Increment f INCFSZ f, d Increment f, Skip if 0 IORWF f, d Inclusive OR W with f ...

Page 59

... The contents of the W register are AND’ed with register ‘f’. If ‘d’ is ‘0’, the result is stored in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 f (dest) k ...

Page 60

... PIC12F508/509/16F505 BTFSS Bit Test f, Skip if Set Syntax: [ label ] BTFSS f,b Operands < 7 Operation: skip if (f<b> Status Affected: None Description: If bit ‘b’ in register ‘f’ is ‘1’, then the next instruction is skipped. If bit ‘b’ is ‘1’, then the next instruc- ...

Page 61

... Status Affected: None Description: GOTO is an unconditional branch. The 9-bit immediate value is loaded into PC bits <8:0>. The upper bits of PC are loaded from STATUS<6:5>. GOTO is a two- cycle instruction. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 f 31 [0,1] (dest [0,1] d; skip if result = 0 GOTO k ...

Page 62

... PIC12F508/509/16F505 IORWF Inclusive OR W with f Syntax: [ label ] Operands [0,1] Operation: (W).OR. (f) Status Affected: Z Description: Inclusive OR the W register with register ‘f’. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. MOVF ...

Page 63

... Carry flag. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 RETLW k k 255 (W); PC RLF ...

Page 64

... PIC12F508/509/16F505 TRIS Load TRIS Register Syntax: [ label ] TRIS Operands Operation: (W) Status Affected: None Description: TRIS register ‘f’ loaded with the contents of the W register XORLW Exclusive OR literal with W Syntax: [label ] Operands Operation: (W) .XOR. k Status Affected: Z Description: The contents of the W register are XOR’ ...

Page 65

... Plus Development Programmer - MPLAB PM3 Device Programmer • Low-Cost Demonstration and Development Boards and Evaluation Kits © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 9.1 MPLAB Integrated Development Environment Software The MPLAB IDE software brings an ease of software development previously unseen in the 8/16-bit micro- controller market ...

Page 66

... PIC12F508/509/16F505 9.2 MPASM Assembler The MPASM Assembler is a full-featured, universal macro assembler for all PICmicro MCUs. The MPASM Assembler generates relocatable object files for the MPLINK Object Linker, Intel files, MAP files to detail memory usage and symbol reference, absolute LST files that contain source lines and generated machine code and COFF files for debugging ...

Page 67

... The PC platform and Microsoft Windows 32-bit operating system were chosen to best make these features available in a simple, unified application. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 ® 32-bit operating system were Preliminary 9.9 MPLAB ICD 2 In-Circuit Debugger Microchip’s In-Circuit Debugger, MPLAB ICD ...

Page 68

... PIC12F508/509/16F505 9.11 PICSTART Plus Development Programmer The PICSTART Plus Development Programmer is an easy-to-use, low-cost, prototype programmer. It connects to the PC via a COM (RS-232) port. MPLAB Integrated Development Environment software makes using the programmer simple and efficient. The PICSTART Plus Development Programmer supports most PICmicro devices in DIP packages pins. ...

Page 69

... This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 (†) ............................................................................................................... 0 to +6.5V SS ..........................................................................................................0 to +13.5V SS ...

Page 70

... PIC12F508/509/16F505 FIGURE 10-1: PIC12F508/509/16F505 VOLTAGE-FREQUENCY GRAPH, -40 C 6.0 5.5 5.0 4 (Volts) 4.0 3.5 3.0 2.5 2.0 0 FIGURE 10-2: MAXIMUM OSCILLATOR FREQUENCY TABLE LP XT INTOSC XTRC DS41236B-page 68 www.DataSheet. Frequency (MHz) 200 kHz 4 MHz Frequency (MHz) Preliminary T +125 MHz © 2005 Microchip Technology Inc. ...

Page 71

... DC Characteristics: PIC12F508/509/16F505 (Industrial) DC CHARACTERISTICS Param Sym No. D001 V Supply Voltage DD D002 V RAM Data Retention Voltage DR D003 V V POR DD Power-on Reset D004 S V VDD DD Power-on Reset D010 I Supply Current DD D020 I Power-down Current PD D022 I WDT Current WDT Legend: TBD = To Be Determined. * These parameters are characterized but not tested. ...

Page 72

... PIC12F508/509/16F505 10.2 DC Characteristics: PIC12F508/509/16F505 (Extended) DC CHARACTERISTICS Param Sym No. D001 V Supply Voltage DD D002 V RAM Data Retention Voltage DR D003 V V Start Voltage to ensure POR DD Power-on Reset D004 S V Rise Rate to ensure VDD DD Power-on Reset D010 I Supply Current DD D020 I Power-down Current PD D022 I WDT Current WDT Legend: TBD = To Be Determined ...

Page 73

... Data in “Typ” column unless otherwise stated. These parameters are for design guidance only and are not tested. Note 1: In EXTRC oscillator configuration, the OSC1/CLKIN pin is a Schmitt Trigger input not recommended that the PIC12F508/509/ 16F505 be driven with external clock in RC mode. 2: The leakage current on the MCLR pin is strongly dependent on the applied voltage level ...

Page 74

... PIC12F508/509/16F505 TABLE 10-2: PULL-UP RESISTOR RANGES – PIC12F508/509/16F505 V (Volts) Temperature ( C) DD RB0/RB1/RB4 2.0 5.5 RB3 2.0 5.5 Legend: TBD = To Be determined. * These parameters are characterized but not tested. DS41236B-page 72 www.DataSheet.in Min Typ -40 TBD TBD 25 TBD TBD 85 TBD TBD 125 TBD TBD -40 TBD TBD 25 TBD TBD 85 TBD ...

Page 75

... Timing Parameter Symbology and Load Conditions – PIC12F508/509/16F505 The timing parameter symbols have been created following one of the following formats: 1. TppS2ppS 2. TppS T F Frequency Lowercase subscripts (pp) and their meanings CLKOUT cy Cycle time drt Device Reset Timer io I/O port Uppercase letters and their meanings: ...

Page 76

... PIC12F508/509/16F505 TABLE 10-3: EXTERNAL CLOCK TIMING REQUIREMENTS – PIC12F508/509/16F505 AC CHARACTERISTICS Param Sym No External CLKIN Frequency OSC Oscillator Frequency 1 T External CLKIN Period OSC Oscillator Period 2 T Instruction Cycle Time CY 3 TosL, Clock in (OSC1) Low or High TosH Time 4 TosR, Clock in (OSC1) Rise or Fall ...

Page 77

... TABLE 10-4: CALIBRATED INTERNAL RC FREQUENCIES – PIC12F508/509/16F505 AC CHARACTERISTICS Param Sym No. F10 F Internal Calibrated OSC INTOSC Frequency Legend: TBD = To Be Determined. * These parameters are characterized but not tested. † Data in the Typical (“Typ”) column unless otherwise stated. These parameters are for design guidance only and are not tested ...

Page 78

... PIC12F508/509/16F505 TABLE 10-5: TIMING REQUIREMENTS – PIC12F508/509/16F505 Standard Operating Conditions (unless otherwise specified) AC Operating Temperature CHARACTERISTICS Operating Voltage V Param Sym No OSC1 (Q1 cycle) to Port Out Valid OSC1 (Q2 cycle) to Port Input Invalid (I/O in hold time Port Input Valid to OSC1 (I/O in setup time) ...

Page 79

... TABLE 10-6: RESET, WATCHDOG TIMER AND DEVICE RESET TIMER – PIC12F508/509/16F505 AC CHARACTERISTICS Param Sym No MCLR Pulse Width (low Watchdog Timer Time-out Period WDT (no prescaler Device Reset Timer Period DRT 34 T I/O High-impedance from MCLR IOZ low * These parameters are characterized but not tested. ...

Page 80

... PIC12F508/509/16F505 FIGURE 10-7: TIMER0 CLOCK TIMINGS – PIC12F508/509/16F505 T0CKI TABLE 10-7: TIMER0 CLOCK REQUIREMENTS – PIC12F508/509/16F505 AC CHARACTERISTICS Param Sym No. 40 Tt0H T0CKI High Pulse Width 41 Tt0L T0CKI Low Pulse Width 42 Tt0P T0CKI Period * These parameters are characterized but not tested. Note 1: Data in the Typical (“Typ”) column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested ...

Page 81

... DC AND AC CHARACTERISTICS GRAPHS AND CHARTS Graphs and charts are not available at this time. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 Preliminary DS41236B-page 79 ...

Page 82

... PIC12F508/509/16F505 NOTES: DS41236B-page 80 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 83

... In the event the full Microchip part number cannot be marked on one line, it will be carried over to the next line thus limiting the number of available characters for customer specific information. Preliminary Example 12F508-I /P017 0410 Example 12F509-I /SN0410 ...

Page 84

... PIC12F508/509/16F505 12.1 Package Marking Information (Cont’d) 14-Lead PDIP (300 mil) XXXXXXXXXXXXXX XXXXXXXXXXXXXX 14-Lead SOIC (150 mil) XXXXXXXXXXX XXXXXXXXXXX YYWWNNN 14-Lead TSSOP (150 mil) XXXXXXXX YYWW NNN DS41236B-page 82 www.DataSheet.in YYWWNNN Preliminary Example PIC16F505-I/PG 0215 0410017 Example PIC16F505-E /SLG0125 0431017 Example 16F505-I 0431 017 © ...

Page 85

... Controlling Parameter § Significant Characteristic Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MS-001 Drawing No. C04-018 © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 ...

Page 86

... PIC12F508/509/16F505 8-Lead Plastic Small Outline (SN) – Narrow, 150 mil (SOIC Number of Pins Pitch Overall Height Molded Package Thickness Standoff § Overall Width Molded Package Width Overall Length Chamfer Distance Foot Length Foot Angle Lead Thickness Lead Width Mold Draft Angle Top ...

Page 87

... Mold Draft Angle Bottom *Controlling Parameter Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010" (0.254mm) per side. JEDEC Equivalent: MO-187 Drawing No. C04-111 © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 (F) L Units ...

Page 88

... PIC12F508/509/16F505 14-Lead Plastic Dual In-line (P) – 300 mil (PDIP) n Number of Pins Pitch Top to Seating Plane Molded Package Thickness Base to Seating Plane Shoulder to Shoulder Width Molded Package Width Overall Length Tip to Seating Plane Lead Thickness Upper Lead Width Lower Lead Width Overall Row Spacing ...

Page 89

... Controlling Parameter § Significant Characteristic Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MS-012 Drawing No. C04-065 © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 ...

Page 90

... PIC12F508/509/16F505 14-Lead Plastic Thin Shrink Small Outline (ST) – 4.4 mm (TSSOP Number of Pins Pitch Overall Height Molded Package Thickness Standoff § Overall Width Molded Package Width Molded Package Length Foot Length Foot Angle Lead Thickness Lead Width Mold Draft Angle Top ...

Page 91

... APPENDIX A: Revision A (April 2004) Original data sheet devices Revision B (June 2005) Update packages © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 REVISION HISTORY for PIC12F508/509/16F505 Preliminary DS41236B-page 89 ...

Page 92

... PIC12F508/509/16F505 NOTES: DS41236B-page 90 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 93

... MPLINK Object Linker/MPLIB Object Librarian .................. 64 O Option Register................................................................... 22 OSC selection..................................................................... 39 OSCCAL Register............................................................... 24 Oscillator Configurations..................................................... 41 Oscillator Types HS............................................................................... 41 LP ............................................................................... 41 RC .............................................................................. 41 XT ............................................................................... 41 P PIC12F508/509/16F505 Device Varieties ............................ 7 PICSTART Plus Development Programmer....................... 66 POR Device Reset Timer (DRT) ................................... 39, 49 PD............................................................................... 51 Power-on Reset (POR)............................................... 39 TO............................................................................... 51 PORTB ............................................................................... 29 Power-down Mode.............................................................. 52 Prescaler ............................................................................ 36 Program Counter ................................................................ cycles ...

Page 94

... PIC12F508/509/16F505 W Wake-up from Sleep ........................................................... 52 Watchdog Timer (WDT) ................................................ 39, 49 Period.......................................................................... 49 Programming Considerations ..................................... 49 WWW Address.................................................................... 93 WWW, On-Line Support........................................................ 3 Z Zero bit .................................................................................. 9 DS41236B-page 92 www.DataSheet.in Preliminary © 2005 Microchip Technology Inc. ...

Page 95

... To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions. © 2005 Microchip Technology Inc. www.DataSheet.in PIC12F508/509/16F505 CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office ...

Page 96

... Telephone: (_______) _________ - _________ Application (optional): Would you like a reply? Device: PIC12F508/509/16F505 Questions: 1. What are the best features of this document? 2. How does this document meet your hardware and software development needs you find the organization of this document easy to follow? If not, why? 4 ...

Page 97

... PIC16F505T-I/SL = Industrial temp., SOIC package (Pb-free), Tape and Reel c) PIC16F505T-I/SL = Industrial temp., SOIC package (Pb-free), Tape and Reel d) PIC12F508T-I/SN = Industrial temp., 150 mil SOIC package (Pb-free), Tape and Reel e) PIC12F508T-E/MS = Extended temp., MSOP package (Pb-free), Tape and Reel f) PIC12F509-E/P = Extended temp., PDIP ...

Page 98

... Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-352-30-52 Fax: 34-91-352-11- Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820 07/01/05 © 2005 Microchip Technology Inc. ...

Related keywords