PIC16F526-I/P Microchip Technology, PIC16F526-I/P Datasheet

IC PIC MCU FLASH 1KX12 14DIP

PIC16F526-I/P

Manufacturer Part Number
PIC16F526-I/P
Description
IC PIC MCU FLASH 1KX12 14DIP
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Datasheets

Specifications of PIC16F526-I/P

Program Memory Type
FLASH
Program Memory Size
1.5KB (1K x 12)
Package / Case
14-DIP (0.300", 7.62mm)
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
POR, WDT
Number Of I /o
11
Ram Size
67 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 3x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
67 B
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
12
Number Of Timers
1
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, ICE2000
Minimum Operating Temperature
- 40 C
On-chip Adc
8 bit, 3 Channel
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
AC162096 - HEADER MPLAB ICD2 PIC16F526 8/14
Eeprom Size
-
Connectivity
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PIC16F526
Data Sheet
14-Pin, 8-Bit Flash Microcontroller
Preliminary
© 2007 Microchip Technology Inc.
DS41326A

Related parts for PIC16F526-I/P

PIC16F526-I/P Summary of contents

Page 1

... Flash Microcontroller © 2007 Microchip Technology Inc. PIC16F526 Data Sheet Preliminary DS41326A ...

Page 2

... PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, 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

... One comparator with programmable on-chip voltage reference (V • Analog-to-Digital (A/D) Converter - 8-bit resolution - 3-channel external programmable inputs - 1-channel internal input to internal absolute 0.6 voltage reference Data Memory I/O Comparators Flash (bytes Preliminary PIC16F526 ) REF ) REF 8-bit A/D Timers 8-bit Channels DS41326A-page 1 ...

Page 4

... PIC16F526 FIGURE 1: 14-PIN PDIP, SOIC, TSSOP DIAGRAM V DD RB5/OSC1/CLKIN RB4/OSC2/CLKOUT RB3/MCLR/V PP RC5/T0CKI RC4/C2OUT RC3 DS41326A-page RB0/C1IN+/AN0/ICSPDAT 2 13 RB1/C1IN-/AN1/ICSPCLK 3 12 RB2/C1OUT/AN2 RC0/C2IN RC1/C2IN RC2/CV REF Preliminary © 2007 Microchip Technology Inc. ...

Page 5

... Table of Contents 1.0 General Description..................................................................................................................................................................... 5 2.0 PIC16F526 Device Varieties ...................................................................................................................................................... 7 3.0 Architectural Overview ............................................................................................................................................................... 9 4.0 Memory Organization ................................................................................................................................................................ 13 5.0 Flash Data Memory ................................................................................................................................................................... 21 6.0 I/O Port ...................................................................................................................................................................................... 25 7.0 Timer0 Module and TMR0 Register .......................................................................................................................................... 31 8.0 Special Features of the CPU..................................................................................................................................................... 37 9.0 Analog-to-Digital (A/D) Converter.............................................................................................................................................. 51 10.0 Comparator(s) ........................................................................................................................................................................... 55 11.0 Comparator Voltage Reference Module.................................................................................................................................... 61 12 ...

Page 6

... PIC16F526 NOTES: DS41326A-page 4 Preliminary © 2007 Microchip Technology Inc. ...

Page 7

... In-Circuit Serial Programming Number of Instructions Packages The PIC16F526 device has Power-on Reset, selectable Watchdog Timer, selectable code-protect, high I/O current capability and precision internal oscillator. The PIC16F526 device uses serial programming with data pin RB0 and clock pin RB1. © 2007 Microchip Technology Inc. ...

Page 8

... PIC16F526 NOTES: DS41326A-page 6 Preliminary © 2007 Microchip Technology Inc. ...

Page 9

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

Page 10

... PIC16F526 NOTES: DS41326A-page 8 Preliminary © 2007 Microchip Technology Inc. ...

Page 11

... In addition, the learning curve is reduced significantly. © 2007 Microchip Technology Inc. The PIC16F526 device contains an 8-bit ALU and working register. The ALU is a general purpose arith- metic unit. It performs arithmetic and Boolean functions between data in the working register and any register file ...

Page 12

... PIC16F526 FIGURE 3-1: PIC16F526 BLOCK DIAGRAM 11 Flash Program Memory Flash Data Memory 64x8 Program 12 Bus Instruction Reg 8 Instruction Decode and Control Timing OSC1/CLKIN Generation OSC2/CLKOUT MCLR DS41326A-page 10 8 Data Bus Program Counter RAM 67 STACK1 bytes STACK2 File Registers (1) RAM Addr 9 Addr MUX ...

Page 13

... TABLE 3-2: PIC16F526 PINOUT DESCRIPTION Input Name Function Type RB0//C1IN+/AN0/ RB0 ICSPDAT C1IN+ AN0 ICSPDAT RB1/C1IN-/AN1/ RB1 ICSPCLK C1IN- AN1 ICSPCLK RB2/C1OUT/AN2 RB2 C1OUT AN2 RB3/MCLR/V RB3 PP MCLR V PP RB4/OSC2/CLKOUT RB4 OSC2 CLKOUT RB5/OSC1/CLKIN RB5 OSC1 XTAL CLKIN ...

Page 14

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

Page 15

... File Select Register (FSR). 4.1 Program Memory Organization for the PIC16F526 The PIC16F526 device has an 11-bit Program Counter (PC) capable of addressing program memory space. Program memory is partitioned into user memory, data memory and configuration memory spaces. The user memory space is the on-chip user program memory ...

Page 16

... The Special Function Registers are registers used by the CPU and peripheral functions for controlling desired operations of the PIC16F526. See Figure 4-2 for details. The PIC16F526 register file is composed of 13 Special Function Registers and 41 General Purpose Registers FIGURE 4-2: REGISTER FILE MAP FSR< ...

Page 17

... C1NREF ADCS1 ADCS0 CHS1 CHS0 C2POL C2PREF2 C2ON C2NREF VRR — VR3 VR2 — FREE WRERR WREN SELF READ/WRITE ADDRESS Preliminary PIC16F526 Value on Bit 1 Bit 0 Power-on Page # Reset 25 --11 1111 17 1111 1111 20 xxxx xxxx xxxx xxxx 31 19 1111 1111 DC C 0001 1xxx ...

Page 18

... PIC16F526 4.3 STATUS Register This register contains the arithmetic status of the ALU, the Reset status and the page preselect bit. The STATUS register can be the destination for any instruction, as with any other register. If the STATUS register is the destination for an instruction that affects the bits, then the write to these three bits is disabled ...

Page 19

... TRIS overrides Option control of RBPU and RBWU). W-1 W-1 (1) T0SE PSA U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (1) WDT Rate 128 256 1 : 128 Preliminary PIC16F526 W-1 W-1 W-1 PS2 PS1 PS0 bit Bit is unknown DS41326A-page 17 ...

