PIC12C508 Microchip Technology Inc., PIC12C508 Datasheet

no-image

PIC12C508

Manufacturer Part Number
PIC12C508
Description
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC12C508-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508-04/SM
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508-04/SMA53
Manufacturer:
FUJISTU
Quantity:
29
Part Number:
PIC12C508-04I/SM
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508/P
Manufacturer:
MICROCHIP
Quantity:
1 300
Part Number:
PIC12C508/P
Manufacturer:
NSC/FAI
Quantity:
1 300
Part Number:
PIC12C508/P04
Manufacturer:
MICROCHIP
Quantity:
5 510
Part Number:
PIC12C508/P04 HAM
Manufacturer:
MICROCHIP
Quantity:
80
Part Number:
PIC12C508A
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508A-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508A-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
5
Part Number:
PIC12C508A-04/SM
Manufacturer:
MICROCHIP
Quantity:
16 156
Company:
Part Number:
PIC12C508A-04/SM
Quantity:
30 000
Part Number:
PIC12C508A-04/SN
Manufacturer:
MIC
Quantity:
1 000
Devices included in this Data Sheet:
• PIC12C508
• PIC12C509
• PIC12CR509A
High-Performance RISC CPU:
• Only 33 single word instructions to learn
• All instructions are single cycle (1 s) except for
• Operating speed: DC - 4 MHz clock input
PIC12C508
PIC12C508A
PIC12C509
PIC12C509A
PIC12CE518
PIC12CE519
PIC12CR509A
• 12-bit wide instructions
• 8-bit wide data path
• Seven special function hardware registers
• Two-level deep hardware stack
• Direct, indirect and relative addressing modes for
• Internal 4 MHz RC oscillator with programmable
• In-circuit serial programming
1999 Microchip Technology Inc.
Note: Throughout this data sheet PIC12C5XX
program branches which are two-cycle
data and instructions
calibration
Device
refers to the PIC12C508, PIC12C509,
PIC12C508A, PIC12C509A,
PIC12CR509A, PIC12CE518 and
PIC12CE519. PIC12CE5XX refers to
PIC12CE518 and PIC12CE519.
1024 x 12
1024 x 12
1024 x 12
Program
512 x 12
512 x 12
512 x 12
EPROM
• PIC12C508A
• PIC12C509A
DC - 1 s instruction cycle
8-Pin, 8-Bit CMOS Microcontrollers
1024 x 12
Program
ROM
Memory
• PIC12CE518
• PIC12CE519
RAM
Data
25
25
41
41
25
41
41
EEPROM
Data
16
16
Peripheral Features:
• 8-bit real time clock/counter (TMR0) with 8-bit
• Power-On Reset (POR)
• Device Reset Timer (DRT)
• Watchdog Timer (WDT) with its own on-chip RC
• Programmable code-protection
• 1,000,000 erase/write cycle EEPROM data
• EEPROM data retention > 40 years
• Power saving SLEEP mode
• Wake-up from SLEEP on pin change
• Internal weak pull-ups on I/O pins
• Internal pull-up on MCLR pin
• Selectable oscillator options:
CMOS Technology:
• Low power, high speed CMOS EPROM/ROM
• Fully static design
• Wide operating voltage range
• Wide temperature range:
• Low power consumption
programmable prescaler
oscillator for reliable operation
memory
- INTRC: Internal 4 MHz RC oscillator
- EXTRC: External low-cost RC oscillator
- XT:
- LP:
technology
- Commercial: 0°C to +70°C
- Industrial: -40°C to +85°C
- Extended: -40°C to +125°C
- < 2 mA @ 5V, 4 MHz
- 15 A typical @ 3V, 32 KHz
- < 1 A typical standby current
PIC12C5XX
Standard crystal/resonator
Power saving, low frequency crystal
DS40139E-page 1

Related parts for PIC12C508

PIC12C508 Summary of contents

Page 1

... PIC12C508A • PIC12CE518 • PIC12C509 • PIC12C509A • PIC12CE519 • PIC12CR509A Note: Throughout this data sheet PIC12C5XX refers to the PIC12C508, PIC12C509, PIC12C508A, PIC12C509A, PIC12CR509A, PIC12CE518 and PIC12CE519. PIC12CE5XX refers to PIC12CE518 and PIC12CE519. High-Performance RISC CPU: • Only 33 single word instructions to learn • ...

Page 2

... PIC12C5XX Pin Diagram - PIC12C508/509 PDIP, 208 mil SOIC, Windowed Ceramic Side Brazed GP5/OSC1/CLKIN 2 7 GP4/OSC2 3 6 GP3/MCLR Pin Diagram - PIC12C508A/509A, PIC12CE518/519 PDIP, 150 & 208 mil SOIC, Windowed CERDIP GP5/OSC1/CLKIN 2 7 GP4/OSC2 3 6 GP3/MCLR Pin Diagram - PIC12CR509A PDIP, 150 & ...

Page 3

... Timer0 Module and TMR0 Register .................................................................................................................... 25 7.0 EEPROM Peripheral Operation........................................................................................................................... 29 8.0 Special Features of the CPU ............................................................................................................................... 35 9.0 Instruction Set Summary ..................................................................................................................................... 47 10.0 Development Support.......................................................................................................................................... 59 11.0 Electrical Characteristics - PIC12C508/PIC12C509............................................................................................ 65 12.0 DC and AC Characteristics - PIC12C508/PIC12C509 ........................................................................................ 75 13.0 Electrical Characteristics PIC12C508A/PIC12C509A/PIC12LC508A/PIC12LC509A/PIC12CR509A/ PIC12CE518/PIC12CE519/ PIC12LCE518/PIC12LCE519/PIC12LCR509A ................................................................................................... 79 14.0 DC and AC Characteristics PIC12C508A/PIC12C509A/PIC12LC508A/PIC12LC509A/PIC12CE518/PIC12CE519/PIC12CR509A/ PIC12LCE518/PIC12LCE519/ PIC12LCR509A .................................................................................................. 93 15.0 Packaging Information......................................................................................................................................... 99 Index ........................................................................................................................................................................... 105 PIC12C5XX Product Identification System ................................................................................................................ 109 Sales and Support: ...

