PIC12F615-H/SN Microchip Technology, PIC12F615-H/SN Datasheet
![no-image](/images/manufacturer_photos/0/4/439/microchip_technology_sml.jpg)
PIC12F615-H/SN
Specifications of PIC12F615-H/SN
Available stocks
Related parts for PIC12F615-H/SN
PIC12F615-H/SN 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. 2010 Microchip Technology Inc. PIC12F609/615/617 PIC12HV609/615 Data Sheet 8-Pin, Flash-Based 8-Bit CMOS Microcontrollers DS41302D ...
Page 2
... 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. ...
Page 3
... Option to use system clock as Timer1 TM • In-Circuit Serial Programming (ICSP Pins PIC12F615/617/HV615 ONLY: • Enhanced Capture, Compare, PWM module: - 16-bit Capture, max. resolution 12 Compare, max. resolution 200 ns - 10-bit PWM with output channels, 1 output channel programmable “dead time,” max. frequency 20 kHz, auto-shutdown • ...
Page 4
... PIC12F609/615/617/12HV609/615 Program Data Memory Memory Device Flash SRAM (bytes) (words) PIC12F609 1024 64 PIC12HV609 1024 64 PIC12F615 1024 64 PIC12HV615 1024 64 PIC12F617 2048 128 8-Pin Diagram, PIC12F609/HV609 (PDIP, SOIC, MSOP, DFN) GP5/T1CKI/OSC1/CLKIN GP4/CIN1-/T1G/OSC2/CLKOUT GP3/MCLR/V TABLE 1: PIC12F609/HV609 PIN SUMMARY ( I/O Pin Comparators GP0 7 CIN+ ...
Page 5
... PIC12F609/615/617/12HV609/615 8-Pin Diagram, PIC12F615/617/HV615 (PDIP, SOIC, MSOP, DFN) GP5/T1CKI/P1A*/OSC1/CLKIN GP4/AN3/CIN1-/T1G/P1B*/OSC2/CLKOUT GP3/T1G*/MCLR/V * Alternate pin function. TABLE 2: PIC12F615/617/HV615 PIN SUMMARY ( Comparator I/O Pin Analog s GP0 7 AN0 CIN+ GP1 6 AN1 CIN0- GP2 5 AN2 COUT (1) GP3 4 — — GP4 3 AN3 CIN1- ...
Page 6
... Timer2 Module (PIC12F615/617/HV615 only) .......................................................................................................................... 65 9.0 Comparator Module ................................................................................................................................................................... 67 10.0 Analog-to-Digital Converter (ADC) Module (PIC12F615/617/HV615 only) ............................................................................... 79 11.0 Enhanced Capture/Compare/PWM (With Auto-Shutdown and Dead Band) Module (PIC12F615/617/HV615 only) ............... 89 12.0 Special Features of the CPU ................................................................................................................................................... 107 13.0 Voltage Regulator .................................................................................................................................................................... 127 14.0 Instruction Set Summary ........................................................................................................................................................ 129 15.0 Development Support ............................................................................................................................................................. 139 16 ...
Page 7
... Block T1G T1CKI Timer0 T0CKI 2010 Microchip Technology Inc. Block Diagrams and pinout descriptions of the devices are as follows: • PIC12F609/HV609 (Figure 1-1, Table 1-1) • PIC12F615/617/HV615 (Figure 1-2, Table 1-2) INT 13 Data Bus Program Counter RAM 8-Level Stack 64 Bytes File ...
Page 8
... PIC12F609/615/617/12HV609/615 FIGURE 1-2: PIC12F615/617/HV615 BLOCK DIAGRAM Configuration Flash and 2K X 14** Program Memory Program 14 Bus Instruction Reg Instruction Decode & Control OSC1/CLKIN Timing Generation OSC2/CLKOUT Internal Oscillator T1G* Block T1G T1CKI Timer0 T0CKI Analog-To-Digital Converter * Alternate pin function. ** For the PIC12F617 only. ...
Page 9
... T1CKI OSC1 CLKIN Legend: AN=Analog input or output ST=Schmitt Trigger input with CMOS levels 2010 Microchip Technology Inc. Input Output Type Type TTL CMOS General purpose I/O with prog. pull-up and interrupt-on-change AN — Comparator non-inverting input ST CMOS Serial Programming Data I/O ...
Page 10
... PIC12F609/615/617/12HV609/615 TABLE 1-2: PIC12F615/617/HV615 PINOUT DESCRIPTION Name Function GP0/AN0/CIN+/P1B/ICSPDAT ICSPDAT GP1/AN1/CIN0-/V /ICSPCLK REF ICSPCLK GP2/AN2/T0CKI/INT/COUT/CCP1/ P1A GP3/T1G*/MCLR/V PP GP4/AN3/CIN1-/T1G/P1B*/OSC2/ CLKOUT CLKOUT GP5/T1CKI/P1A*/OSC1/CLKIN Alternate pin function. Legend: AN=Analog input or output ST=Schmitt Trigger input with CMOS levels DS41302D-page 10 Input ...
Page 11
... RETFIE, RETLW Stack Level 1 Stack Level 2 Stack Level 8 Reset Vector Interrupt Vector On-chip Program Memory Wraps to 0000h-03FFh 2010 Microchip Technology Inc. FIGURE 2-2: CALL, RETURN RETFIE, RETLW On-Chip Program Memory 2.2 Data Memory Organization The data memory (see Figure 2-3) is partitioned into two banks, which contain the General Purpose Registers (GPR) and the Special Function Registers (SFR) ...
Page 12
... Purpose Registers 64 Bytes 6Fh 70h Accesses 70h-7Fh Accesses 70h-7Fh 7Fh Bank 0 Bank 1 Unimplemented data memory locations, read as ‘0’. Note 1: Not a physical register. 2010 Microchip Technology Inc. File Address (1) 80h 81h 82h 83h 84h 85h 86h 87h 88h 89h ...
Page 13
... PIC12F609/615/617/12HV609/615 FIGURE 2-4: DATA MEMORY MAP OF THE PIC12F615/617/HV615 File Address (1) Indirect Addr. Indirect Addr. 00h TMR0 OPTION_REG 01h PCL 02h PCL STATUS STATUS 03h FSR FSR 04h GPIO TRISIO 05h 06h 07h 08h 09h PCLATH PCLATH 0Ah INTCON INTCON 0Bh PIR1 ...
Page 14
... VR1 VR0 0-00 0000 76, 116 — CMCH 0000 -0-0 72, 116 — — — T1GSS CMSYNC ---0 0-10 73, 116 — — — — — — 2010 Microchip Technology Inc. ...
Page 15
... PIC12F609/615/617/12HV609/615 TABLE 2-2: PIC12F615/617/HV615 SPECIAL FUNCTION REGISTERS SUMMARY BANK 0 Addr Name Bit 7 Bit 6 Bank 0 00h INDF Addressing this location uses contents of FSR to address data memory (not a physical register) 01h TMR0 Timer0 Module’s Register 02h PCL Program Counter’s (PC) Least Significant Byte ...
Page 16
... WPU1 WPU0 --11 -111 46, 116 IOC1 IOC0 --00 0000 46, 116 — — — — — — — — — — — — — — — — ANS1 ANS0 ---- 1-11 45, 117 2010 Microchip Technology Inc. ...
Page 17
... PIC12F609/615/617/12HV609/615 TABLE 2-4: PIC12F615/617/HV615 SPECIAL FUNCTION REGISTERS SUMMARY BANK 1 Addr Name Bit 7 Bit 6 Bank 1 80h INDF Addressing this location uses contents of FSR to address data memory (not a physical register) 81h OPTION_REG GPPU INTEDG 82h PCL Program Counter’s (PC) Least Significant Byte (1) (1) ...
Page 18
... Digit Borrow out bit, respectively, in subtraction. See the SUBLW and SUBWF instructions for examples. R-1 R Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (ADDWF, ADDLW, SUBLW, SUBWF instructions) R/W-x R/W-x R/W bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 19
... Microchip Technology Inc. Note: To achieve a 1:1 prescaler assignment for Timer0, assign the prescaler to the WDT by setting PSA bit to ‘1’ of the OPTION register. See Section 6.1.3 “Software Programmable Prescaler”. R/W-1 ...
Page 20
... R/W-0 R/W-0 R/W-0 INTE GPIE T0IF U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (1) (2) should ensure the R/W-0 R/W-0 INTF GPIF bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 21
... TMR1IE: Timer1 Overflow Interrupt Enable bit 1 = Enables the Timer1 overflow interrupt 0 = Disables the Timer1 overflow interrupt Note 1: PIC12F615/617/HV615 only. PIC12F609/HV609 unimplemented, read as ‘0’. 2010 Microchip Technology Inc. Note: Bit PEIE of the INTCON register must be set to enable any peripheral interrupt. ...
Page 22
... Timer2 to PR2 match has not occurred bit 0 TMR1IF: Timer1 Overflow Interrupt Flag bit 1 = Timer1 register overflowed (must be cleared in software Timer1 has not overflowed Note 1: PIC12F615/617/HV615 only. PIC12F609/HV609 unimplemented, read as ‘0’. DS41302D-page 22 Note: Interrupt flag bits are set when an interrupt condition occurs, regardless of the state of its corresponding enable bit or the Global Enable bit, GIE of the INTCON register ...
Page 23
... A Power-on Reset occurred (must be set in software after a Power-on Reset occurs) bit 0 BOR: Brown-out Reset Status bit Brown-out Reset occurred Brown-out Reset occurred (must be set in software after a Brown-out Reset occurs) Note 1: Reads as ‘0’ if Brown-out Reset is disabled. 2010 Microchip Technology Inc. U-0 U-0 U-0 — — — ...
Page 24
... P1BSEL: P1B Output Pin Select bit 1 = P1B function is on GP4/AN3/CIN1-/T1G/P1B 0 = P1B function is on GP0/AN0/CIN+/P1B/ICSPDAT bit 0 P1ASEL: P1A Output Pin Select bit 1 = P1A function is on GP5/T1CKI/P1A 0 = P1A function is on GP2/AN2/T0CKI/INT/COUT/CCP1/P1A Note 1: PIC12F615/617/HV615 only. 2: Alternate pin function. DS41302D-page 24 (1) R/W-0 U-0 U-0 T1GSEL — ...
Page 25
... For more information refer to Application Note AN556, “Implementing a Table Read” (DS00556). 2010 Microchip Technology Inc. 2.3.2 STACK The PIC12F609/615/617/12HV609/615 Family has an 8-level x 13-bit wide hardware stack (see Figure 2-1). ...
Page 26
... Note 1: The RP1 and IRP bits are reserved; always maintain these bits clear. 2: Accesses in this area are mirrored back into Bank 0 and Bank 1. DS41302D-page 26 0 IRP Bank Select 180h (2) NOT USED Bank 1 Bank 2 Bank 3 Indirect Addressing ( File Select Register Location Select 1FFh 2010 Microchip Technology Inc. ...
Page 27
... Configuration Word register is enabled, the program memory is code-protected, and the device programmer (ICSP™) cannot access data or program memory. 2010 Microchip Technology Inc. 3.1 PMADRH and PMADRL Registers The PMADRH and PMADRL registers can address maximum of 8K words of program memory. ...
Page 28
... U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared R/W-0 R/W-0 PMDATL1 PMDATL0 bit Bit is unknown R/W-0 R/W-0 PMADRL1 PMADRL0 bit Bit is unknown R/W-0 R/W-0 PMDATH1 PMDATH0 bit Bit is unknown R/W-0 R/W-0 PMADRH1 PMADRH0 bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 29
... Initiates a program memory read (The read takes one cycle. The RD is cleared in hardware; the RD bit can only be set (not cleared) in software Does not initiate a Flash memory read Legend Readable bit W = Writable bit -n = Value at POR 1 = bit is set 2010 Microchip Technology Inc. U-0 U-0 R/W-0 — — WREN U = Unimplemented bit, read as ‘0’ ...
Page 30
... First instruction after BSF PMCON1,RD executes normally NOP ; Any instructions here are ignored as program ; memory is read in second cycle after BSF PMCON1,RD ; BANKSEL PMDATL ; Bank to containing PMADRL MOVF PMDATL Byte of Program PMDATL MOVF PMDATH Byte of Program PMDATL DS41302D-page 30 BSF 2010 Microchip Technology Inc. ...
Page 31
... FLASH PROGRAM MEMORY READ CYCLE EXECUTION Flash ADDR Flash DATA INSTR (PC) INSTR ( BSF PMCON1,RD Executed here Executed here RD bit PMDATH PMDATL Register PMRHLT 2010 Microchip Technology Inc. PMADRH,PMADRL PC+3 INSTR ( PMDATH,PMDATL INSTR ( INSTR ( NOP Executed here Executed here INSTR ( INSTR ( INSTR ( ...
Page 32
... CPU can read and execute from the program memory. The portions of program memory that are write pro- tected can be modified by the CPU using the PMCON registers, but the protected program memory cannot be modified using ICSP mode. 2010 Microchip Technology Inc. ...
Page 33
... INSTR INSTR ignored Flash read ( (PC) DATA BSF PMCON1,WR INSTR ( Executed here Executed here Flash Memory Location WR bit PMWHLT 2010 Microchip Technology Inc PMDATH PMDATL 6 14 PMADRL<1:0> Buffer Register Buffer Register Program Memory PMADRH,PMADRL PMDATH,PMDATL Processor halted PM Write Time Executed here ...
Page 34
... Increment address ANDLW 0x03 ; Indicates when sixteen words have been programmed SUBLW 0x03 ; ; ; ; BTFSS STATUS,Z ; Exit on a match, GOTO LOOP ; Continue if more data needs to be written DS41302D-page 34 Required Sequence 0x0F = 16 words 0x0B = 12 words 0x07 = 8 words 0x03 = 4 words 2010 Microchip Technology Inc. ...
Page 35
... PMDATL PMDATL7 PMDATL6 PMDATL5 PMDATH — — PMDATH5 Legend unknown unchanged, — = unimplemented read as ‘0’ value depends upon condition. Shaded cells are not used by Program Memory module. 2010 Microchip Technology Inc. Bit 4 Bit 3 Bit 2 Bit 1 — — WREN WR PMADRL4 ...
Page 36
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 36 2010 Microchip Technology Inc. ...
Page 37
... MCU CLOCK SOURCE BLOCK DIAGRAM External Oscillator OSC2 Sleep OSC1 Internal Oscillator INTOSC 8 MHz 2010 Microchip Technology Inc. The Oscillator module can be configured in one of eight clock modes – External clock with I/O on OSC2/CLKOUT – 32 kHz Low-Power Crystal mode – Medium Gain Crystal or Ceramic Resonator Oscillator mode ...
Page 38
... These oscillator delays are shown in Table 4-1. Frequency Oscillator Delay 125 kHz to 8 MHz Oscillator Warm-Up Delay (T DC – 20 MHz 2 instruction cycles 32 kHz to 20 MHz 1024 Clock Cycles (OST) (1) ) WARM 2010 Microchip Technology Inc. ...
Page 39
... The value of R varies with the Oscillator mode F selected (typically between 2 M M. 2010 Microchip Technology Inc. Note 1: Quartz crystal characteristics vary according to type, package and manufacturer. The user should consult the manufacturer data sheets for specifications and recommended application ...
Page 40
... The CLKOUT Internal signal may be used to provide a clock for external Clock circuitry, synchronization, calibration, test or other application requirements. In INTOSCIO mode, OSC1/CLKIN and OSC2/CLKOUT are available for general purpose I/O. ) values EXT See Section 12.0 “Special 2010 Microchip Technology Inc. ...
Page 41
... Other (non Power-up) Resets include MCLR Reset and Watchdog Timer Reset during normal operation. 2: See Configuration Word register (Register 12-1) for operation of all register bits. 2010 Microchip Technology Inc. The default value of the OSCTUNE register is ‘0’. The value is a 5-bit two’s complement number. ...
Page 42
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 42 2010 Microchip Technology Inc. ...
Page 43
... GPIO pin is > GPIO pin is < 2010 Microchip Technology Inc. Reading the GPIO register (Register 5-1) reads the status of the pins, whereas writing to it will write to the PORT latch. All write operations are read-modify-write operations. Therefore, a write to a port implies that the port pins are read, this value is modified and then written to the PORT data latch. GP3 reads ‘ ...
Page 44
... Reset. After these resets, the GPIF flag will continue to be set if a mismatch is present. Note change on the I/O pin should occur when any GPIO operation is being executed, then the GPIF interrupt flag may not get set. R/W-1 R/W-1 TRISIO1 TRISIO0 bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 45
... Setting a pin to an analog input automatically disables the digital input circuitry, weak pull-ups, and interrupt-on- change if available. The corresponding TRIS bit must be set to Input mode in order to allow external control of the voltage on the pin. REGISTER 5-4: ANSEL: ANALOG SELECT REGISTER (PIC12F615/617/HV615) U-0 R/W-1 R/W-1 — ...
Page 46
... U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (3) R/W-0 R/W-0 R/W-0 IOC4 IOC3 IOC2 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared R/W-1 R/W-1 WPU1 WPU0 bit Bit is unknown R/W-0 R/W-0 IOC1 IOC0 bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 47
... Figure 5-1 shows the diagram for this pin. The GP1 pin is configurable to function as one of the following: • a general purpose I/O • an analog input for the ADC • an analog inverting input to the comparator • a voltage reference input for the ADC (1) /ICSPDAT • In-Circuit Serial Programming clock Note 1: PIC12F615/617/HV615 only. Analog Input Mode ...
Page 48
... GPIO WR IOC RD IOC ( Interrupt-on- From other Change R GP<5:3, 1:0> pins Write ‘0’ to GBIF Note 1: Comparator mode and ANSEL determines Analog Input mode. 2: Set has priority over Reset. 3: PIC12F615/617/HV615 only. DS41302D-page 48 Note 1: PIC12F615/617/HV615 only. (1) Analog Input Mode C1OE Enable C1OE (1) Analog ...
Page 49
... Figure 5-3 shows the diagram for this pin. The GP3 pin is configurable to function as one of the following: • a general purpose input • a Timer1 gate (count enable), alternate pin • as Master Clear Reset with weak pull-up Note 1: Alternate pin function. 2: PIC12F615/617/HV615 only. FIGURE 5-3: BLOCK DIAGRAM OF GP3 Data Bus RD TRISIO ...
Page 50
... Note 1: CLK modes are XT, HS, LP, TMR1 LP and CLKOUT Enable. 2: With CLKOUT option. 3: Analog Input mode comes from ANSEL. 4: Set has priority over Reset. 5: PIC12F615/617/HV615 only. DS41302D-page 50 • PWM output, alternate pin • a crystal/resonator connection • a clock output Note 1: Alternate pin function. 2: PIC12F615/617/HV615 only. (3) Analog Input Mode CLK Modes ...
Page 51
... FIGURE 5-5: BLOCK DIAGRAM OF GP5 ( Interrupt-on- Change R Write ‘0’ to GBIF Note 1: Timer1 LP Oscillator enabled. 2: Set has priority over Reset. 2010 Microchip Technology Inc. Note 1: Alternate pin function. 2: PIC12F615/617/HV615 only. INTOSC Mode Data Bus WPU GPPU RD WPU Oscillator ...
Page 52
... TICKPS1 (1) CCP1CON P1M — DC1B1 (1) APFCON — — — Legend unknown unchanged, – = unimplemented locations read as ‘0’. Shaded cells are not used by GPIO. Note 1: PIC12F615/617/HV615 only. DS41302D-page 52 Bit 4 Bit 3 Bit 2 Bit 1 (1) (1) (1) ADCS0 ANS3 ANS2 ANS1 CMPOL — CMR — ...
Page 53
... WDTE Timer Note 1: T0SE, T0CS, PSA, PS<2:0> are bits in the OPTION register. 2: WDTE bit is in the Configuration Word register. 2010 Microchip Technology Inc. 6.1 Timer0 Operation When used as a timer, the Timer0 module can be used as either an 8-bit timer or an 8-bit counter. ...
Page 54
... T0CKI input and the Timer0 register is accomplished by sampling the prescaler output on the Q2 and Q4 cycles of the internal phase clocks. Therefore, the high and low periods of the external clock source must meet the timing requirements as shown in Section 16.0 “Electrical Specifications”. 2010 Microchip Technology Inc. ...
Page 55
... TRISIO5 TRISIO4 TRISIO3 TRISIO2 TRISIO1 TRISIO0 --11 1111 Legend: – = Unimplemented locations, read as ‘0’ unchanged unknown. Shaded cells are not used by the Timer0 module. 2010 Microchip Technology Inc. R/W-1 R/W-1 T0SE PSA U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared ...
Page 56
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 56 2010 Microchip Technology Inc. ...
Page 57
... When used with an internal clock source, the module is a timer. When used with an external clock source, the module can be used as either a timer or counter. 2010 Microchip Technology Inc. 7.2 Clock Source Selection The TMR1CS bit of the T1CON register is used to select the clock source ...
Page 58
... GP3/T1G Note 1: ST Buffer is low power type when using LP oscillator, or high speed type when using T1CKI. 2: Timer1 register increments on rising edge. 3: Synchronize does not operate while in Sleep. 4: Alternate pin function. 5: PIC12F615/617/HV615 only. DS41302D-page 58 TMR1ON To Comparator Module Timer1 Clock ( TMR1L 1 (1) ...
Page 59
... In asynchronous counter mode or when using the internal oscillator and T1ACS=1, Timer1 can not be used as a time base for the capture or compare modes of the ECCP module (for PIC12F615/617/ HV615 only). 7.5.1 READING AND WRITING TIMER1 IN ASYNCHRONOUS COUNTER MODE Reading TMR1H or TMR1L while the timer is running from an external asynchronous clock will ensure a valid read (taken care of in hardware) ...
Page 60
... In Compare mode, an event is triggered when the value CCPR1H:CCPR1L register pair matches the value in the TMR1H:TMR1L register pair. This event can be a Special Event Trigger. For more information, see Section 11.0 “Enhanced Capture/Compare/PWM (With Auto-Shutdown and Dead Band) Module (PIC12F615/617/HV615 only)”. 2010 Microchip Technology Inc. ...
Page 61
... Microchip Technology Inc. For more information, see Section 11.0 “Enhanced Capture/Compare/PWM (With Auto-Shutdown and Dead Band) Module (PIC12F615/617/HV615 only)”. 7.11 Comparator Synchronization The same clock used to increment Timer1 can also be used to synchronize the comparator output. This feature is enabled in the Comparator module ...
Page 62
... Timer1 gate source. 3: See T1ACS bit in CMCON1 register. DS41302D-page 62 R/W-0 R/W-0 R/W-0 T1CKPS0 T1OSCEN T1SYNC U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (1) (2) (3) /4) or system clock (F ) OSC R/W-0 R/W-0 TMR1CS TMR1ON bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 63
... Holding Register for the Least Significant Byte of the 16-bit TMR1 Register T1CON T1GINV TMR1GE T1CKPS1 Legend unknown unchanged unimplemented, read as ‘0’. Shaded cells are not used by the Timer1 module. Note 1: PIC12F615/617/HV615 only. 2010 Microchip Technology Inc. Bit 4 Bit 3 Bit 2 Bit 1 T1GSEL — ...
Page 64
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 64 2010 Microchip Technology Inc. ...
Page 65
... PIC12F609/615/617/12HV609/615 8.0 TIMER2 MODULE (PIC12F615/617/HV615 ONLY) The Timer2 module is an 8-bit timer with the following features: • 8-bit timer register (TMR2) • 8-bit period register (PR2) • Interrupt on TMR2 match with PR2 • Software programmable prescaler (1:1, 1:4, 1:16) • Software programmable postscaler (1:1 to 1:16) See Figure 8-1 for a block diagram of Timer2 ...
Page 66
... Holding Register for the 8-bit TMR2 Register (1) T2CON — TOUTPS3 TOUTPS2 Legend unknown unchanged unimplemented read as ‘0’. Shaded cells are not used for Timer2 module. Note 1: For PIC12F615/617/HV615 only. DS41302D-page 66 R/W-0 R/W-0 TOUTPS1 TOUTPS0 TMR2ON U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared Bit 4 ...
Page 67
... GP0/CIN+ 0 MUX FixedRef 1 0 CMV REF MUX CV REF 1 CMV REN Note 2010 Microchip Technology Inc. than the analog voltage at V comparator is a digital low level. When the analog voltage the output of the comparator is a digital high level. IN FIGURE 9-1:SINGLE COMPARATOR ...
Page 68
... Pins configured as digital inputs will convert as an analog input, according to the input specification. and V . The SS and Analog levels on any pin defined digital input, may cause the input buffer to consume more current than is specified. inaccuracies V DD 0. LEAKAGE 0. ±500 Comparator 2010 Microchip Technology Inc. ...
Page 69
... The internal output of the comparator is latched with each instruction cycle. Unless otherwise specified, external outputs are not latched. 2010 Microchip Technology Inc. 9.3.5 COMPARATOR OUTPUT POLARITY Inverting the output of the comparator is functionally equivalent to swapping the comparator inputs. The polarity of the comparator output can be inverted by setting the CMPOL bit of the CMCON0 register ...
Page 70
... Allow about 1 s for bias settling then clear the mismatch condition and interrupt comparator interrupts. COMPARATOR INTERRUPT TIMING W/O CMCON0 READ T RT reset by software COMPARATOR INTERRUPT TIMING WITH CMCON0 READ T RT reset by software an invalid output from the flags before enabling 2010 Microchip Technology Inc. ...
Page 71
... INTCON register is also set, the device will then execute the Interrupt Service Routine. 9.7 Effects of a Reset A device Reset forces the CMCON1 register to its Reset state. This sets the comparator and the voltage reference to the OFF state. 2010 Microchip Technology Inc. “Electrical DS41302D-page 71 ...
Page 72
... Comparator output requires the following three conditions: CMOE = 1, CMON = 1 and corresponding port TRIS bit = 0. DS41302D-page 72 R/W-0 U-0 CMPOL — Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared + > CMV - < CMV - > CMV - < CMV - IN IN (1) output REF R/W-0 U-0 R/W-0 CMR — CMCH bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 73
... Output is synchronized with falling edge of Timer1 clock 0 = Output is asynchronous Note 1: Refer to Section 7.6 “Timer1 Gate”. 2: Refer to Figure 9-2. 2010 Microchip Technology Inc. 9.9 Synchronizing Comparator Output to Timer1 The comparator output can be synchronized with Timer1 by setting the CMSYNC bit of the CMCON1 register ...
Page 74
... When the CMVREN bit is cleared, current flow in the CV voltage divider is disabled minimizing the power REF drain of the voltage reference peripheral. SS module current. REF derived and DD output changes with fluctuations in REF , with DD or fixed REF voltage divider REF voltage for use by the Compar- REF 2010 Microchip Technology Inc. ...
Page 75
... COMPARATOR VOLTAGE REFERENCE BLOCK DIAGRAM CMVREN (1) CV REF To Comparators and ADC Module FixedRef To Comparators and ADC Module Note 1: Care should be taken to ensure CV Section 16.0 “Electrical Specifications” for more detail. 2010 Microchip Technology Inc. 16 Stages Analog MUX 15 0 (1) VR<3:0> 0.6V Fixed Voltage Reference remains within the comparator common mode input range ...
Page 76
... Comparator REF input of the Comparator REF (2) Value Selection bits (0 VR<3:0> 15) REF = (VR<3:0>/24 (VR<3:0>/32 circuit is powered down and does not contribute to I REF R/W-0 R/W-0 VR2 VR1 VR0 bit Bit is unknown current. DD 2010 Microchip Technology Inc. ...
Page 77
... Hysteresis) Note: The black areas of the comparator output represents the uncertainty due to input offsets and response time. 2010 Microchip Technology Inc. Figure 9-7 shows the relationship between the analog input levels and digital output of a comparator with and without hysteresis. The output of the comparator ...
Page 78
... TRISIO — — TRISIO5 VRCON CMVREN — VRR Legend: = unknown, = unchanged, = unimplemented, read as ‘0’. Shaded cells are not used for comparator. Note 1: For PIC12F615/617/HV615 only. DS41302D-page 78 Bit 4 Bit 3 Bit 2 Bit 1 (1) (1) (1) ADCS0 ANS3 ANS2 ANS1 CMPOL — CMR — ...
Page 79
... PIC12F609/615/617/12HV609/615 10.0 ANALOG-TO-DIGITAL CONVERTER (ADC) MODULE (PIC12F615/617/HV615 ONLY) The Analog-to-Digital Converter conversion of an analog input signal to a 10-bit binary representation of that signal. This device uses analog inputs, which are multiplexed into a single sample and hold circuit. The output of the sample and hold is connected to the input of the converter ...
Page 80
... Section 16.0 “Electrical Specifications” for more information. Table 10-1 gives examples of appropriate ADC clock selections. Note: Unless using the F , any changes in the RC system clock frequency will change the ADC clock frequency, adversely affect the ADC result. 2010 Microchip Technology Inc. periods AD specification AD which may ...
Page 81
... Sleep and resume in-line code execution, the global interrupt must be disabled. If the global interrupt is enabled, execution will switch to the Interrupt Service Routine. Please see Section 10.1.5 “Interrupts” for more information. 2010 Microchip Technology Inc DEVICE OPERATING FREQUENCIES (VDD > 3.0V Device Frequency (F ...
Page 82
... Using the Special Event Trigger does not assure proper ADC timing the user’s responsibility to ensure that the ADC timing requirements are met. See Section 11.0 “Enhanced Capture/Compare/ PWM (With Auto-Shutdown and Dead Band) Module (PIC12F615/617/HV615 only)” for more information. ADRESL bit 0 Unimplemented: Read as ‘0’ ...
Page 83
... Note 1: The global interrupt can be disabled if the user is attempting to wake-up from Sleep and resume in-line code execution. 2: See Section 10.3 “A/D Acquisition Requirements”. 2010 Microchip Technology Inc. EXAMPLE 10-1: ;This code block configures the ADC ;for polling, Vdd reference, Frc clock ;and GP0 input. ...
Page 84
... If the Comparator module uses this 0.6V reference voltage, the comparator output may momentarily change state due to the transient. DS41302D-page 84 R/W-0 R/W-0 R/W-0 CHS2 CHS1 CHS0 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared R/W-0 R/W-0 GO/DONE ADON bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 85
... Legend Readable bit W = Writable bit -n = Value at POR ‘1’ = Bit is set bit 7-0 ADRES<7:0>: ADC Result Register bits Lower 8 bits of 10-bit conversion result 2010 Microchip Technology Inc. R-x R-x R-x ADRES6 ADRES5 ADRES4 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared ...
Page 86
... HOLD 5. Temperature Coefficient charged to within 1/2 lsb CHOLD charge response to V CHOLD APPLIED 2010 Microchip Technology Inc. ...
Page 87
... R = Interconnect Resistance Sampling Switch C = Sample/Hold Capacitance HOLD FIGURE 10-5: ADC TRANSFER FUNCTION 3FFh 3FEh 3FDh 3FCh 3FBh 004h 003h 002h 001h 000h REF 2010 Microchip Technology Inc Sampling Switch V = 0.6V T Rss LEAKAGE V = 0.6V T ± 500 Full-Scale Range ...
Page 88
... CCP1IE (1) PIR1 — ADIF CCP1IF TRISIO — — TRISIO5 Legend unknown unchanged, — = unimplemented read as ‘0’. Shaded cells are not used for ADC module. Note 1: For PIC12F615/617/HV615 only. 2: Read Only Register. DS41302D-page 88 Bit 4 Bit 3 Bit 2 Bit 1 CHS2 CHS1 CHS0 GO/DONE (1) ...
Page 89
... PIC12F609/615/617/12HV609/615 11.0 ENHANCED CAPTURE/ COMPARE/PWM (WITH AUTO- SHUTDOWN AND DEAD BAND) MODULE (PIC12F615/617/ HV615 ONLY) The Enhanced Capture/Compare/PWM module is a peripheral which allows the user to time and control different events. In Capture mode, the peripheral allows the timing of the duration of an event.The ...
Page 90
... NEW_CAPT_PS ;Load the W reg with CCPR1L MOVWF CCP1CON TMR1L of the CCP1CON register. CHANGING BETWEEN CAPTURE PRESCALERS ;Set Bank bits to point ;to CCP1CON ;Turn CCP module off ; the new prescaler ; move value and CCP ON ;Load CCP1CON with this ; value 2010 Microchip Technology Inc. ...
Page 91
... Holding Register for the Most Significant Byte of the 16-bit TMR1 Register TRISIO — — TRISIO5 Legend Unimplemented locations, read as ‘0’ unchanged unknown. Shaded cells are not used by the Capture. Note 1: For PIC12F615/617/HV615 only. 2010 Microchip Technology Inc. Bit 4 Bit 3 Bit 2 Bit 1 DC1B0 ...
Page 92
... CCPR1H and CCPR1L register pair, between the clock edge that generates the Special Event Trigger and the clock edge that generates the Timer1 Reset, will preclude the Reset from occurring. the match condition by 2010 Microchip Technology Inc. ...
Page 93
... Holding Register for the Most Significant Byte of the 16-bit TMR1 Register TMR2 Timer2 Module Register TRISIO — — TRISIO5 Legend Unimplemented locations, read as ‘0’ unchanged unknown. Shaded cells are not used by the Compare. Note 1: For PIC12F615/617/HV615 only. 2010 Microchip Technology Inc. Bit 4 Bit 3 Bit 2 Bit 1 DC1B0 CCP1M3 CCP1M2 ...
Page 94
... In PWM mode, CCPR1H is a read-only register. DS41302D-page 94 The PWM output (Figure 11-4) has a time base (period) and a time that the output stays high (duty cycle). FIGURE 11-4: Period Pulse Width TMR2 = 0 CCP1 TRIS ), or OSC CCP PWM OUTPUT TMR2 = PR2 TMR2 = CCPRxL:CCPxCON<5:4> 2010 Microchip Technology Inc. ...
Page 95
... PWM Frequency 1.22 kHz Timer Prescale (1, 4, 16) 16 PR2 Value 0x65 Maximum Resolution (bits) 8 2010 Microchip Technology Inc. EQUATION 11-2: Pulse Width EQUATION 11-3: OSC Duty Cycle Ratio The CCPR1H register and a 2-bit internal latch are used to double buffer the PWM duty cycle. This double buffering is essential for glitchless PWM operation ...
Page 96
... Enable Timer2 by setting the TMR2ON bit of the T2CON register. 6. Enable PWM output after a new PWM cycle has started: • Wait until Timer2 overflows (TMR2IF bit of the PIR1 register is set). • Enable the CCP1 pin output driver by clearing the associated TRIS bit. 2010 Microchip Technology Inc. ...
Page 97
... EXAMPLE PIN ASSIGNMENTS FOR VARIOUS PWM ENHANCED MODES ECCP Mode Single Half-Bridge 2010 Microchip Technology Inc. The PWM outputs are multiplexed with I/O pins and are designated P1A and P1B. The polarity of the PWM pins is configurable and is selected by setting the CCP1M bits in the CCP1CON register appropriately ...
Page 98
... Delay = (PWM1CON<6:0>) OSC Note 1: Dead-band delay is programmed using the PWM1CON register (Section 11.4.6 “Programmable Dead-Band Delay mode”). P1D Modulated DS41302D-page 98 Pulse 0 Width Period (1) (1) Delay Delay Pulse 0 Width Period (1) (1) Delay Delay 2010 Microchip Technology Inc. PR2+1 PR2+1 ...
Page 99
... Standard Half-Bridge Circuit (“Push-Pull”) Half-Bridge Output Driving a Full-Bridge Circuit P1A P1B 2010 Microchip Technology Inc. Since the P1A and P1B outputs are multiplexed with the PORT data latches, the associated TRIS bits must be cleared to configure P1A and P1B as outputs. ...
Page 100
... When the device is placed in sleep, the allocated timer will not increment and the state of the module will not change. If the CCP1 pin is driving a value, it will continue to drive that value. When the device wakes up, it will continue from this state. DS41302D-page 100 2010 Microchip Technology Inc. ...
Page 101
... From Comparator 001 000 2010 Microchip Technology Inc. A shutdown condition is indicated by the ECCPASE (Auto-Shutdown Event Status) bit of the ECCPAS register. If the bit is a ‘0’, the PWM pins are operating normally. If the bit is a ‘1’, the PWM outputs are in the shutdown state ...
Page 102
... PWM signal will always restart at the beginning of the next PWM period. DS41302D-page 102 R/W-0 R/W-0 R/W-0 ECCPAS0 PSSAC1 PSSAC0 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (1) condition R/W-0 R/W-0 PSSBD1 PSSBD0 bit Bit is unknown 2010 Microchip Technology Inc. ...
Page 103
... FIGURE 11-12: PWM AUTO-SHUTDOWN WITH AUTO-RESTART ENABLED (PRSEN = 1) Shutdown Event ECCPASE bit PWM Activity Start of PWM Period 2010 Microchip Technology Inc. PWM Period Shutdown Shutdown Event Occurs Event Clears PWM Period Shutdown Shutdown Event Occurs Event Clears ...
Page 104
... P1B ( Dead-Band Delay Note 1: At this time, the TMR2 register is equal to the PR2 register. 2: Output signals are shown as active-high OSC V+ FET Driver P1A FET Driver P1B V- EXAMPLE OF HALF- BRIDGE PWM OUTPUT Period Period td (1) ( Load + V - 2010 Microchip Technology Inc. ...
Page 105
... TMR2 Timer2 Module Register TRISIO — — TRISIO5 Legend Unimplemented locations, read as ‘0’ unchanged unknown. Shaded cells are not used by the PWM. Note 1: For PIC12F615/617/HV615 only. 2010 Microchip Technology Inc. R/W-0 R/W-0 R/W-0 PDC4 PDC3 PDC2 U = Unimplemented bit, read as ‘0’ ...
Page 106
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 106 2010 Microchip Technology Inc. ...
Page 107
... The INTOSC option saves system cost while the LP crystal option saves power. A set of Configuration bits are used to select various options (see Register 12-1). 2010 Microchip Technology Inc. 12.1 Configuration Bits The Configuration bits can be programmed (read as ‘ ...
Page 108
... When MCLR is asserted in INTOSC or RC mode, the internal clock oscillator is disabled. DS41302D-page 108 R/P-1 R/P-1 R/P-1 R/P-1 R/P-1 (1) (2) (3) IOSCFS CP MCLRE PWRTE WDTE FOSC2 FOSC1 FOSC0 P = Programmable ‘0’ = Bit is cleared (1) (3) DD R/P-1 R/P-1 R/P-1 R/P-1 bit Unimplemented bit, read as ‘0’ Bit is unknown 2010 Microchip Technology Inc. ...
Page 109
... I/O function on RA4/AN3/T1G/OSC2/CLKOUT RA5/T1CKI/OSC1/CLKIN 111 =EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT RA5/T1CKI/OSC1/CLKIN Note 1:Enabling Brown-out Reset does not automatically enable the Power-up Timer (PWRT). Legend Readable bit W = Writable bit -n = Value at POR 1 = bit is set 2010 Microchip Technology Inc. R/P-1 R/P-1 R/P-1 R/P-1 R/P-1 CP MCLRE ...
Page 110
... A simplified block diagram of the On-Chip Reset Circuit is shown in Figure 12-1. The MCLR Reset path has a noise filter to detect and ignore small pulses. See Section 16.0 “Electrical Specifications” for pulse-width specifications. Enable PWRT Enable OST S Chip_Reset R Q 2010 Microchip Technology Inc. ...
Page 111
... MCLRE bit in the Configuration Word register. When MCLRE = 0, the Reset signal to the chip is generated internally. When the MCLRE = 1, the GP3/MCLR pin becomes an external Reset input. In this mode, the GP3/MCLR pin has a weak pull- 2010 Microchip Technology Inc. FIGURE 12- This DD DD ...
Page 112
... Brown-out Reset and the Power-up Timer will be re-initialized. Once V rises above V BOR 64 ms Reset. DD falls & rises DD while the Power-up Timer is BOR DD , the Power-up Timer will execute a V BOR V BOR V BOR 2010 Microchip Technology Inc. ...
Page 113
... Legend unchanged unknown, – = unimplemented bit, reads as ‘0’ value depends on condition. Shaded cells are not used by BOR. Note 1: Other (non Power-up) Resets include MCLR Reset and Watchdog Timer Reset during normal operation. 2010 Microchip Technology Inc. 12.3.6 POWER CONTROL (PCON) REGISTER ...
Page 114
... TIME-OUT SEQUENCE ON POWER-UP (DELAYED MCLR): CASE MCLR Internal POR PWRT Time-out OST Time-out Internal Reset FIGURE 12-6: TIME-OUT SEQUENCE ON POWER-UP (MCLR WITH MCLR Internal POR PWRT Time-out OST Time-out Internal Reset DS41302D-page 114 T PWRT T OST T PWRT T OST ) DD T PWRT T OST 2010 Microchip Technology Inc. ...
Page 115
... When the wake-up is due to an interrupt and the GIE bit is set, the PC is loaded with the interrupt vector (0004h). 4: See Table 12-6 for Reset value for specific condition Reset was due to brown-out, then bit All other Resets will cause bit 2010 Microchip Technology Inc. Wake-up from Sleep through MCLR Reset WDT Reset Wake-up from Sleep through (1) ...
Page 116
... PIC12F609/615/617/12HV609/615 TABLE 12-5: INITIALIZATION CONDITION FOR REGISTERS (PIC12F615/617/HV615) Register Address Power-on Reset W — xxxx xxxx INDF 00h/80h xxxx xxxx TMR0 01h xxxx xxxx PCL 02h/82h 0000 0000 STATUS 03h/83h 0001 1xxx FSR 04h/84h xxxx xxxx GPIO 05h --x0 x000 PCLATH 0Ah/8Ah ---0 0000 ...
Page 117
... PIC12F609/615/617/12HV609/615 TABLE 12-5: INITIALIZATION CONDITION FOR REGISTERS (CONTINUED)(PIC12F615/617/HV615) Register Address Power-on Reset (6) PMADRH 9Bh ---- -000 (6) PMDATL 9Ch 0000 0000 (6) PMDATH 9Dh --00 0000 (1) ADRESL 9Eh xxxx xxxx ANSEL 9Fh -000 1111 Legend unchanged unknown, – = unimplemented bit, reads as ‘0’ value depends on condition. ...
Page 118
... A/D Interrupt (PIC12F615/617/HV615 only) • Timer1 Overflow Interrupt • Timer2 Match Interrupt (PIC12F615/617/HV615 only) • Enhanced CCP Interrupt (PIC12F615/617/HV615 only) • Flash Memory Self Write (PIC12F617 only) The Interrupt Control register (INTCON) and Peripheral Interrupt Request Register 1 (PIR1) record individual interrupt requests in flag bits ...
Page 119
... ADIF (615/617 only) ADIE CCP1IF (615/617 only) CCP1IE 2010 Microchip Technology Inc. 12.4.3 GPIO INTERRUPT-ON-CHANGE An input change on GPIO sets the GPIF bit of the INTCON register. The interrupt can be enabled/ disabled by setting/clearing the GPIE bit of the INTCON register. Plus, individual pins can be configured through the IOC register ...
Page 120
... IOC5 (1) (1) PIR1 — ADIF CCP1IF (1) (1) PIE1 — ADIE CCP1IE Legend unknown unchanged, – = unimplemented read as ‘0’ value depends upon condition. Shaded cells are not used by the interrupt module. Note 1: PIC12F615/617/HV615 only. DS41302D-page 120 (1) (2) Interrupt Latency Inst ( — ...
Page 121
... The WDT can be permanently disabled by program- ming the Configuration bit, WDTE, (Section 12.1 “Configuration Bits”). 2010 Microchip Technology Inc. and 12.6.1 WDT PERIOD The WDT has a nominal time-out period (with no prescaler). The time-out periods vary with temperature, V and process variations from part to DD part (see DC specs) ...
Page 122
... FOSC1 Data Bus 8 SYNC 2 TMR0 Cycles Set Flag bit T0IF on Overflow WDT Time-Out WDT Cleared Cleared until the end of OST Value on Value on Bit 0 all other POR, BOR Resets PS0 1111 1111 1111 1111 FOSC0 — — 2010 Microchip Technology Inc. ...
Page 123
... External Interrupt from INT pin. Other peripherals cannot generate interrupts since during Sleep, no on-chip clocks are present. 2010 Microchip Technology Inc. When the SLEEP instruction is being executed, the next instruction ( prefetched. For the device to wake-up through an interrupt event, the corresponding interrupt enable bit must be set (enabled) ...
Page 124
... Program/Verify mode. Only the Least Significant 7 bits of the ID locations are used. DS41302D-page 124 OST (2) T (3) Interrupt Latency Processor in Sleep Inst( Inst( Dummy Cycle not been for more 0004h 0005h Inst(0004h) Inst(0005h) Dummy Cycle Inst(0004h) 2010 Microchip Technology Inc. ...
Page 125
... GP1 becomes the programming clock. Both GP0 and GP1 are Schmitt Trigger inputs in Program/Verify mode. A typical In-Circuit Serial Programming connection is shown in Figure 12-10. FIGURE 12-10: TYPICAL IN-CIRCUIT SERIAL PROGRAMMING CONNECTION To Normal Connections External PIC12F617/ Connector * PIC12F615/12HV615 Signals PIC12F609/12HV609 + MCLR/V PP GP1 CLK Data I/O ...
Page 126
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 126 2010 Microchip Technology Inc. ...
Page 127
... See Figure 13-1 for voltage regulator schematic. FIGURE 13-1: VOLTAGE REGULATOR V UNREG R I SER SUPPLY I SHUNT C Feedback BYPASS Device 2010 Microchip Technology Inc. An external current limiting resistor, R between the unregulated supply, V pin, drops the difference in voltage between V and SER defined by Equation 13- EQUATION 13-1: supply current R MAX ...
Page 128
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 128 2010 Microchip Technology Inc. ...
Page 129
... For example, a CLRF GPIO instruction will read GPIO, clear all the data bits, then write the result back to GPIO. This example would have the unintended consequence of clearing the condition that set the GPIF flag. 2010 Microchip Technology Inc. TABLE 14-1: OPCODE FIELD DESCRIPTIONS Field ...
Page 130
... TO, PD 0000 0110 0100 1kkk kkkk kkkk Z 1000 kkkk kkkk 00xx kkkk kkkk 0000 0000 1001 01xx kkkk kkkk 0000 0000 1000 TO, PD 0000 0110 0011 C, DC, Z 110x kkkk kkkk Z 1010 kkkk kkkk 2010 Microchip Technology Inc. ...
Page 131
... Status Affected: Z Description: AND the W register 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’. 2010 Microchip Technology Inc. BCF Syntax: k Operands: Operation: Status Affected: ...
Page 132
... Operands: d [0,1] ( (destination) Operation: Status Affected: Z Description: Decrement 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’. 2010 Microchip Technology Inc. ...
Page 133
... Description: The contents of register ‘f’ are incremented. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. 2010 Microchip Technology Inc. INCFSZ Increment f, Skip if 0 Syntax: [ label ] INCFSZ f,d 0 ...
Page 134
... Move label ] MOVWF f 0 f 127 (W) (f) None Move data from W register to register ‘f’ MOVW OPTION F Before Instruction OPTION = 0xFF W = 0x4F After Instruction OPTION = 0x4F W = 0x4F No Operation [ label ] NOP None No operation None No operation NOP 2010 Microchip Technology Inc. ...
Page 135
... Interrupt Enable bit, GIE (INT- CON<7>). This is a two-cycle instruction. Words: 1 Cycles: 2 Example: RETFIE After Interrupt PC = TOS GIE = 1 2010 Microchip Technology Inc. RETLW Return with literal in W Syntax: [ label ] RETLW k 0 k 255 Operands: k (W); Operation: TOS PC Status Affected: None Description: The W register is loaded with the eight-bit literal ‘ ...
Page 136
... SUBLW k 0 k 255 k - (W) W) The W register is subtracted (2’s complement method) from the eight-bit literal ‘k’. The result is placed in the W register. Result Condition W W<3:0> k<3:0> W<3:0> k<3:0> 2010 Microchip Technology Inc. ...
Page 137
... Operation: Status Affected: Z Description: The contents of the W register are XOR’ed with the eight-bit literal ‘k’. The result is placed in the W register. 2010 Microchip Technology Inc. XORWF Exclusive OR W with f Syntax: [ label ] XORWF 0 f 127 Operands: d [0,1] (W) .XOR. (f) destination) ...
Page 138
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 138 2010 Microchip Technology Inc. ...
Page 139
... PICkit™ 3 Debug Express • Device Programmers - PICkit™ 2 Programmer - MPLAB PM3 Device Programmer • Low-Cost Demonstration/Development Boards, Evaluation Kits, and Starter Kits 2010 Microchip Technology Inc. 15.1 MPLAB Integrated Development Environment Software ® digital signal The MPLAB IDE software brings an ease of software development previously unseen in the 8/16/32-bit microcontroller market ...
Page 140
... Support for the entire device instruction set ® standard HEX • Support for fixed-point and floating-point data • Command line interface • Rich directive set • Flexible macro language • MPLAB IDE compatibility 2010 Microchip Technology Inc. ...
Page 141
... Microchip Technology Inc. 15.9 MPLAB ICD 3 In-Circuit Debugger System MPLAB ICD 3 In-Circuit Debugger System is Micro- chip's most cost effective high-speed hardware ...
Page 142
... This usually includes a single application and debug capability, all for DDMAX on one board. Check the Microchip web page (www.microchip.com) for the complete list of demonstration, development and evaluation kits. ® L security ICs, CAN ® 2010 Microchip Technology Inc. ...
Page 143
... 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 above maximum rating conditions for extended periods may affect device reliability. 2010 Microchip Technology Inc. ........................................................................... -0. ) ...
Page 144
... Note 1: The shaded region indicates the permissible combinations of voltage and frequency. FIGURE 16-2: PIC12HV609/615 VOLTAGE-FREQUENCY GRAPH, -40°C T +125°C A 5.0 4.5 4.0 3.5 3.0 2.5 2.0 0 Note 1: The shaded region indicates the permissible combinations of voltage and frequency. DS41302D-page 144 8 10 Frequency (MHz Frequency (MHz 2010 Microchip Technology Inc. ...
Page 145
... Note 1: This is the limit to which User defined. Voltage across the shunt regulator should not exceed 5V. 2010 Microchip Technology Inc. Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C T -40°C T Min Typ† Max Units 2.0 — ...
Page 146
... OSC LP Oscillator mode MHz OSC XT Oscillator mode MHz OSC XT Oscillator mode MHz OSC EC Oscillator mode MHz OSC EC Oscillator mode MHz OSC INTOSC mode MHz OSC INTOSC mode MHz OSC (3) EXTRC mode MHz OSC HS Oscillator mode 2010 Microchip Technology Inc. ...
Page 147
... For RC oscillator configurations, current through R be extended by the formula I 2010 Microchip Technology Inc. -40°C T +85°C for industrial A -40°C T ...
Page 148
... T1OSC disabled 40°C T +25°C for industrial - A (1) WDT Current (1) BOR Current (1) Comparator Current , single comparator enabled (1) CV Current (high range) REF (1) CV Current (low range) REF (1) T1OSC Current , 32.768 kHz (1) A/D Current , no conversion in progress 2010 Microchip Technology Inc. ...
Page 149
... 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 high-impedance state and tied to V 2010 Microchip Technology Inc. Standard Operating Conditions (unless otherwise stated) -40°C T ...
Page 150
... Conditions Note WDT, BOR, Comparator, V and REF T1OSC disabled (1) WDT Current (1) BOR Current (1) Comparator Current , single comparator enabled (1) CV Current (high range) REF (1) CV Current (low range) REF (1) T1OSC Current , 32.768 kHz (1) A/D Current , no conversion in progress 2010 Microchip Technology Inc. ...
Page 151
... 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 high-impedance state and tied Shunt regulator is always on and always draws operating current. 2010 Microchip Technology Inc. -E (Extended) -40°C T +125°C for extended ...
Page 152
... V SS PIN DD A V XT, HS and SS PIN DD LP oscillator configuration 5.0V PIN 7.0 mA 4.5V -40°C to +125° 8.5 mA 4.5V -40°C to +85° -2.5mA 4.5V -40°C to +125° -3.0 mA 4.5V -40°C to +85°C 2010 Microchip Technology Inc. ...
Page 153
... This specification applies to all weak pull-up pins, including the weak pull-up found on GP3/MCLR. When GP3/MCLR is configured as MCLR reset pin, the weak pull-up is always enabled. 6: Applies to PIC12F617 only. 2010 Microchip Technology Inc. PIC12F609/615/617/12HV609/615-I (Industrial) PIC12F609/615/617/12HV609/615-E (Extended) (Continued) Standard Operating Conditions (unless otherwise stated) -40° ...
Page 154
... PDIP package 39.9* C/W 8-pin SOIC package 39* C/W 8-pin MSOP package 9* C/W 8-pin DFN 3x3mm package 3.0* C/W 8-pin DFN 4x4mm package 150* C — INTERNAL — INTERNAL DD (NOTE 1) = (I — — DER MAX DIE (NOTE 2) 2010 Microchip Technology Inc )/ ...
Page 155
... I/O Port mc MCLR Uppercase letters and their meanings Fall H High I Invalid (High-impedance) L Low FIGURE 16-3: LOAD CONDITIONS Load Condition Pin Legend: C =50 pF for all pins for OSC2 output 2010 Microchip Technology Inc. T Time osc OSC1 SCK T0CKI t1 T1CKI Period R Rise V ...
Page 156
... LP Oscillator mode ns XT Oscillator mode ns HS Oscillator mode ns EC Oscillator mode s LP Oscillator mode ns XT Oscillator mode ns HS Oscillator mode ns RC Oscillator mode 4/F CY OSC s LP oscillator ns XT oscillator ns HS oscillator ns LP oscillator ns XT oscillator ns HS oscillator 2010 Microchip Technology Inc. ...
Page 157
... When an external clock input is used, the “max” cycle time limit is “DC” (no clock) for all devices ensure these oscillator frequency tolerances, V possible. 0.1 F and 0.01 F values in parallel are recommended design. 2010 Microchip Technology Inc. Freq. Min Typ† Max Units Tolerance — ...
Page 158
... OSC — — (Q2 cycle) 20 — OSC (2) — 15 — 40 (2) — 28 — — T — CY OSC Execute Q3 OS12 OS18 New Value Max Units Conditions 5. 5. — 5.0V DD — 5.0V DD — 5.0V DD — ns — 2010 Microchip Technology Inc. ...
Page 159
... Asserted low. FIGURE 16-7: BROWN-OUT RESET TIMING AND CHARACTERISTICS BOR (Device in Brown-out Reset) Reset (due to BOR delay only if PWRTE bit in the Configuration Word register is programmed to ‘0’. 2010 Microchip Technology Inc BOR 37 33 HYST (Device not in Brown-out Reset) DS41302D-page 159 ...
Page 160
... All specified values and V must be capacitively decoupled as close to the device DD SS Conditions 5V, -40°C to +85°C DD 5V, -40°C to +125° 5V, -40°C to +85° 5V, -40°C to +125° (NOTE 3) OSC ms s V (NOTE 4) mV s BOR 2010 Microchip Technology Inc. ...
Page 161
... Delay from External Clock Edge to Timer TMR Increment * These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested. 2010 Microchip Technology Inc Min Typ† ...
Page 162
... PIC12F609/615/617/12HV609/615 FIGURE 16-9: PIC12F615/617/HV615 CAPTURE/COMPARE/PWM TIMINGS (ECCP) CCP1 (Capture mode) Note: Refer to Figure 16-3 for load conditions. TABLE 16-6: PIC12F615/617/HV615 CAPTURE/COMPARE/PWM REQUIREMENTS (ECCP) Standard Operating Conditions (unless otherwise stated) -40°C T Operating Temperature A Param Sym Characteristic No. CC01* TccL CCP1 Input Low Time ...
Page 163
... SHUNT SR03* T Settling Time SETTLE SR04 C Load Capacitance LOAD I SR05 Regulator operating current SNT * These parameters are characterized but not tested. 2010 Microchip Technology Inc. ) SPECIFICATIONS REF +125°C Min Typ† Max — V /24 — DD — V /32 — ...
Page 164
... PIC12F609/615/617/12HV609/615 TABLE 16-11: PIC12F615/617/HV615 A/D CONVERTER (ADC) CHARACTERISTICS: Standard Operating Conditions (unless otherwise stated) -40°C T Operating temperature A Param Sym Characteristic No. AD01 N Resolution R AD02 E Integral Error IL AD03 E Differential Error DL AD04 E Offset Error OFF AD07 E Gain Error GN (3) AD06 V Reference Voltage REF ...
Page 165
... ADRESH and ADRESL registers may be read on the following T 2: See Section 10.3 “A/D Acquisition Requirements” for minimum conditions. 3: Full range for PIC12HV609/HV615 powered by the shunt regulator is the 5V regulated voltage. FIGURE 16-10: PIC12F615/617/HV615 A/D CONVERSION TIMING (NORMAL MODE) BSF ADCON0, GO AD134 (T OSC Q4 ...
Page 166
... PIC12F609/615/617/12HV609/615 FIGURE 16-11: PIC12F615/617/HV615 A/D CONVERSION TIMING (SLEEP MODE) BSF ADCON0, GO AD134 ( OSC Q4 A/D CLK A/D Data ADRES ADIF GO AD132 Sample Note 1: If the A/D clock source is selected as RC, a time of T SLEEP instruction to be executed. DS41302D-page 166 ( AD131 AD130 OLD_DATA Sampling Stopped is added before the A/D clock starts ...
Page 167
... PIC12F609/615/617/12HV609/615 16.12 High Temperature Operation This section outlines the specifications for the PIC12F615 device operating in a temperature range (4) between -40°C and 150°C. The specifications (4) between -40°C and 150°C are identical to those shown in DS41288 and DS80329. Note 1: Writes are not allowed for Flash Program Memory above 125° ...
Page 168
... Supply Current ( D011 A D012 A mA D013 A D014 A mA D016 A A D017 mA D018 A D019 mA DS41302D-page 168 SPECIFICATIONS FOR PIC12F615-H (High Temp.) DD Min Typ Max V DD — 2.0 — 3.0 — 5.0 — 135 316 2.0 — 185 400 3 ...
Page 169
... D023E A A D024E A D025E A D026E A D027E A TABLE 16-16: WATCHDOG TIMER SPECIFICATIONS FOR PIC12F615-H (High Temp.) Param Sym Characteristic No Watchdog Timer Time-out Period WDT (No Prescaler) TABLE 16-17: LEAKAGE CURRENT SPECIFICATIONS FOR PIC12F615-H (High Temp.) Param Sym Characteristic No ...
Page 170
... Int. Calibrated INTOSC OSC (1) Freq. Note 1: To ensure these oscillator frequency tolerances, Vdd and Vss must be capacitively decoupled as close to the device as possible. 0.1 µF and 0.01 µF values in parallel are recommended. TABLE 16-19: COMPARATOR SPECIFICATIONS FOR PIC12F615-H (High Temp.) Param Sym Characteristic No. CM01 V ...
Page 171
... Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125° FIGURE 17-2: PIC12F609/615/617 I 600 Typical: Statistical Mean @25°C 500 Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 400 300 200 100 2010 Microchip Technology Inc. LP (32 kHz MHz) vs (V) DD Maximum Typical 5 6 Maximum Typical ...
Page 172
... PIC12F609/615/617 I 1200 Typical: Statistical Mean @25°C 1000 Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 800 600 400 200 0 1 DS41302D-page 172 EC (4 MHz MHz MHz) vs (V) DD Maximum Typical 5 6 Maximum Typical 5 6 Maximum Typical 5 6 2010 Microchip Technology Inc. ...
Page 173
... FIGURE 17-7: PIC12F609/615/617 I 1800 Typical: Statistical Mean @25°C 1600 Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 1400 1200 1000 800 600 400 200 0 1 2010 Microchip Technology Inc. INTOSC (4 MHz) vs (V) DD INTOSC (8 MHz) vs (V) DD Maximum Typical ...
Page 174
... FIGURE 17-9: PIC12F609/615/617 I Typical: Statistical Mean @25°C Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) DS41302D-page 174 EXTRC (4 MHz (20 MHz) vs Maximum Typical 6 5 Maximum Typical 6 5 (V) 2010 Microchip Technology Inc. ...
Page 175
... Extended: Mean (Worst-Case Temp) + 3 7 (-40°C to 125° FIGURE 17-11: PIC12F609/615/617 2010 Microchip Technology Inc. BASE vs (V) DD COMPARATOR (SINGLE ON) vs Typical: Statistical Mean @25°C Industrial: Mean (Worst-Case Temp) + 3 (-40°C to 85°C) Extended: Mean (Worst-Case Temp) + 3 (-40°C to 125° (V) DD Extended Industrial ...
Page 176
... PIC12F609/615/617 I 20 Typical: Statistical Mean @25°C Industrial: Mean (Worst-Case Temp (-40°C to 85°C) Extended: Mean (Worst-Case Temp (-40°C to 125° DS41302D-page 176 WDT vs (V) DD BOR vs (V) DD Extended Industrial Typical 6 5 Extended Industrial Typical 5 6 2010 Microchip Technology Inc. ...
Page 177
... FIGURE 17-15: PIC12F609/615/617 I 120 Typical: Statistical Mean @25°C Industrial: Mean (Worst-Case Temp 100 (-40°C to 85°C) Extended: Mean (Worst-Case Temp (-40°C to 125° 2010 Microchip Technology Inc. CV (LOW RANGE) vs REF DD ( (HI RANGE) vs REF DD VDD (V) Maximum Typical ...
Page 178
... Industrial: Mean (Worst-Case Temp) + 3 (-40°C to 85°C) Extended: Mean (Worst-Case Temp) + 3 20 (-40°C to 125° FIGURE 17-17: PIC12F615/617 I 14 Typical: Statistical Mean @25°C Industrial: Mean (Worst-Case Temp) + 3 12 (-40°C to 85°C) Extended: Mean (Worst-Case Temp) + 3 10 (-40°C to 125° ...
Page 179
... FIGURE 17-20: PIC12HV609/615 I 1400 Typical: Statistical Mean @25°C 1200 Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 1000 800 600 400 200 0 1 2010 Microchip Technology Inc. LP (32 kHz MHz MHz) vs ...
Page 180
... Typical: Statistical Mean @25°C 1000 Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 800 600 400 200 0 1 DS41302D-page 180 XT (1 MHz MHz) vs (V) DD INTOSC (4 MHz) vs (V) DD Maximum Typical 5 4 Maximum Typical 5 4 Maximum Typical 5 4 2010 Microchip Technology Inc. ...
Page 181
... FIGURE 17-26: PIC12HV609/615 I 400 Typical: Statistical Mean @25°C 350 Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 300 250 200 150 100 2010 Microchip Technology Inc. INTOSC (8 MHz) vs (V) DD EXTRC (4 MHz) vs (V) DD BASE vs ...
Page 182
... Typical: Statistical Mean @25°C Maximum: Mean (Worst-Case Temp) + 3 350 (-40°C to 125°C) 300 250 200 150 100 2 DS41302D-page 182 COMPARATOR (SINGLE ON) vs (V) DD WDT vs (V) DD BOR vs ( Maximum Typical 5 4 Maximum Typical 5 4 Maximum Typical 4 5 2010 Microchip Technology Inc. ...
Page 183
... FIGURE 17-32: PIC12HV609/615 I Typical: Statistical Mean @25°C 400 Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 350 300 250 200 150 100 2010 Microchip Technology Inc. CV (LOW RANGE) vs REF ( (HI RANGE) vs REF (V) DD T1OSC vs. V ...
Page 184
... DS41302D-page 184 A 3.0V) DD 6.5 7.0 7.5 8.0 I (mA) OL Maximum Typical 4 5 Max. 125°C Max. 85°C Typical 25°C Min. -40°C 8.5 9.0 9.5 10.0 2010 Microchip Technology Inc. ...
Page 185
... Typical: Statistical Mean @25°C Maximum: Mean (Worst-Case Temp) + 3 1.0 (-40°C to 125°C) 0.5 0.0 0.0 -0.5 -1.0 2010 Microchip Technology Inc. = 5.0V) DD Max. 125°C Max. 85°C Typ. 25°C Min. -40°C 6.5 7.0 7.5 8.0 8.5 ...
Page 186
... DS41302D-page 186 = 5.0V) DD -1.5 -2.0 -2.5 -3.0 -3.5 I (mA) OH vs. V OVER TEMPERATURE IN DD Max. -40°C Typ. 25°C Min. 125°C 3.0 3.5 4.0 4.5 V (V) DD Max. -40°C Typ. 25°C Min. 125°C -4.0 -4.5 -5.0 5.0 5.5 2010 Microchip Technology Inc. ...
Page 187
... FIGURE 17-40: TYPICAL HFINTOSC START-UP TIMES vs 85°C 12 25°C 10 -40° 2.0 2.5 3.0 2010 Microchip Technology Inc. vs 3.0 3.5 4.0 V (V) DD OVER TEMPERATURE DD Typical: Statistical Mean @25°C Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 3.5 4.0 V (V) ...
Page 188
... Typical: Statistical Mean @25°C Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 3.5 4.0 4.5 V (V) DD OVER TEMPERATURE DD Typical: Statistical Mean @25°C Maximum: Mean (Worst-Case Temp) + 3 (-40°C to 125°C) 3.5 4.0 4.5 V (V) DD 2010 Microchip Technology Inc. 5.0 5.5 5.0 5.5 ...
Page 189
... PIC12F609/615/617/12HV609/615 FIGURE 17-43: TYPICAL HFINTOSC FREQUENCY CHANGE vs 2.0 2.5 FIGURE 17-44: TYPICAL HFINTOSC FREQUENCY CHANGE vs 2.0 2.5 2010 Microchip Technology Inc. 3.0 3.5 4.0 4.5 V (V) DD 3.0 3.5 4.0 V (V) DD (25°C) DD 5.0 5.5 (85°C) DD 4.5 5.0 5.5 DS41302D-page 189 ...
Page 190
... PIC12F609/615/617/12HV609/615 FIGURE 17-45: TYPICAL HFINTOSC FREQUENCY CHANGE vs 2.0 2.5 FIGURE 17-46: TYPICAL HFINTOSC FREQUENCY CHANGE vs 2.0 2.5 DS41302D-page 190 3.0 3.5 4.0 4.5 V (V) DD 3.0 3.5 4.0 4.5 V (V) DD (125°C) DD 5.0 5.5 (-40°C) DD 5.0 5.5 2010 Microchip Technology Inc. ...
Page 191
... REFERENCE VOLTAGE vs. TEMP (TYPICAL) 1.26 1.25 1.24 1.23 1.22 1.21 1.2 -60 -40 -20 FIGURE 17-49: SHUNT REGULATOR VOLTAGE vs. INPUT CURRENT (TYPICAL) 5.16 5.14 5.12 5.1 5.08 5.06 5.04 5.02 5 4.98 4. 2010 Microchip Technology Inc Temp ( Temp ( Input Current (mA) 2. 5.5V 100 120 140 2.5V ...
Page 192
... 1.5V)/2 Note: 600 input = input = Transition from V 500 400 300 200 100 0 2.0 DS41302D-page 192 Temp (C) + 100mV 20mV CM CM 2.5 4 100 120 140 Max. 125°C Max. 85°C Typ. 25°C Min. -40°C 5.5 2010 Microchip Technology Inc. ...
Page 193
... V+ input = V CM 500 V- input = Transition from V 400 300 200 100 0 2.0 FIGURE 17-53: WDT TIME-OUT PERIOD vs 1.5 2 2010 Microchip Technology Inc. - 100mV 2.5 4.0 V (V) DD OVER TEMPERATURE DD 2 (V) DD Max. 125°C Max. 85°C Typ. 25°C Min. -40°C 5.5 125° ...
Page 194
... PIC12F609/615/617/12HV609/615 NOTES: DS41302D-page 194 2010 Microchip Technology Inc. ...
Page 195
... Standard PIC device marking consists of Microchip part number, year code, week code, and traceability code. For PIC device 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. 2010 Microchip Technology Inc. Example XXFXXX/P ...
Page 196
... PIC12F609/615/617/12HV609/615 18.2 Package Details The following sections give the technical details of the packages. DS41302D-page 196 2010 Microchip Technology Inc. ...
Page 197
... PIC12F609/615/617/12HV609/615 2010 Microchip Technology Inc. α φ β DS41302D-page 197 ...
Page 198
... PIC12F609/615/617/12HV609/615 DS41302D-page 198 2010 Microchip Technology Inc. ...
Page 199
... PIC12F609/615/617/12HV609/615 2010 Microchip Technology Inc. I φ DS41302D-page 199 ...
Page 200
... PIC12F609/615/617/12HV609/615 DS41302D-page 200 2010 Microchip Technology Inc. ...