Page 20

... PIC16F526 4.5 OSCCAL Register The Oscillator Calibration (OSCCAL) register is used to calibrate the 8 MHz internal oscillator macro. It contains 7 bits of calibration that uses a two’s complement scheme for controlling the oscillator speed. See Register 4-3 for details. REGISTER 4-3: OSCCAL: OSCILLATOR CALIBRATION REGISTER ...

Page 21

... Stack The PIC16F526 device has a 2-deep, 12-bit wide hardware PUSH/POP stack. A CALL instruction will PUSH the current value of Stack 1 into Stack 2 and then PUSH the current PC value, incre- mented by one, into Stack Level 1 ...

Page 22

... PIC16F526 4.8 Indirect Data Addressing: INDF and FSR Registers The INDF Register is not a physical register. Addressing INDF actually addresses the register whose address is contained in the FSR Register (FSR is a pointer). This is indirect addressing. Reading INDF itself indirectly (FSR = 0) will produce 00h. Writing to the INDF Register indirectly results in a no-operation (although Status bits may be affected) ...

Page 23

... EEDATA2 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared R/W-x R/W-x R/W-x EEADR4 EEADR3 EEADR2 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared Preliminary PIC16F526 Characteristics”, R/W-x R/W-x EEDATA1 EEDATA0 bit Bit is unknown R/W-x R/W-x EEADR1 EEADR0 bit 0 ...

Page 24

... PIC16F526 REGISTER 5-3: EECON: FLASH CONTROL REGISTER U-0 U-0 U-0 — — — bit 7 Legend Bit can only be set R = Readable bit W = Writable bit -n = Value at POR ‘1’ = Bit is set bit 7-5 Unimplemented: Do not use bit 4 FREE: Flash Data Memory Row Erase Enable Bit 1 = Program memory row being pointed to by EEADR will be erased on the next write cycle ...

Page 25

... If the WR bit is not set in the instruction cycle after the WREN bit is set, the WREN bit will be cleared in hard- ware. This sequence is to prevent an accidental write to the Flash memory. Preliminary PIC16F526 ;SWITCH TO BANK 1 ;LOAD ADDRESS TO SFR ;SELECT ERASE ;ENABL FLASH PROG’ING ;INITITATE ERASE ...