Page 4

... Low-cost, low-power, high performance, ease of use and I/O flexibility make the PIC12C5XX series very ver- satile even in areas where no microcontroller use has been considered before (e.g., timer functions, replace- ment of “glue” logic and PLD’s in larger systems, copro- cessor applications). 1999 Microchip Technology Inc. ...

Page 5

... TABLE 1-1: PIC12CXXX & PIC12CEXXX FAMILY OF DEVICES PIC12C508(A) PIC12C509(A) PIC12CR509A PIC12CE518 PIC12CE519 PIC12C671 PIC12C672 PIC12CE673 PIC12CE674 Maximum 4 4 Frequency Clock of Operation (MHz) EPROM 512 x 12 1024 x 12 Program Memory Memory RAM Data 25 41 Memory (bytes) EEPROM — — Data Memory (bytes) Timer ...

Page 6

... PIC12C5XX NOTES: DS40139E-page 6 1999 Microchip Technology Inc. ...

Page 7

... The OTP devices, packaged in plastic packages permit the user to program them once. In addition to the program memory, the configuration bits must also be programmed. 1999 Microchip Technology Inc. 2.3 Quick-Turnaround-Production (QTP) Devices available. production Microchip offers a QTP Programming Service for factory production orders ...

Page 8

... PIC12C5XX NOTES: DS40139E-page 8 1999 Microchip Technology Inc. ...

Page 9

... Memory Device EPROM ROM RAM Program Program Data PIC12C508 512 x 12 PIC12C509 1024 x 12 PIC12C508A 512 x 12 PIC12C509A 1024 x 12 PIC12CR509A 1024 x 12 PIC12CE518 512 PIC12CE519 1024 The PIC12C5XX can directly or indirectly address its register files and data memory ...

Page 10

... STACK2 File Registers RAM Addr 9 Addr MUX Indirect 5 5-7 Addr FSR reg STATUS reg 3 MUX Timer ALU Power-on Reset 8 Watchdog W reg Timer Timer0 GPIO GP0 GP1 GP2/T0CKI GP3/MCLR/V PP GP4/OSC2 GP5/OSC1/CLKIN EEPROM Data Memory PIC12CE5XX Only 1999 Microchip Technology Inc. ...

Page 11

... Legend input output, I/O = input/output power, — = not used, TTL = TTL input Schmitt Trigger input 1999 Microchip Technology Inc. I/O/P Buffer Description Type Type I/O TTL/ST Bi-directional I/O port/ serial programming data. Can be software programmed for internal weak pull-up and wake-up from SLEEP on pin change. This buffer is a Schmitt Trigger input when used in serial programming mode ...

Page 12