Page 26

... PIC16F526 EXAMPLE 5-3: DATA MEMORY WRITE BSF FSR,5 ;SWITCH TO BANK 1 MOVLW EE_ADR_WRITE ;LOAD ADDRESS TO ;WRITE MOVWF EEADR ;INTO EEADR ;REGISTER MOVLW EE_DATA_TO_WRITE;LOAD DATA TO MOVWF EEDATA ;INTO EEDATA ;REGISTER BSF EECON,WREN ;ENABLE WRITES BSF EECON,WR ;START WRITE ;SEQUENCE NOP ;WAIT AS READ ;INSTRUCTION ...

Page 27

... Reset. RB1 Weak Pull-up RB3 Weak Pull-up Yes Yes R/W-x R/W-x R/W-x RB4 RB3 RB2 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared Preliminary PIC16F526 (1) RB4 Weak Pull-up Yes R/W-x R/W-x RB1 RB0 bit Bit is unknown DS41326A-page 25 ...

Page 28

... PIC16F526 REGISTER 6-2: PORTC: PORTC REGISTER U-0 U-0 R/W-x — — RC5 bit 7 Legend Readable bit W = Writable bit -n = Value at POR ‘1’ = Bit is set bit 7-6 Unimplemented: Read as ‘1’ bit 5-0 RC<5:0>: PORTC I/O Pin bits 1 = Port pin is >V min. ...

Page 29

... TRIS must be cleared (= 0). For use as an input, the corresponding TRIS bit must be set. Any I/O pin (except RB3) can be programmed individually as input or output. © 2007 Microchip Technology Inc. FIGURE 6-1: PIC16F526 EQUIVALENT CIRCUIT FOR A SINGLE I/O PIN Data Bus D ...

Page 30

... PIC16F526 TABLE 6-2: SUMMARY OF PORT REGISTERS Addr Name Bit 7 Bit 6 N/A TRIS — — N/A OPTION RBWU RBPU 03h STATUS RBWUF CWUF 06h PORTB — — 07h PORTC — — Legend: Shaded cells are not used by PORT registers, read as ‘0’. – = unimplemented, read as ‘0’ unknown unchanged depends on condition ...

Page 31

... 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. MOVF PORTB,W NOP (Read PORTB) Preliminary PIC16F526 READ-MODIFY-WRITE INSTRUCTIONS ON AN I/O PORT(e.g. PIC16F526) PORTB latch PORTB pins ---------- ---------- --11 pppp --11 pppp ;--10 -ppp --11 pppp – instruction cycle ...

Page 32

... PIC16F526 NOTES: DS41326A-page 30 Preliminary © 2007 Microchip Technology Inc. ...

Page 33

... Section 7.2 “Prescaler” details the operation of the prescaler. A summary of registers associated with the Timer0 module is found in Table 7- OUT 1 Sync with 1 Programmable 0 (2) Prescaler (2 cycle delay) (1) (1) PSA T0CS 3 (1) (1) (1) PS2 , PS1 , PS0 Preliminary PIC16F526 Data Bus 8 TMR0 Reg Internal Clocks PS OUT Sync DS41326A-page 31 ...

Page 34

... PIC16F526 FIGURE 7-2: TIMER0 TIMING: INTERNAL CLOCK/NO PRESCALE (Program Counter) PC – Instruction MOVWF TMR0 MOVF TMR0,W MOVF TMR0,W MOVF TMR0,W MOVF TMR0,W MOVF TMR0,W Fetch Timer0 Instruction Executed FIGURE 7-3: TIMER0 TIMING: INTERNAL CLOCK/PRESCALE 1 (Program PC – Counter) Instruction MOVWF TMR0 MOVF TMR0,W MOVF TMR0,W MOVF TMR0,W MOVF TMR0,W MOVF TMR0,W ...

Page 35