... Q2, Q3, and Q4 cycles. Data memory is read during Q2 (operand read) and written during Q4 (destination write PC+1 Fetch INST (PC+1) Execute INST (PC) Execute 1 Fetch 2 Execute 2 Fetch 3 Execute 3 Fetch Internal phase clock PC+2 Fetch INST (PC+2) Execute INST (PC+1) Flush Fetch SUB_1 Execute SUB_1 1999 Microchip Technology Inc. ...

Page 13

... PIC12C508, PIC12C508A and PIC12CE518 and (0000h-03FFh) for the PIC12C509, PIC12C509A, PIC12CR509A, and PIC12CE519 are physically implemented. Refer to Figure 4-1. Accessing a location above these boundaries will cause a wrap- around within the first 512 x 12 space (PIC12C508, PIC12C508A and PIC12CE518 space (PIC12C509, PIC12C509A, PIC12CR509A PIC12CE519) ...

Page 14

... I/O port configuration and prescaler options. The general purpose registers are used for data and control information under command of the instructions. For the PIC12C508, PIC12C508A and PIC12CE518, the register file is composed of 7 special function registers and 25 general purpose registers (Figure 4- 2). ...

Page 15

... PIC12C509) CAL3 CAL2 OSCCAL (PIC12C508A/ PIC12C509A/ PIC12CE518/ PIC12CE519/ 05h PIC12CR509A) CAL5 CAL4 GPIO (PIC12C508/ PIC12C509/ PIC12C508A/ PIC12C509A/ 06h PIC12CR509A) — — GPIO (PIC12CE518/ 06h PIC12CE519) SCL SDA Legend: Shaded boxes = unimplemented or unused, — = unimplemented, read as ’0’ (if applicable unknown unchanged see the tables in Section 8.7 for possible values. ...

Page 16

... STATUS bits, see Instruction Set Summary. R-1 R/W-x R/W-x R/W bit0 SUBWF RRF or RLF borrow did not occur Load bit with LSB or MSB, respectively borrow occurred R = Readable bit W = Writable bit - n = Value at POR reset 1999 Microchip Technology Inc. ...

Page 17

... Microchip Technology Inc. Note: If TRIS bit is set to ‘0’, the wake-up on change and pull-up functions are disabled for that pin; i.e., note that TRIS overrides OPTION control of GPPU and GPWU. Note: If the T0CS bit is set to ‘1’, GP2 is forced input even if TRIS GP2 = ‘ ...

Page 18

... The Oscillator Calibration (OSCCAL) register is used to calibrate the internal 4 MHz oscillator. It contains four to six bits for calibration. Increasing the cal value increases the frequency. See Section 7.2.5 for more information on the internal oscillator. FIGURE 4-6: OSCCAL REGISTER (ADDRESS 05h) FOR PIC12C508 AND PIC12C509 R/W-0 R/W-1 R/W-1 R/W-1 CAL3 CAL2 ...

Page 19

... Instruction Word Reset to ‘0’ PA0 7 0 STATUS 1999 Microchip Technology Inc. 4.6.1 EFFECTS OF RESET The Program Counter is set upon a RESET, which means that the PC addresses the last location in the last page i.e., the oscillator calibration instruction. After executing MOVLW XX, the PC will roll over to location 00h, and begin executing user code ...

Page 20

... The FSR is a 5-bit wide register used in conjunction with the INDF register to indirectly address the data memory area. The FSR<4:0> bits are used to select data memory addresses 00h to 1Fh. PIC12C508/PIC12C508A/PIC12CE518: use banking. FSR<7:5> are unimplemented and read as '1's. PIC12C509/PIC12C509A/PIC12CR509A/ PIC12CE519: Uses FSR<5>. Selects between bank 0 and bank 1. FSR< ...

Page 21

... The TRIS registers are “write-only” and are set (output drivers disabled) upon RESET. 1999 Microchip Technology Inc. PIC12C5XX 5.3 I/O Interfacing The equivalent circuit for an I/O port pin is shown in Figure 5-1 ...

Page 22

... OPTION GPWU GPPU N/A STATUS 03H GPWUF — GPIO (PIC12C508/ PIC12C509/ PIC12C508A/ PIC12C509A/ 06h PIC12CR509A) — — GPIO (PIC12CE518/ 06h PIC12CE519) SCL SDA Legend: Shaded cells not used by Port Registers, read as ‘0’, — = unimplemented, read as '0 unknown unchanged see tables in Section 8.7 for possible values. ...

Page 23

... MOVWF GPIO MOVF GPIO,W GP5:GP0 Port pin written here Instruction executed MOVWF GPIO (Write to GPIO) 1999 Microchip Technology Inc This example shows a write to GPIO followed by a read from GPIO. NOP NOP Data setup time = (0.25 T where: T Port pin Therefore, at higher clock frequencies, a sampled here write followed by a read may be problematic ...

Page 24

... PIC12C5XX NOTES: DS40139E-page 24 1999 Microchip Technology Inc. ...

Page 25

... T0CS Note 1: Bits T0CS, T0SE, PSA, PS2, PS1 and PS0 are located in the OPTION register. 2: The prescaler is shared with the Watchdog Timer (Figure 6-5). 1999 Microchip Technology Inc. Counter mode is selected by setting the T0CS bit (OPTION<5>). In this mode, Timer0 will increment either on every rising or falling edge of pin T0CKI. The T0SE bit (OPTION< ...

Page 26

... Read TMR0 reads NT0 + 1 reads NT0 + 2 PC+4 PC+5 PC+6 MOVF TMR0,W NT0+1 T0 Read TMR0 Read TMR0 reads NT0 reads NT0 + 1 Value on Value on Power-On All Other Bit 0 Reset Resets xxxx xxxx uuuu uuuu PS0 1111 1111 1111 1111 GP0 --11 1111 --11 1111 1999 Microchip Technology Inc. ...

Page 27

... External clock if no prescaler selected, Prescaler output otherwise. 3: The arrows indicate the points in time where sampling occurs. 1999 Microchip Technology Inc. When a prescaler is used, the external clock input is divided by the asynchronous ripple counter-type prescaler so that the prescaler output is symmetrical. For the external clock to meet the sampling ...

Page 28

... TMR0 & Prescaler ; are required only if ; desired ;PS<2:0> are 000 or 001 ; desired WDT rate should be executed before CHANGING PRESCALER (WDT TIMER0) ;Clear WDT and ;prescaler ;Select TMR0, new ;prescale value and ;clock source Data Bus 8 TMR0 reg 1999 Microchip Technology Inc. ...

Page 29

... EEPROM peripheral. SDA and SCL operation is also slightly different than GPO-GP5 as listed below. 1999 Microchip Technology Inc. Namely, to avoid code overhead in modifying the TRIS register, both SDA and SCL are always outputs. To read data from the EEPROM peripheral requires out- and putting a ‘ ...

Page 30

... Input Latch Read GPIO Figure 7-2: Block diagram of GPIO7 (SCL line) D write GPIO databus Q Read GPIO DS40139E-page 30 reset Schmitt Trigger EN ck ltchpin Schmitt Trigger EN ck ltchpin 24L00 SDA Pad 24LC00 SCL Pad 1999 Microchip Technology Inc. ...

Page 31

... STOP DATA TRANSFER (C) A LOW to HIGH transition of the SDA line while the clock (SCL) is HIGH determines a STOP condition. All operations must be ended with a STOP condition. 1999 Microchip Technology Inc. PIC12C5XX 7.1.4 DATA VALID (D) The state of the data line represents valid data when, after a START condition, the data line is stable for the duration of the HIGH period of the clock signal ...

Page 32

... CONDITION 2 3 Data from transmitter Receiver must release the SDA line at this point so the Transmitter can continue sending data. CONTROL BYTE FORMAT Read/Write Bit Don’t Care Bits Bits R/W ACK Slave Address Acknowledge Bit 1999 Microchip Technology Inc. ...

Page 33

... X X BUS ACTIVITY X = Don’t Care Bit 1999 Microchip Technology Inc. 7.4 ACKNOWLEDGE POLLING Since the device will not acknowledge during a write cycle, this can be used to determine when the cycle is complete (this feature can be used to maximize bus throughput). Once the stop condition for a write com- mand has been issued from the master, the device ini- tiates the internally timed write cycle ...

Page 34

... DATA DATA DATA ( DATA 1999 Microchip Technology Inc. ...

Page 35

... LP oscillator Note 1: Refer to the PIC12C5XX Programming Specifications to determine how to access the configuration word. This register is not user addressable during device operation. 1999 Microchip Technology Inc. The PIC12C5XX has a Watchdog Timer which can be shut off only through configuration bit WDTE. It runs off of its own RC oscillator for added reliability ...

Page 36

... SLEEP To internal logic CAPACITOR SELECTION FOR CERAMIC RESONATORS - PIC12C5XX Cap. Range Cap. Range CAPACITOR SELECTION FOR CRYSTAL OSCILLATOR - PIC12C5XX Cap.Range Cap. Range 47-68 pF 47- > 4.5V 1999 Microchip Technology Inc. ...

Page 37

... F XTAL 1999 Microchip Technology Inc. 8.2.4 EXTERNAL RC OSCILLATOR For timing insensitive applications, the RC device option offers additional cost savings. The RC oscillator frequency is a function of the supply voltage, the resistor (Rext) and capacitor (Cext) values, and the operating temperature. In addition to this, the oscillator ...

Page 38

... OSCCAL are unimplemented and should be written as 0 when modifying OSCCAL for compatibility with future devices. For the PIC12C508 and PIC12C509, the upper 4 bits of the register are used. Writing a larger value in this loca- tion yields a higher clock speed. ...

Page 39

... TABLE 8-3: RESET CONDITIONS FOR REGISTERS Register W (PIC12C508/509) W (PIC12C508A/509A/ PIC12CE518/519/ PIC12CE509A) INDF TMR0 PC STATUS FSR (PIC12C508/ PIC12C508A/ PIC12CE518) FSR (PIC12C509/ PIC12C509A/ PIC12CE519/ PIC12CR509A) OSCCAL (PIC12C508/509) OSCCAL (PIC12C508A/509A/ PIC12CE518/512/ PIC12CR509A) GPIO (PIC12C508/PIC12C509/ PIC12C508A/ PIC12C509A/ PIC12CR509A) GPIO (PIC12CE518/ PIC12CE519) OPTION TRIS Legend unchanged unknown unimplemented bit, read as ‘0’ value depends on condition. ...

Page 40

... If these conditions are not met, the device must be held in reset until the oper- ating conditions are met. For additional information refer to Application Notes “ Power-Up Considerations” - AN522 and “ Power-up Trouble Shooting ” - AN607. 1999 Microchip Technology Inc. is stable DD rises too DD ) actually ...

Page 41

... INTERNAL POR DRT TIME-OUT INTERNAL RESET FIGURE 8-10: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED MCLR INTERNAL POR DRT TIME-OUT INTERNAL RESET 1999 Microchip Technology Inc. Pin Change POR (Power-On Reset) SLEEP WDT Time-out RESET 8-bit Asynch Ripple Counter (Start-Up Timer) T DRT ...

Page 42

... Specifications to determine how to access the configuration word. TABLE 8-5: Oscillator Configuration IntRC & ExtRC XT & SLOW V RISE TIME permanently disabled by DRT (DEVICE RESET TIMER PERIOD) Subsequent POR Reset Resets 18 ms (typical) 300 µs (typical (typical (typical) 1999 Microchip Technology Inc. ...

Page 43

... N/A OPTION GPWU GPPU Legend: Shaded boxes = Not used by Watchdog Timer, — = unimplemented, read as ’0’ unchanged 1999 Microchip Technology Inc. 8.6.2 WDT PROGRAMMING CONSIDERATIONS The CLRWDT instruction clears the WDT and the postscaler, if assigned to the WDT, and prevents it from timing out and generating a device RESET. ...

Page 44

... There are 7 different trip point selections to accomodate 5V and 3V systems. goes below CIRCUIT MCLR 40k* PIC12C5XX 0.7V • CIRCUIT bypass capacitor DD MCLR PIC12C5XX protection circuit employs 1999 Microchip Technology Inc. ...

Page 45

... The last memory location cannot be read if code pro- tection is enabled on the PIC12C508/509. The last memory location can be read regardless of the code protection bit setting on the PIC12C508A/509A/ CR509A/CE518/CE519. 8.11 ID Locations Four memory locations are designated as ID locations where the user can store checksum or other code- identification numbers ...

Page 46

... PIC12C5XX Programming Specifications. A typical in-circuit serial programming connection is shown in Figure 8-16. DS40139E-page 46 FIGURE 8-16: TYPICAL IN-CIRCUIT SERIAL PROGRAMMING CONNECTION To Normal Connections External Connector Signals + MCLR/V PP GP1 CLK Data I/O GP0 Normal Connections 1999 Microchip Technology Inc. PIC12C5XX PP ...

Page 47

... In the set of i talics User defined term (font is courier) 1999 Microchip Technology Inc. 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 48

... TO PD 0000 0000 0100 , 2 None 101k kkkk kkkk 1 Z 1101 kkkk kkkk 1 None 1100 kkkk kkkk 1 None 0000 0000 0010 2 None 1000 kkkk kkkk 0000 0000 0011 , 1 None 0000 0000 0fff 1 Z 1111 kkkk kkkk 1999 Microchip Technology Inc. 1,2,4 2,4 4 2,4 2,4 2,4 2,4 2,4 2,4 1,4 2,4 2,4 1,2,4 2,4 2,4 2,4 2 ...

Page 49

... AND’ed with the eight-bit literal 'k'. The result is placed in the W register Words: 1 Cycles: 1 Example: ANDLW 0x5F Before Instruction W = 0xA3 After Instruction W = 0x03 1999 Microchip Technology Inc. ANDWF Syntax: Operands: Operation: Status Affected: Z Encoding: Description: . Words: Cycles: Example: Before Instruction W = FSR = After Instruction ...

Page 50

... If bit ’b’ is ’1’, then the next instruction fetched during the current instruction execution, is discarded and an NOP is executed instead, making this a 2 cycle instruction. 1 1(2) HERE BTFSS FLAG,1 FALSE GOTO PROCESS_CODE TRUE = address (HERE address (FALSE address (TRUE) 1999 Microchip Technology Inc. ...

Page 51

... Z bit is set. Words: 1 Cycles: 1 Example: CLRF FLAG_REG Before Instruction FLAG_REG = 0x5A After Instruction FLAG_REG = 0x00 1999 Microchip Technology Inc. PIC12C5XX CLRW Clear W Syntax: [ label ] CLRW Operands: None Operation: 00h (W Status Affected: Z Encoding: 0000 0100 0000 Description: The W register is cleared. Zero bit (Z) is set ...

Page 52

... 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. Words: 1 Cycles: 2 Example: GOTO THERE After Instruction PC = address (THERE) 1999 Microchip Technology Inc. CNT, 1 LOOP ...

Page 53

... Before Instruction PC = address (HERE) After Instruction CNT = CNT + 1; if CNT = address (CONTINUE); if CNT address (HERE +1) 1999 Microchip Technology Inc. IORLW Syntax: Operands: Operation: Status Affected: Z Encoding: Description: Words: Cycles: Example: Before Instruction W = After Instruction IORWF Syntax: ...

Page 54

... Words: 1 Cycles: 1 Example: MOVWF TEMP_REG Before Instruction TEMP_REG = 0xFF W = 0x4F After Instruction TEMP_REG = 0x4F W = 0x4F NOP No Operation Syntax: [ label ] NOP Operands: None Operation: No operation Status Affected: None Encoding: 0000 0000 0000 Description: No operation. Words: 1 Cycles: 1 Example: NOP 1999 Microchip Technology Inc. f ...

Page 55

... RETLW k1 ;Begin table RETLW k2 ; • • • RETLW kn ; End of table Before Instruction W = 0x07 After Instruction W = value of k8 1999 Microchip Technology Inc. PIC12C5XX RLF Rotate Left f through Carry Syntax: [ label ] RLF f,d Operands [0,1] Operation: See description below Status Affected: C Encoding: 0011 ...

Page 56

... Before Instruction REG1 = After Instruction REG1 = result is positive Example 2: Before Instruction REG1 = After Instruction REG1 = result is zero Example 3: Before Instruction REG1 = After Instruction REG1 = result is negative 1999 Microchip Technology Inc. ...

Page 57

... W register Words: 1 Cycles: 1 Example TRIS GPIO Before Instruction W = 0XA5 After Instruction TRIS = 0XA5 Note for PIC12C5XX only. 1999 Microchip Technology Inc. PIC12C5XX XORLW Exclusive OR literal with W Syntax: [ label ] XORLW k Operands 255 Operation: (W) .XOR Status Affected: Z Encoding: 1111 kkkk ...

Page 58

... PIC12C5XX NOTES: DS40139E-page 58 1999 Microchip Technology Inc. ...

Page 59

... MPLAB-ICE 2000. This is a full-featured emulator system with enhanced trace, trigger, and data monitoring features. Both systems will operate across the entire operating speed range of the PICmicro MCU. 1999 Microchip Technology Inc. 10.3 ICEPIC: Low-Cost PICmicro In-Circuit Emulator ICEPIC is a low-cost in-circuit emulator solution for the Microchip PIC12CXXX, PIC16C5X and PIC16CXXX families of 8-bit OTP microcontrollers ...

Page 60

... The PICDEM-3 provides an addi- tional RS-232 interface and Windows 3.1 software for showing the demultiplexed LCD signals on a PC. A sim- ple serial interface allows the user to construct a hard- ware demultiplexer for the LCD signals. 1999 Microchip Technology Inc. ...

Page 61

... MPASM provides a rich directive language to support programming of the PICmicro . Directives are helpful in making the development of your assemble source code shorter and more maintainable. 1999 Microchip Technology Inc. PIC12C5XX 10.12 Software Simulator (MPLAB-SIM) The MPLAB-SIM Software Simulator allows code development host environment. It allows the user to simulate the PICmicro series microcontrollers on an instruction level ...

Page 62

... EE OQ Programming Tools K L evaluation and programming tools support EE OQ Microchips HCS Secure Data Products. The HCS eval- uation kit includes an LCD display to show changing codes, a decoder to decode transmissions, and a pro- gramming interface to program test transmitters. DS40139E-page 62 1999 Microchip Technology Inc. ...

Page 63

... Products Emulator Tools 1999 Microchip Technology Inc. á á á á á á á á á á á á á á á á á á ...

Page 64

... PIC12C5XX NOTES: DS40139E-page 64 1999 Microchip Technology Inc. ...

Page 65

... ELECTRICAL CHARACTERISTICS - PIC12C508/PIC12C509 Absolute Maximum Ratings† Ambient Temperature under bias ........................................................................................................... –40°C to +125°C Storage Temperature ............................................................................................................................. –65°C to +150°C Voltage on V with respect to V ................................................................................................................. Voltage on MCLR with respect to V ............................................................................................................... Voltage on all other pins with respect to V ...

Page 66

... The power down current in SLEEP mode does not depend on the oscillator type. Power down current is measured with the part in SLEEP mode, with all I/O pins in hi-impedance state and tied DS40139E-page 66 PIC12C508/509 (Commercial, Industrial, Extended) Standard Operating Conditions (unless otherwise specified) Operating Temperature 0 C –40 C –40 C ...

Page 67

... The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels represent normal operating conditions. Higher leakage current may be measured at different input voltages. 3: Negative current is defined as coming out of the pin. 1999 Microchip Technology Inc. PIC12C508/509 (Commercial, Industrial, Extended) Standard Operating Conditions (unless otherwise specified) Operating temperature 0°C ...

Page 68

... PIC12C5XX TABLE 11-1: PULL-UP RESISTOR RANGES - PIC12C508/C509 V (Volts) Temperature ( C) DD 2.5 – 125 5.5 – 125 2.5 – 125 5.5 – 125 * These parameters are characterized but not tested. DS40139E-page 68 Min Typ GP0/GP1 38K 42K 42K 48K 42K 49K 50K 55K 15K ...

Page 69

... Timing Parameter Symbology and Load Conditions - PIC12C508/C509 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 70

... PIC12C5XX 11.4 Timing Diagrams and Specifications FIGURE 11-2: EXTERNAL CLOCK TIMING - PIC12C508/C509 Q4 Q1 OSC1 TABLE 11-2: EXTERNAL CLOCK TIMING REQUIREMENTS - PIC12C508/C509 AC Characteristics Standard Operating Conditions (unless otherwise specified) Operating Temperature Operating Voltage V Parameter Sym Characteristic No. F OSC External CLKIN Frequency Oscillator Frequency 1 T OSC ...

Page 71

... TABLE 11-3: CALIBRATED INTERNAL RC FREQUENCIES - PIC12C508/C509 AC Characteristics Standard Operating Conditions (unless otherwise specified) Operating Temperature Operating Voltage V Parameter Sym Characteristic No. Internal Calibrated RC Internal Calibrated RC * These parameters are characterized but not tested. Note 1: Data in the Typical (“Typ”) column unless otherwise stated. These parameters are for design guidance only and are not tested ...

Page 72

... 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. 2: Measurements are taken in EXTRC mode. 3: See Figure 11-1 for loading conditions. FIGURE 11-4: RESET, WATCHDOG TIMER, AND DEVICE RESET TIMER TIMING - PIC12C508/C509 V DD MCLR ...

Page 73

... TABLE 11-5: RESET, WATCHDOG TIMER, AND DEVICE RESET TIMER - PIC12C508/C509 AC Characteristics Standard Operating Conditions (unless otherwise specified) Operating Temperature Operating Voltage V Parameter No. Sym Characteristic TmcL MCLR Pulse Width (low Twdt Watchdog Timer Time-out Period (No Prescaler Device Reset Timer Period DRT ...

Page 74

... PIC12C5XX FIGURE 11-5: TIMER0 CLOCK TIMINGS - PIC12C508/C509 T0CKI TABLE 11-7: TIMER0 CLOCK REQUIREMENTS - PIC12C508/C509 AC Characteristics Standard Operating Conditions (unless otherwise specified) Operating Temperature Operating Voltage V Parameter Sym Characteristic No. 40 Tt0H T0CKI High Pulse Width - No Prescaler 41 Tt0L T0CKI Low Pulse Width - No Prescaler 42 Tt0P T0CKI Period * These parameters are characterized but not tested ...

Page 75

... DC AND AC CHARACTERISTICS - PIC12C508/PIC12C509 The graphs and tables provided in this section are for design guidance and are not tested. In some graphs or tables the data presented are outside specified operating range (e.g., outside specified V only and devices will operate properly only within the specified range. ...

Page 76

... FIGURE 12-4: SHORT DRT PERIOD VS. V 1000 900 800 700 600 500 400 300 200 100 Max +125 C Max +85 C Typ +25 C MIn – (Volts) DD 1999 Microchip Technology Inc. ...

Page 77

... V (Volts) OH FIGURE 12- -10 -15 -20 -25 -30 3.5 4.0 4.5 V (Volts) OH 1999 Microchip Technology Inc. FIGURE 12- 2 FIGURE 12- 5.0 5.5 0 250.0m PIC12C5XX vs 2 Max –40 C Typ +25 C Min +85 C Min +125 C 250.0m 500 ...

Page 78

... PIC12C5XX NOTES: DS40139E-page 78 1999 Microchip Technology Inc. ...

Page 79

... ELECTRICAL CHARACTERISTICS - PIC12C508A/PIC12C509A/ PIC12LC508A/PIC12LC509A/PIC12CR509A/PIC12CE518/PIC12CE519/ PIC12LCE518/PIC12LCE519/PIC12LCR509A Absolute Maximum Ratings† Ambient Temperature under bias ........................................................................................................... –40°C to +125°C Storage Temperature ............................................................................................................................. –65°C to +150°C Voltage on V with respect to V ................................................................................................................. Voltage on MCLR with respect to V ............................................................................................................... Voltage on all other pins with respect to V ...

Page 80

... The power down current in SLEEP mode does not depend on the oscillator type. Power down current is mea- sured with the part in SLEEP mode, with all I/O pins in hi-impedance state and tied to V DS40139E-page 80 PIC12C508A/509A (Commercial, Industrial, Extended) PIC12CE518/519 (Commercial, Industrial, Extended) PIC12CR509A (Commercial, Industrial, Extended) ...

Page 81

... The power down current in SLEEP mode does not depend on the oscillator type. Power down current is measured with the part in SLEEP mode, with all I/O pins in hi-impedance state and tied 1999 Microchip Technology Inc. PIC12LC508A/509A (Commercial, Industrial) PIC12LCE518/519 (Commercial, Industrial) PIC12LCR509A (Commercial, Industrial) Standard Operating Conditions (unless otherwise specified) ...

Page 82

... Negative current is defined as coming out of the pin. 4: This spec. applies when GP3/MCLR is configured as MCLR. The leakage current of the MCLR circuit is higher than the standard I/O logic. DS40139E-page 82 PIC12C508A/509A (Commercial, Industrial, Extended) PIC12C518/519 (Commercial, Industrial, Extended) PIC12CR509A (Commercial, Industrial, Extended) Standard Operating Conditions (unless otherwise specified) Operating temperature 0° ...

Page 83

... Higher leakage current may be measured at different input voltages. 3: Negative current is defined as coming out of the pin. 4: This spec. applies when GP3/MCLR is configured as MCLR. The leakage current of the MCLR circuit is higher than the standard I/O logic. 1999 Microchip Technology Inc. PIC12LC508A/509A (Commercial, Industrial) PIC12LC518/519 (Commercial, Industrial) PIC12LCR509A (Commercial, Industrial) ...

Page 84

... PIC12C5XX TABLE 13-1: PULL-UP RESISTOR RANGES* - PIC12C508A, PIC12C509A, PIC12CR509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 V (Volts) Temperature ( C) DD 2.5 – 125 5.5 – 125 2.5 – 125 5.5 – 125 * These parameters are characterized but not tested. DS40139E-page 84 Min Typ ...

Page 85

... Timing Parameter Symbology and Load Conditions - PIC12C508A, PIC12C509A, PIC12CR509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 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 ...

Page 86

... PIC12C5XX 13.6 Timing Diagrams and Specifications FIGURE 13-2: EXTERNAL CLOCK TIMING - PIC12C508A, PIC12C509A, PIC12CR509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 Q4 Q1 OSC1 TABLE 13-2: EXTERNAL CLOCK TIMING REQUIREMENTS - PIC12C508A, PIC12C509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 AC Characteristics Standard Operating Conditions (unless otherwise specified) ...

Page 87

... TABLE 13-3: CALIBRATED INTERNAL RC FREQUENCIES - PIC12C508A, PIC12C509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 AC Characteristics Standard Operating Conditions (unless otherwise specified) Operating Temperature Operating Voltage V Parameter Sym Characteristic No. Internal Calibrated RC Internal Calibrated RC * These parameters are characterized but not tested. Note 1: Data in the Typical (“Typ”) column unless otherwise stated. These parameters are for design guidance only and are not tested ...

Page 88

... PIC12C5XX FIGURE 13-3: I/O TIMING - PIC12C508A, PIC12C509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 Q4 OSC1 I/O Pin (input) I/O Pin Old Value (output) Note: All tests must be done with specified capacitive loads (see data sheet I/O pins and CLKOUT. TABLE 13-4: TIMING REQUIREMENTS - PIC12C508A, PIC12C509A, PIC12CE518, PIC12CE519, ...

Page 89

... Note 1: I/O pins must be taken out of hi-impedance mode by enabling the output drivers in software. 2: Runs in MCLR or WDT reset only in XT and LP modes. TABLE 13-5: RESET, WATCHDOG TIMER, AND DEVICE RESET TIMER - PIC12C508A, PIC12C509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 AC Characteristics Standard Operating Conditions (unless otherwise specified) ...

Page 90

... 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. FIGURE 13-5: TIMER0 CLOCK TIMINGS - PIC12C508A, PIC12C509A, PIC12CE518, PIC12CE519, PIC12LC508A, PIC12LC509A, PIC12LCR509A, PIC12LCE518 and PIC12LCE519 T0CKI ...

Page 91

... This eliminates the need for a TI specification for standard operation. 4: This parameter is not tested but guaranteed by characterization. For endurance estimates in a specific appli- cation, please consult the Total Endurance Model which can be obtained on Microchip’s website. 1999 Microchip Technology Inc. T +70 C, Vcc = 3.0V to 5.5V (commercial) A – ...

Page 92

... PIC12C5XX NOTES: DS40139E-page 92 1999 Microchip Technology Inc. ...

Page 93

... DC AND AC CHARACTERISTICS - PIC12C508A/PIC12C509A/ PIC12LC508A/PIC12LC509A, PIC12CE518/PIC12CE519/PIC12CR509A/ PIC12LCE518/PIC12LCE519/ PIC12LCR509A The graphs and tables provided in this section are for design guidance and are not tested. In some graphs or tables the data presented are outside specified operating range (e.g., outside specified V only and devices will operate properly only within the specified range. ...

Page 94

... FIGURE 14-4: TYPICAL I DD 600 550 500 450 400 350 300 250 200 150 100 0 5 VS. FREQUENCY DD (WDT DIS, 25° 5.5V) DD 1.0 1.5 2.0 2.5 3.0 3.5 4.0 Frequency (MHz) 1999 Microchip Technology Inc. ...

Page 95

... FIGURE 14-6: SHORT DRT PERIOD VS. V 950 850 750 650 550 Max +125 C 450 Max +85 C 350 250 MIn –40 C 150 0 0 2.5 3.5 4.5 V (Volts) DD 1999 Microchip Technology Inc. FIGURE 14- Min +125 Typ + Typ + -10 MIn – 5.5 6.5 FIGURE 14-8: I ...

Page 96

... Min +125 C -35 -40 3.5 1.0 FIGURE 14-12 Max - Typ + Min + Min +125 0.75 1 4.0 4.5 5.0 5.5 V (Volts Max -40 C Typ +25 C Min +85 C Min +125 C 0.25 0.5 0.75 1.0 V (Volts) OL 1999 Microchip Technology Inc. ...

Page 97

... FIGURE 14-13: TYPICAL IPD VS. V WATCHDOG DISABLED (25°C) 260 250 240 230 220 210 200 2.5 3.0 3.5 4.5 5.0 V (Volts) DD 1999 Microchip Technology Inc. , FIGURE 14-14: VTH (INPUT THRESHOLD DD 1.8 1.6 1.4 1.2 1.0 0.8 0.6 5.5 0 2.5 PIC12C5XX VOLTAGE) OF GPIO PINS VS Max (-40 to 125) Typ (25 Min (-40 to 125) 3.5 4.5 5.5 V (Volts) DD DS40139E-page 97 ...

Page 98

... PIC12C5XX FIGURE 14-15: VIL, VIH OF NMCLR, AND T0CKI VS. V 3.5 3.0 2.5 2.0 1.5 1.0 0.5 2.5 3.5 4.5 V (Volts) DD DS40139E-page 98 DD Vih Max (-40 to 125) V Typ ( Min (-40 to 125 Max (-40 to 125 Typ ( Min (-40 to 125) IL 5.5 1999 Microchip Technology Inc. ...

Page 99

... Standard OTP marking consists of Microchip part number, year code, week code, facility code, mask rev#, and assembly code. For OTP marking beyond this, certain price adders apply. Please check with your Microchip Sales Office. For QTP devices, any special marking adders are included in QTP price. 1999 Microchip Technology Inc. PIC12C5XX Example ...

Page 100

... A1 0.060 0.080 0.100 A2 0.005 0.020 0.035 L 0.120 0.130 0.140 ‡ D 0.355 0.370 0.385 ‡ E 0.245 0.250 0.260 E1 0.267 0.280 0.292 eB 0.310 0.342 0.380 MILLIMETERS MIN NOM MAX 7.62 8 2.54 0.36 0.46 0.56 1.40 1.52 1.65 0.00 0.13 0.25 0.20 0.29 0.38 3.56 3.81 4.06 1.52 2.03 2.54 0.13 0.51 0.89 3.05 3.30 3.56 9.02 9.40 9.78 6.22 6.35 6.60 6.78 7.10 7.42 7.87 8.67 9. 1999 Microchip Technology Inc. ...

Page 101

... Dimensions “D” and “E” do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.010” (0.254 mm) per side or 0.020” (0.508 mm) more than dimensions “D” or “E.” 1999 Microchip Technology Inc ...

Page 102

... A1 MILLIMETERS MIN NOM MAX 1.27 8 1.78 1.89 2.00 0.94 1.08 1.21 0.05 0.14 0.22 5.08 5.21 5.33 5.16 5.28 5.41 7.62 7.94 8.26 0.13 0.13 0.25 0.13 0.13 0.25 0.28 0.41 0. 0.25 0.38 0.51 0.19 0.22 0.25 0.36 0.43 0. 1999 Microchip Technology Inc. ...

Page 103

... Lead Thickness Top to Seating Plane Top of Body to Seating Plane Base to Seating Plane Tip to Seating Plane Package Length Package Width Overall Row Spacing Window Diameter Lid Length Lid Width * Controlling Parameter. 1999 Microchip Technology Inc INCHES* MIN NOM MAX 0 ...

Page 104

... PIC12C5XX NOTES: DS40139E-page 104 1999 Microchip Technology Inc. ...

Page 105

... Instruction Set Summary..................................................... 48 K KeeLoq Evaluation and Programming Tools.................... 62 L Loading of PC ..................................................................... 19 M Memory Organization.......................................................... 13 Data Memory .............................................................. 14 Program Memory ........................................................ 13 MPLAB Integrated Development Environment Software .... 61 1999 Microchip Technology Inc. PIC12C5XX O OPTION Register................................................................ 17 OSC selection..................................................................... 35 OSCCAL Register............................................................... 18 Oscillator Configurations..................................................... 36 Oscillator Types HS............................................................................... 36 LP ............................................................................... 36 RC .............................................................................. 36 XT ...

Page 106

... PIC12C5XX DS40139E-page 106 1999 Microchip Technology Inc. ...

Page 107

... Microchip Products • Conferences for products, Development Sys- tems, technical information and more • Listing of seminars and events 1999 Microchip Technology Inc. PIC12C5XX Systems Information and Upgrade Hot Line The Systems Information and Upgrade Line provides system users a listing of the latest versions of all of Microchip’ ...

Page 108

... Is there any incorrect or misleading information (what and where)? 7. How would you improve this document? 8. How would you improve our software, systems, and silicon products? DS40139E-page 108 Total Pages Sent FAX: (______) _________ - _________ N Literature Number: DS40139E 1999 Microchip Technology Inc. ...

Page 109

... PIC12C509 PIC12C508T (Tape & reel for SOIC only) PIC12C509T (Tape & reel for SOIC only) PIC12C508A PIC12C509A PIC12C508AT (Tape & reel for SOIC only) PIC12C509AT (Tape & reel for SOIC only) PIC12LC508A PIC12LC509A PIC12LC508AT (Tape & reel for SOIC only) PIC12LC509AT (Tape & reel for SOIC only) PIC12CR509A PIC12CR509AT (Tape & ...

Page 110

... PIC12C5XX NOTES: DS40139E-page 110 1999 Microchip Technology Inc. ...

Page 111

... NOTES: 1999 Microchip Technology Inc. PIC12C5XX DS40139E-page 111 ...

Page 112

... Use of Microchip’s products as critical com- ponents in life support systems is not authorized except with express written approval by Microchip. No licenses are con- veyed, implicitly or otherwise, under any intellectual property rights.  2002 Microchip Technology Inc. ® MCUs. Trademarks The Microchip name and logo, the Microchip logo, FilterLab, ...

Page 113

... Palazzo Taurus Colleoni 1 20041 Agrate Brianza Milan, Italy Tel: 39-039-65791-1 Fax: 39-039-6899883 United Kingdom Arizona Microchip Technology Ltd. 505 Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG41 5TU Tel: 44 118 921 5869 Fax: 44-118 921-5820 01/18/02  2002 Microchip Technology Inc. ...

Related keywords