... Timer0 module is actually incremented. Figure 7-4 shows the delay from the external clock edge to the timer incrementing ( (Duration OSC OSC max. OSC Preliminary PIC16F526 Small pulse misses sampling Therefore, the error OSC DS41326A-page 33 ...

Page 36

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

Page 37

... Timer (1) PSA WDT Enable bit Note 1: T0CS, T0SE, PSA, PS<2:0> are bits in the OPTION register. © 2007 Microchip Technology Inc Sync Cycles (1) T0CS (1) PSA 8-bit Prescaler 8 8-to-1 MUX PS<2:0> (1) MUX PSA WDT Time-out Preliminary PIC16F526 Data Bus 8 TMR0 Reg 2 (1) DS41326A-page 35 ...

Page 38

... PIC16F526 NOTES: DS41326A-page 36 Preliminary © 2007 Microchip Technology Inc. ...

Page 39

... A set of Configuration bits are used to select various options. 8.1 Configuration Bits The PIC16F526 Configuration Words consist of 12 bits. Configuration bits can be programmed to select various device configurations. Three bits are for the selection of the oscillator type; one bit is the Watchdog Timer enable bit, one bit is the MCLR enable bit and one bit is for code protection (Register 8-1) ...

Page 40

... EXTRC with RB4 function on RB4/OSC2/CLKOUT and 1 ms DRT 111 = EXTRC with CLKOUT function on RB4/OSC2/CLKOUT and 1 ms DRT Note 1: Refer to the “PIC16F526 Memory Programming Specification”, DS41317 to determine how to access the Configuration Word. 2: DRT length ( ms function of Clock mode selection the responsibility of the application designer to ensure the use of either 18 ms (nominal) DRT or the 1 ms (nominal) DRT will result in acceptable operation. Refer to Section 14.1 “ ...

Page 41

... Oscillator Configurations 8.2.1 OSCILLATOR TYPES The PIC16F526 device can be operated six dif- ferent Oscillator modes. The user can program up to three Configuration bits (FOSC<2:0>). To select one of these modes: • LP: Low-Power Crystal • XT: Crystal/Resonator • HS: High-Speed Crystal/Resonator • INTRC: Internal 4/8 MHz Oscillator • ...

Page 42

... R and C components used. Figure 8-5 shows how the R/C combination is con- nected to the PIC16F526 device. For R below 3.0 kΩ, the oscillator operation may become unstable, or stop completely. For very high R (e.g., 1 MΩ), the oscillator becomes sensitive to noise, humidity and leakage ...

Page 43

... The calibration value must be read prior to erasing the part so it can be reprogrammed correctly later. For the PIC16F526 device, only bits <7:1> of OSCCAL are used for calibration. See Register 4-3 for more information. Note: The bit 0 of the OSCCAL register is unimplemented and should be written as ‘ ...

Page 44

... PIC16F526 8.3 Reset The device differentiates between various kinds of Reset: • Power-on Reset (POR) • MCLR Reset during normal operation • MCLR Reset during Sleep • WDT Time-out Reset during normal operation • WDT Time-out Reset during Sleep • Wake-up from Sleep on pin change ...

Page 45

... Legend unchanged unknown, – = unimplemented bit, read as ‘0’. © 2007 Microchip Technology Inc. STATUS Addr: 03h 0001 1xxx 000u uuuu 0001 0uuu 0000 0uuu 0000 uuuu 1001 0uuu Preliminary PIC16F526 PCL Addr: 02h 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 DS41326A-page 43 ...

Page 46

... RBWU RB3/MCLR/V MCLRE 8.4 Power-on Reset (POR) The PIC16F526 device incorporates an on-chip Power-on Reset (POR) circuitry, which provides an internal chip Reset for most power-up situations. The on-chip POR circuit holds the chip in Reset until V has reached a high enough level for proper oper- DD ation ...

Page 47

... FIGURE 8-9: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED TO V TIME V DD MCLR Internal POR DRT Time-out Internal Reset © 2007 Microchip Technology Inc. POR (Power-on Reset) MCLR Reset Start-up Timer (10 μs, 1.125 ms) TDRT Preliminary PIC16F526 CHIP Reset TDRT ): FAST V RISE DD DD DS41326A-page 45 ...

Page 48

... PIC16F526 FIGURE 8-10: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED TO V TIME V DD MCLR Internal POR DRT Time-out Internal Reset Note: When V rises slowly, the T DD value. In this example, the chip will reset properly if, and only if, V1 ≥ V DS41326A-page 46 V1 TDRT time-out expires long before V ...

Page 49

... Device Reset Timer (DRT) On the PIC16F526 device, the DRT runs any time the device is powered up. DRT runs from Reset and varies based on oscillator selection and Reset type (see Table 8-5). The DRT operates on an internal RC oscillator. The processor is kept in Reset as long as the DRT is active. ...

Page 50

... PIC16F526 FIGURE 8-11: WATCHDOG TIMER BLOCK DIAGRAM From Timer0 Clock Source (Figure 7-1) Watchdog Time WDT Enable Configuration Bit Note 1: PSA, PS<2:0> are bits in the OPTION register. TABLE 8-6: SUMMARY OF REGISTERS ASSOCIATED WITH THE WATCHDOG TIMER Address Name Bit 7 Bit 6 N/A ...

Page 51

... If a wake-up on change occurs and the pins are not read before re-entering Sleep, a wake-up will occur immediately even if no pins change while in Sleep mode. The WDT is cleared when the device wakes from Sleep, regardless of the wake-up source. and the SS Preliminary PIC16F526 pin, PP DS41326A-page 49 ...

Page 52

... The first 64 locations and the last location (OSCCAL) can be read, regardless of the code protection bit setting. The last memory location can be read regardless of the code protection bit setting on the PIC16F526 device. 8.10 ID Locations Four memory locations are designated as ID locations where the user can store checksum or other code identification numbers ...

Page 53

... The GO/DONE bit is cleared when the device enters Sleep, stopping the current conversion. The ADC does not have a dedicated oscillator, it runs off of the instruc- tion clock. Therefore, no conversion can occur in sleep. The GO/DONE bit cannot be set when ADON is clear. Preliminary PIC16F526 affect the signal being CHANNEL SELECT (ADCS) BITS AFTER AN EVENT ADCS< ...

Page 54

... PIC16F526 9.1.5 SLEEP This ADC does not have a dedicated ADC clock, and therefore, no conversion in Sleep is possible conversion is underway and a Sleep command is executed, the GO/DONE and ADON bit will be cleared. This will stop any conversion in process and power- down the ADC module to conserve power. Due to the nature of the conversion process, the ADRES may con- tain a partial conversion ...

Page 55

... The bits that were not converted before the GO/DONE was cleared are unrecoverable. R/W-1 R/W-1 R/W-1 ADCS0 CHS1 CHS0 U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (1), (2), (5) (3, 5) (4) Preliminary PIC16F526 R/W-0 R/W-0 GO/DONE ADON bit Bit is unknown DS41326A-page 53 ...

Page 56

... PIC16F526 REGISTER 9-2: ADRES: ADDRESS REGISTER R/W-X R/W-X R/W-X ADRES7 ADRES6 ADRES5 bit 7 Legend Readable bit W = Writable bit -n = Value at POR ‘1’ = Bit is set EXAMPLE 9-1: PERFORMING AN ANALOG-TO-DIGITAL CONVERSION ;Sample code operates out of BANK0 MOVLW 0xF1 ;configure A/D MOVWF ADCON0 BSF ADCON0, 1 ...

Page 57

... When comparator is turned on, these control bits assert themselves. Otherwise, the other registers have precedence. © 2007 Microchip Technology Inc. R/W-1 R/W-1 R/W-1 C1T0CS C1ON C1NREF U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared (1), (2) (2) (2) (2) (2) (2) Preliminary PIC16F526 R/W-1 R/W-1 C1PREF C1WU bit Bit is unknown DS41326A-page 55 ...

Page 58

... PIC16F526 REGISTER 10-2: CM2CON0: COMPARATOR C2 CONTROL REGISTER R-1 R/W-1 R/W-1 C2OUT C2OUTEN C2POL bit 7 Legend Readable bit W = Writable bit -n = Value at POR ‘1’ = Bit is set bit 7 C2OUT: Comparator Output bit > < bit 6 C2OUTEN: Comparator Output Enable bit 1 = Output of comparator is NOT placed on the C2OUT pin ...

Page 59

... REF 0 (0.6V) C1NREF C2PREF1 C2IN C2PREF2 C2IN REF C2NREF C1WU C2WU © 2007 Microchip Technology Inc C1POL C1ON 0 T0CKI 1 C1T0CS C2POL C2ON CWUF Preliminary PIC16F526 RB2/C1OUT C1OUTEN C1OUT (Register) T0CKI Pin Q D READ S CM1CON0 RC4/C2OUT C2OUTEN C2OUT (Register READ S CM2CON0 DS41326A-page 57 ...

Page 60

... PIC16F526 10.1 Comparator Operation A single comparator is shown in Figure 10-2 along with the relationship between the analog input levels and the digital output. When the analog input at V than the analog input V -, the output of the comparator digital low level. The shaded area of the output of the comparator in Figure 10-2 represent the uncer- tainty due to input offsets and response time ...

Page 61

... Analog Voltage Bit 4 Bit 3 Bit 2 Bit C1T0CS C1ON C1NREF C1PREF C2PREF2 C2ON C2NREF C2PREF1 Preliminary PIC16F526 R IC Value on All Bit 0 Value on POR Other Resets C 0001 1xxx qq0q quuu C1WU 1111 1111 uuuu uuuu C2WU 1111 1111 uuuu uuuu --11 1111 --11 1111 DS41326A-page 59 ...

Page 62

... PIC16F526 NOTES: DS41326A-page 60 Preliminary © 2007 Microchip Technology Inc. ...

Page 63

... CV module current. The voltage reference is V the CV output changes with fluctuations in V REF tested absolute accuracy of the comparator voltage ref- erence can be found in Section 14.2 “DC Character- istics: PIC16F526 (Extended)”. DD /32) DD U-0 R/W-0 — VR3 U = Unimplemented bit, read as ‘ ...

Page 64

... PIC16F526 FIGURE 11-1: COMPARATOR VOLTAGE REFERENCE BLOCK DIAGRAM 16-1 Analog VREN CV to REF Comparator 2 Input VR<3:0> RC2/CV REF V ROE TABLE 11-1: REGISTERS ASSOCIATED WITH COMPARATOR VOLTAGE REFERENCE Name Bit 7 Bit 6 Bit 5 VRCON VREN VROE VRR CM1CON0 C1OUT C1OUTEN C1POL CM2CON0 C2OUT ...

Page 65

... Bit-oriented file register operations OPCODE b (BIT #) b = 3-bit bit address f = 5-bit file register address Literal and control operations (except GOTO) 11 OPCODE k = 8-bit immediate value Literal and control operations – GOTO instruction 11 9 OPCODE k = 9-bit immediate value Preliminary PIC16F526 (FILE #) (FILE #) (literal (literal) DS41326A-page 63 ...

Page 66

... PIC16F526 TABLE 12-2: INSTRUCTION SET SUMMARY Mnemonic, Description Operands ADDWF f, d Add W and f ANDWF f, d AND W with f CLRF f Clear f CLRW — Clear W COMF f, d Complement f DECF f, d Decrement f DECFSZ f, d Decrement f, Skip if 0 INCF f, d Increment f INCFSZ f, d Increment f, Skip if 0 IORWF ...

Page 67

... If bit ‘b’ in register ‘f’ is ‘0’, then the next instruction is skipped. If bit ‘b’ is ‘0’, then the next instruc- tion fetched during the current instruction execution is discarded, and a NOP is executed instead, making this a two-cycle instruction. Preliminary PIC16F526 f,b f,b DS41326A-page 65 ...

Page 68

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

Page 69

... IORLW Inclusive OR literal with W Syntax: [ label ] 0 ≤ k ≤ 255 Operands: (W) .OR. (k) → (W) Operation: Status Affected: Z Description: The contents of the W register are OR’ed with the eight-bit literal ‘k’. The result is placed in the W register. Preliminary PIC16F526 INCF f,d INCFSZ f,d IORLW k DS41326A-page 67 ...

Page 70

... PIC16F526 IORWF Inclusive OR W with f Syntax: [ label ] IORWF f,d 0 ≤ f ≤ 31 Operands: d ∈ [0,1] (W).OR. (f) → (dest) Operation: Status Affected: Z Description: Inclusive OR the W register with register ‘f’. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘ ...

Page 71

... Operands: Operation: Status Affected: C, DC, Z Description: SWAPF Syntax: Operands: Operation: Status Affected: None Description: Preliminary PIC16F526 Enter SLEEP Mode [label ] SLEEP None 00h → WDT; 0 → WDT prescaler; 1 → TO; 0 → PD Time-out Status bit (TO) is set. The Power-down Status bit (PD) is cleared ...

Page 72

... PIC16F526 TRIS Load TRIS Register Syntax: [ label ] TRIS f Operands (W) → TRIS register f Operation: Status Affected: None Description: TRIS register ‘f’ loaded with the contents of the W register XORLW Exclusive OR literal with W Syntax: [label ] XORLW k 0 ≤ k ≤ 255 Operands: (W) .XOR. k → (W) ...

Page 73

... Mixed assembly and C - Machine code MPLAB IDE supports multiple debugging tools in a single development paradigm, from the cost-effective simulators, through low-cost in-circuit debuggers, to full-featured emulators. This eliminates the learning curve when upgrading to tools with increased flexibility and power. Preliminary PIC16F526 ® DS41326A-page 71 ...

Page 74

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

Page 75

... PC via an RS-232 or USB cable. ® Flash DSCs The MPLAB PM3 has high-speed communications and optimized algorithms for quick programming of large memory devices and incorporates an SD/MMC card for file storage and secure data applications. Preliminary PIC16F526 run-time development tool, TM (ICSP TM ) protocol, offers cost- ...

Page 76

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

Page 77

... This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability. © 2007 Microchip Technology Inc. ............................................................................... -0. )...................................................................................................................± ...........................................................................................................±20 mA > – ∑ DIS Preliminary PIC16F526 + 0.3V ∑ {( ∑(V – DS41326A-page 75 ...

Page 78

... PIC16F526 PIC16F526 VOLTAGE-FREQUENCY GRAPH, -40°C ≤ T FIGURE 14-1: 6.0 5.5 5.0 4 (Volts) 4.0 3.5 3.0 2.5 2.0 0 FIGURE 14-2: MAXIMUM OSCILLATOR FREQUENCY TABLE LP XT XTRC INTOSC 200 kHz DS41326A-page 76 INTOSC ONLY Frequency (MHz) 4 MHz 8 MHz Frequency Preliminary ≤ +125° MHz ...

Page 79

... DC Characteristics: PIC16F526 (Industrial) DC Characteristics Param Sym Characteristic No. D001 V Supply Voltage DD D002 V RAM Data Retention Voltage DR D003 V V Start Voltage to ensure POR DD Power-on Reset D004 S V Rise Rate to ensure VDD DD Power-on Reset (3,4) D010 I Supply Current DD D020 I Power-down Current PD (5) D022 ...

Page 80

... PIC16F526 14.2 DC Characteristics: PIC16F526 (Extended) DC Characteristics Param Sym Characteristic No. D001 V Supply Voltage DD D002 V RAM Data Retention Voltage DR D003 V V Start Voltage to ensure POR DD Power-on Reset D004 S V Rise Rate to ensure VDD DD Power-on Reset (3,4) D010 I Supply Current DD D020 I Power-down Current PD (5) ...

Page 81

... Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested. Note 1: In EXTRC oscillator configuration, the OSC1/CLKIN pin is a Schmitt Trigger input not recommended that the PIC16F526 be driven with external clock in RC mode. 2: Negative current is defined as coming out of the pin. ...

Page 82

... PIC16F526 TABLE 14-2: COMPARATOR SPECIFICATIONS. Standard Operating Conditions (unless otherwise stated) Comparator Specifications Operating temperature Characteristics Sym V Input offset voltage OS Input common mode voltage CMRR* C MRR (1 Response Time Comparator Mode Change to V IVRF Output Valid* * These parameters are characterized but not tested. ...

Page 83

... Preliminary PIC16F526 Units Conditions bit LSb V = 5.0V DD LSb No missing codes to 8 bits V = 5.0V DD LSb V = 5.0V DD LSb V = 5.0V DD ≤ V ≤ V — ...

Page 84

... PIC16F526 14.3 Timing Parameter Symbology and Load Conditions 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 85

... Microchip Technology Inc Standard Operating Conditions (unless otherwise specified) Operating Temperature -40°C ≤ T -40°C ≤ T Operating Voltage V range is described in Section 14.1 “DC DD Characteristics: PIC16F526 (Industrial)” (1) Min Typ Max Units (2) DC — 4 MHz XT Oscillator mode DC — 20 MHz HS Oscillator mode DC — ...

Page 86

... DS41326A-page 84 Standard Operating Conditions (unless otherwise specified) -40°C ≤ T Operating Temperature -40°C ≤ T Operating Voltage V range is described in DD Section 14.1 “DC Characteristics: PIC16F526 (Industrial)” Freq Min Typ† Max Tolerance ± 1% 7.92 8.00 8 ...

Page 87

... See Figure 14-3 for loading conditions. © 2007 Microchip Technology Inc 20, 21 -40°C ≤ T ≤ +85°C (industrial) A -40°C ≤ T ≤ +125°C (extended) A range is described in Section 14.1 “DC Characteristics: PIC16F526 DD Characteristic (2), (3) (2) (3) (3) Preliminary PIC16F526 Q3 New Value (1) Min Typ Max Units — ...

Page 88

... DS41326A-page Standard Operating Conditions (unless otherwise specified) Operating Temperature -40°C ≤ T ≤ +85°C (industrial) A -40°C ≤ T ≤ +125°C (extended) A Operating Voltage V range is described in DD Section 14.1 “DC Characteristics: PIC16F526 (Industrial)” (1) Min Typ Max Units 2000* — — 18* 30* ms ...

Page 89

... Standard Operating Conditions (unless otherwise specified) Operating Temperature -40°C ≤ T ≤ +85°C (industrial) A -40°C ≤ T ≤ +125°C (extended) A Operating Voltage V range is described in DD Section 14.1 “DC Characteristics: PIC16F526 (Industrial)” Min Typ No Prescaler 0 20* CY With Prescaler 10* No Prescaler 0.5 T ...

Page 90

... DS41326A-page 88 Standard Operating Conditions (unless otherwise specified) Operating Temperature -40°C ≤ T ≤ +85°C (industrial) A -40°C ≤ T ≤ +125°C (extended) A Operating Voltage V range is described in DD Section 14.1 “DC Characteristics: PIC16F526 (Industrial)” (1) Min Typ Max Units ...

Page 91

... DC AND AC CHARACTERISTICS GRAPHS AND CHARTS Graphs and charts are not available at this time. © 2007 Microchip Technology Inc. Preliminary PIC16F526 DS41326A-page 89 ...

Page 92

... PIC16F526 NOTES: DS41326A-page 90 Preliminary © 2007 Microchip Technology Inc. ...

Page 93

... 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. © 2007 Microchip Technology Inc. Example PIC16F526 -I/ 0410017 Example PIC16F526-E /SLG0125 0431017 Example 16F526-I 0431 017 Preliminary PIC16F526 0215 ) e 3 DS41326A-page 91 ...

Page 94

... PIC16F526 14-Lead Plastic Dual In-Line (P) – 300 mil Body [PDIP] Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging N NOTE Number of Pins Pitch Top to Seating Plane Molded Package Thickness Base to Seating Plane Shoulder to Shoulder Width ...

Page 95

... A2 1.25 A1 0.10 E 6.00 BSC E1 3.90 BSC D 8.65 BSC h 0.25 L 0.40 L1 1.04 REF 0° c 0.17 b 0.31 5° 5° Preliminary PIC16F526 h c MAX 14 – 1.75 – – – 0.25 – 0.50 – 1.27 – 8° – 0.25 – 0.51 – 15° – 15° ...

Page 96

... PIC16F526 14-Lead Plastic Thin Shrink Small Outline (ST) – 4.4 mm Body [TSSOP] Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging D N NOTE Number of Pins Pitch Overall Height Molded Package Thickness Standoff Overall Width Molded Package Width ...

Page 97

... APPENDIX A: REVISION HISTORY Revision A (August 2007) Original release of this document. © 2007 Microchip Technology Inc. Preliminary PIC16F526 DS41326A-page 95 ...

Page 98

... PIC16F526 NOTES: DS41326A-page 96 Preliminary © 2007 Microchip Technology Inc. ...

Page 99

... Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://support.microchip.com Preliminary PIC16F526 should contact their distributor, DS41326A-page 97 ...

Page 100

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

Page 101

... INDEX A A/D Specifications.............................................................. 81 ALU ....................................................................................... 9 Assembler MPASM Assembler..................................................... 72 B Block Diagram Comparator for the PIC16F526................................... 57 On-Chip Reset Circuit ................................................. 45 Timer0......................................................................... 31 TMR0/WDT Prescaler................................................. 35 Watchdog Timer.......................................................... Compilers MPLAB C18 ................................................................ 72 MPLAB C30 ................................................................ 72 Carry ..................................................................................... 9 Clocking Scheme ................................................................ 12 Code Protection ............................................................ 37, 50 CONFIG1 Register.............................................................. 38 Configuration Bits................................................................ 37 Customer Change Notification Service ............................... 97 Customer Notification Service ...

Page 102

... PIC16F526 W Wake-up from Sleep ........................................................... 49 Watchdog Timer (WDT) ................................................ 37, 47 Period.......................................................................... 47 Programming Considerations ..................................... 47 WWW Address.................................................................... 97 WWW, On-Line Support........................................................ 3 Z Zero bit .................................................................................. 9 DS41326A-page 100 Preliminary © 2007 Microchip Technology Inc. ...

Page 103

... Small Outline, 3.90 mm (SOIC Thin Shrink Small Outline (TSSOP) Pattern: Special Requirements © 2007 Microchip Technology Inc. XXX Examples: Pattern a) PIC16F526-E/P 301 = Extended Temp., PDIP package, QTP pattern #301 b) PIC16F526-I/SN = Industrial Temp., SOIC package c) PIC16F526T-E/P = Extended Temp., PDIP package, Tape and Reel (2) (2) (2) ...

Page 104

... Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 Preliminary © 2007 Microchip Technology Inc. EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 ...

Related keywords