2004 Microchip Technology Inc. Preliminary DS40044BPIC16F627A/628A/648AData SheetFlash-Based 8-Bit CMOSMicrocontrollers with nanoWatt Technology
PIC16F627A/628A/648ADS40044B-page 8 Preliminary 2004 Microchip Technology Inc.NOTES:
PIC16F627A/628A/648ADS40044B-page 98 Preliminary 2004 Microchip Technology Inc.14.4 Power-on Reset (POR), Power-up Timer (PWRT), Oscillator Start-up
2004 Microchip Technology Inc. Preliminary DS40044B-page 99PIC16F627A/628A/648A14.4.5 TIME OUT SEQUENCEOn power-up the time out sequence is as follo
PIC16F627A/628A/648ADS40044B-page 100 Preliminary 2004 Microchip Technology Inc.TABLE 14-5: SUMMARY OF REGISTERS ASSOCIATED WITH BROWN-OUT RESETTABL
2004 Microchip Technology Inc. Preliminary DS40044B-page 101PIC16F627A/628A/648ATABLE 14-7: INITIALIZATION CONDITION FOR REGISTERSRegister AddressPo
PIC16F627A/628A/648ADS40044B-page 102 Preliminary 2004 Microchip Technology Inc.FIGURE 14-8: TIME OUT SEQUENCE ON POWER-UP (MCLR NOT TIED TO VDD): C
2004 Microchip Technology Inc. Preliminary DS40044B-page 103PIC16F627A/628A/648AFIGURE 14-11: EXTERNAL POWER-ON RESET CIRCUIT (FOR SLOW VDD POWER-UP
PIC16F627A/628A/648ADS40044B-page 104 Preliminary 2004 Microchip Technology Inc.14.5 InterruptsThe PIC16F627A/628A/648A has 10 sources ofinterrupt:
2004 Microchip Technology Inc. Preliminary DS40044B-page 105PIC16F627A/628A/648A14.5.1 RB0/INT INTERRUPTExternal interrupt on RB0/INT pin is edge tr
PIC16F627A/628A/648ADS40044B-page 106 Preliminary 2004 Microchip Technology Inc.TABLE 14-8: SUMMARY OF INTERRUPT REGISTERS14.6 Context Saving During
2004 Microchip Technology Inc. Preliminary DS40044B-page 107PIC16F627A/628A/648AFIGURE 14-16: WATCHDOG TIMER BLOCK DIAGRAMTABLE 14-9: SUMMARY OF WAT
2004 Microchip Technology Inc. Preliminary DS40044B-page 9PIC16F627A/628A/648A3.0 ARCHITECTURAL OVERVIEWThe high performance of the PIC16F627A/628A/
PIC16F627A/628A/648ADS40044B-page 108 Preliminary 2004 Microchip Technology Inc.14.8.1 WAKE-UP FROM SLEEPThe device can wake-up from Sleep through o
2004 Microchip Technology Inc. Preliminary DS40044B-page 109PIC16F627A/628A/648A14.11 In-Circuit Serial ProgrammingThe PIC16F627A/628A/648A microcon
PIC16F627A/628A/648ADS40044B-page 110 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 111PIC16F627A/628A/648A15.0 INSTRUCTION SET SUMMARYEach PIC16F627A/628A/648A instruction is
PIC16F627A/628A/648ADS40044B-page 112 Preliminary 2004 Microchip Technology Inc.TABLE 15-2: PIC16F627A/628A/648A INSTRUCTION SET Mnemonic,OperandsDe
2004 Microchip Technology Inc. Preliminary DS40044B-page 113PIC16F627A/628A/648A15.1 Instruction Descriptions ADDLW Add Literal and WSyntax: [ label
PIC16F627A/628A/648ADS40044B-page 114 Preliminary 2004 Microchip Technology Inc.BCF Bit Clear fSyntax: [ label ] BCF f,bOperands: 0 ≤ f ≤ 1270 ≤
2004 Microchip Technology Inc. Preliminary DS40044B-page 115PIC16F627A/628A/648ABTFSS Bit Test f, Skip if SetSyntax: [ label ] BTFSS f,bOperands:
PIC16F627A/628A/648ADS40044B-page 116 Preliminary 2004 Microchip Technology Inc.CLRW Clear WSyntax: [ label ] CLRWOperands: NoneOperation: 00h → (
2004 Microchip Technology Inc. Preliminary DS40044B-page 117PIC16F627A/628A/648ADECFSZ Decrement f, Skip if 0Syntax: [ label ] DECFSZ f,dOperand
PIC16F627A/628A/648ADS40044B-page 10 Preliminary 2004 Microchip Technology Inc.FIGURE 3-1: BLOCK DIAGRAM Note: Higher order bits are from the Sta
PIC16F627A/628A/648ADS40044B-page 118 Preliminary 2004 Microchip Technology Inc.INCF Increment fSyntax: [ label ] INCF f,dOperands: 0 ≤ f ≤ 127
2004 Microchip Technology Inc. Preliminary DS40044B-page 119PIC16F627A/628A/648AIORLW Inclusive OR Literal with WSyntax: [ label ] IORLW kOpera
PIC16F627A/628A/648ADS40044B-page 120 Preliminary 2004 Microchip Technology Inc.MOVWF Move W to fSyntax: [ label ] MOVWF fOperands: 0 ≤ f ≤ 1
2004 Microchip Technology Inc. Preliminary DS40044B-page 121PIC16F627A/628A/648ARETLW Return with Literal in WSyntax: [ label ] RETLW kOperands
PIC16F627A/628A/648ADS40044B-page 122 Preliminary 2004 Microchip Technology Inc.RRF Rotate Right f through CarrySyntax: [ label ] RRF f,dOperan
2004 Microchip Technology Inc. Preliminary DS40044B-page 123PIC16F627A/628A/648ASUBWF Subtract W from fSyntax: [ label ] SUBWF f,dOperands: 0 ≤ f
PIC16F627A/628A/648ADS40044B-page 124 Preliminary 2004 Microchip Technology Inc.XORLW Exclusive OR Literal with WSyntax: [ label ]XORLW kOperands:
2004 Microchip Technology Inc. Preliminary DS40044B-page 125PIC16F627A/628A/648A16.0 DEVELOPMENT SUPPORTThe PICmicro® microcontrollers are supported
PIC16F627A/628A/648ADS40044B-page 126 Preliminary 2004 Microchip Technology Inc.16.3 MPLAB C17 and MPLAB C18 C CompilersThe MPLAB C17 and MPLAB C18
2004 Microchip Technology Inc. Preliminary DS40044B-page 127PIC16F627A/628A/648A16.9 MPLAB ICE 2000 High-Performance Universal In-Circuit EmulatorTh
2004 Microchip Technology Inc. Preliminary DS40044B-page 11PIC16F627A/628A/648ATABLE 3-2: PIC16F627A/628A/648A PINOUT DESCRIPTIONName Function Input
PIC16F627A/628A/648ADS40044B-page 128 Preliminary 2004 Microchip Technology Inc.16.14 PICSTART Plus Development ProgrammerThe PICSTART Plus developm
2004 Microchip Technology Inc. Preliminary DS40044B-page 129PIC16F627A/628A/648A16.20 PICDEM 17 Demonstration BoardThe PICDEM 17 demonstration board
PIC16F627A/628A/648ADS40044B-page 130 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 131PIC16F627A/628A/648A17.0 ELECTRICAL SPECIFICATIONSAbsolute Maximum Ratings(†)Ambient tem
PIC16F627A/628A/648ADS40044B-page 132 Preliminary 2004 Microchip Technology Inc.FIGURE 17-1: PIC16F627A/628A/648A VOLTAGE-FREQUENCY GRAPH, -40°C ≤ T
2004 Microchip Technology Inc. Preliminary DS40044B-page 133PIC16F627A/628A/648A17.1 DC Characteristics: PIC16F627A/628A/648A (Industrial, Extended)
PIC16F627A/628A/648ADS40044B-page 134 Preliminary 2004 Microchip Technology Inc.17.2 DC Characteristics: PIC16F627A/628A/648A (Industrial)PIC16LF627
2004 Microchip Technology Inc. Preliminary DS40044B-page 135PIC16F627A/628A/648A17.3 DC Characteristics: PIC16F627A/628A/648A (Extended)Standard Ope
PIC16F627A/628A/648ADS40044B-page 136 Preliminary 2004 Microchip Technology Inc.17.4 DC Characteristics: PIC16F627A/628A/648A (Industrial, Extended)
2004 Microchip Technology Inc. Preliminary DS40044B-page 137PIC16F627A/628A/648ATABLE 17-1: DC Characteristics: PIC16F627A/628A/648A (Industrial,
PIC16F627A/628A/648ADS40044B-page 12 Preliminary 2004 Microchip Technology Inc.RB4/PGM RB4 TTL CMOS Bidirectional I/O port. Interrupt-on-pin change.
PIC16F627A/628A/648ADS40044B-page 138 Preliminary 2004 Microchip Technology Inc.TABLE 17-2: COMPARATOR SPECIFICATIONS TABLE 17-3: VOLTAGE REFERENCE
2004 Microchip Technology Inc. Preliminary DS40044B-page 139PIC16F627A/628A/648A17.5 Timing Parameter SymbologyThe timing parameter symbols have bee
PIC16F627A/628A/648ADS40044B-page 140 Preliminary 2004 Microchip Technology Inc.17.6 Timing Diagrams and SpecificationsFIGURE 17-4: EXTERNAL CLOCK T
2004 Microchip Technology Inc. Preliminary DS40044B-page 141PIC16F627A/628A/648ATABLE 17-5: PRECISION INTERNAL OSCILLATOR PARAMETERS FIGURE 17-5: C
PIC16F627A/628A/648ADS40044B-page 142 Preliminary 2004 Microchip Technology Inc.TABLE 17-6: CLKOUT AND I/O TIMING REQUIREMENTSFIGURE 17-6: RESET, WA
2004 Microchip Technology Inc. Preliminary DS40044B-page 143PIC16F627A/628A/648AFIGURE 17-7: BROWN-OUT DETECT TIMINGTABLE 17-7: RESET, WATCHDOG TIME
PIC16F627A/628A/648ADS40044B-page 144 Preliminary 2004 Microchip Technology Inc.TABLE 17-8: TIMER0 AND TIMER1 EXTERNAL CLOCK REQUIREMENTSFIGURE 17-9
2004 Microchip Technology Inc. Preliminary DS40044B-page 145PIC16F627A/628A/648ATABLE 17-9: CAPTURE/COMPARE/PWM REQUIREMENTSFIGURE 17-10: TIMER0 CLO
PIC16F627A/628A/648ADS40044B-page 146 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 147PIC16F627A/628A/648A18.0 DC AND AC CHARACTERISTICS GRAPHS AND TABLESNot Available at thi
2004 Microchip Technology Inc. Preliminary DS40044B-page 13PIC16F627A/628A/648A3.1 Clocking Scheme/Instruction CycleThe clock input (OSC1/CLKIN/RA7
PIC16F627A/628A/648ADS40044B-page 148 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 149PIC16F627A/628A/648A19.0 PACKAGING INFORMATION19.1 Package Marking Information* Standard
PIC16F627A/628A/648ADS40044B-page 150 Preliminary 2004 Microchip Technology Inc.18-Lead Plastic Dual In-line (P) – 300 mil (PDIP) 1510515105βMold Dr
2004 Microchip Technology Inc. Preliminary DS40044B-page 151PIC16F627A/628A/648A18-Lead Plastic Small Outline (SO) – Wide, 300 mil (SOIC)Foot Angleφ
PIC16F627A/628A/648ADS40044B-page 152 Preliminary 2004 Microchip Technology Inc.20-Lead Plastic Shrink Small Outline (SS) – 209 mil, 5.30 mm (SSOP)1
2004 Microchip Technology Inc. Preliminary DS40044B-page 153PIC16F627A/628A/648A28-Lead Plastic Quad Flat No Lead Package (ML) 6x6 mm Body (QFN) L
PIC16F627A/628A/648ADS40044B-page 154 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 155PIC16F627A/628A/648AAPPENDIX A: DATA SHEET REVISION HISTORYRevision AThis is a new data
PIC16F627A/628A/648ADS40044B-page 156 Preliminary 2004 Microchip Technology Inc.APPENDIX C: DEVICE MIGRATIONSThis section describes the functional a
2004 Microchip Technology Inc. Preliminary DS40044B-page 157PIC16F627A/628A/648AAPPENDIX E: DEVELOPMENT TOOL VERSION REQUIREMENTSThis lists the mini
PIC16F627A/628A/648ADS40044B-page 14 Preliminary 2004 Microchip Technology Inc.NOTES:
PIC16F627A/628A/648ADS40044B-page 158 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 159PIC16F627A/628A/648AON-LINE SUPPORTMicrochip provides on-line support on the MicrochipWo
PIC16F627A/628A/648ADS40044B-page 160 Preliminary 2004 Microchip Technology Inc.READER RESPONSEIt is our intention to provide you with the best docu
2004 Microchip Technology Inc. Preliminary DS40044B-page 161PIC16F627A/628A/648AINDEX AA/DSpecial Event Trigger (CCP)...
PIC16F627A/628A/648ADS40044B-page 162 Preliminary 2004 Microchip Technology Inc.EEECON1 register ...
2004 Microchip Technology Inc. Preliminary DS40044B-page 163PIC16F627A/628A/648APower Control/Status Register (PCON) ...
PIC16F627A/628A/648ADS40044B-page 164 Preliminary 2004 Microchip Technology Inc.Sampling ... 7
2004 Microchip Technology Inc. Preliminary DS40044B-page 165PIC16F627A/628A/648APRODUCT IDENTIFICATION SYSTEMTo order or obtain information, e.g., o
DS40044B-page 166 Preliminary 2004 Microchip Technology Inc.AMERICASCorporate Office2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-72
2004 Microchip Technology Inc. Preliminary DS40044B-page 15PIC16F627A/628A/648A4.0 MEMORY ORGANIZATION4.1 Program Memory OrganizationThe PIC16F627A/
PIC16F627A/628A/648ADS40044B-page 16 Preliminary 2004 Microchip Technology Inc.FIGURE 4-2: DATA MEMORY MAP OF THE PIC16F627A AND PIC16F628A Indirect
2004 Microchip Technology Inc. Preliminary DS40044B-page 17PIC16F627A/628A/648AFIGURE 4-3: DATA MEMORY MAP OF THE PIC16F648A Indirect addr.(1)TMR0PC
DS40044B-page ii Preliminary 2004 Microchip Technology Inc.Information contained in this publication regarding deviceapplications and the like is in
PIC16F627A/628A/648ADS40044B-page 18 Preliminary 2004 Microchip Technology Inc.4.2.2 SPECIAL FUNCTION REGISTERSThe SFRs are registers used by the CP
2004 Microchip Technology Inc. Preliminary DS40044B-page 19PIC16F627A/628A/648ATABLE 4-4: SPECIAL FUNCTION REGISTERS SUMMARY BANK1Address Name Bit 7
PIC16F627A/628A/648ADS40044B-page 20 Preliminary 2004 Microchip Technology Inc.TABLE 4-5: SPECIAL FUNCTION REGISTERS SUMMARY BANK2Address Name Bit 7
2004 Microchip Technology Inc. Preliminary DS40044B-page 21PIC16F627A/628A/648ATABLE 4-6: SPECIAL FUNCTION REGISTERS SUMMARY BANK3Address Name Bit 7
PIC16F627A/628A/648ADS40044B-page 22 Preliminary 2004 Microchip Technology Inc.4.2.2.1 Status RegisterThe Status Register, shown in Register 4-1, co
2004 Microchip Technology Inc. Preliminary DS40044B-page 23PIC16F627A/628A/648A4.2.2.2 OPTION RegisterThe OPTION register is a readable and writable
PIC16F627A/628A/648ADS40044B-page 24 Preliminary 2004 Microchip Technology Inc.4.2.2.3 INTCON RegisterThe INTCON register is a readable and writable
2004 Microchip Technology Inc. Preliminary DS40044B-page 25PIC16F627A/628A/648A4.2.2.4 PIE1 RegisterThis register contains interrupt enable bits.REG
PIC16F627A/628A/648ADS40044B-page 26 Preliminary 2004 Microchip Technology Inc.4.2.2.5 PIR1 RegisterThis register contains interrupt flag bits. REGI
2004 Microchip Technology Inc. Preliminary DS40044B-page 27PIC16F627A/628A/648A4.2.2.6 PCON RegisterThe PCON register contains flag bits to differen
2004 Microchip Technology Inc. Preliminary DS40044B-page 1PIC16F627A/628A/648AHigh Performance RISC CPU:• Operating speeds from DC - 20 MHz• Interru
PIC16F627A/628A/648ADS40044B-page 28 Preliminary 2004 Microchip Technology Inc.4.3 PCL and PCLATHThe program counter (PC) is 13-bits wide. The low b
2004 Microchip Technology Inc. Preliminary DS40044B-page 29PIC16F627A/628A/648AFIGURE 4-5: DIRECT/INDIRECT ADDRESSING PIC16F627A/628A/648A Note: For
PIC16F627A/628A/648ADS40044B-page 30 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 31PIC16F627A/628A/648A5.0 I/O PORTSThe PIC16F627A/628A/648A have two ports, PORTAand PORTB.
PIC16F627A/628A/648ADS40044B-page 32 Preliminary 2004 Microchip Technology Inc.FIGURE 5-2: BLOCK DIAGRAM OF RA2/VREF PINFIGURE 5-3: BLOCK DIAGRAM OF
2004 Microchip Technology Inc. Preliminary DS40044B-page 33PIC16F627A/628A/648AFIGURE 5-4: BLOCK DIAGRAM OF RA4/T0CKI PINFIGURE 5-5: BLOCK DIAGRAM O
PIC16F627A/628A/648ADS40044B-page 34 Preliminary 2004 Microchip Technology Inc.FIGURE 5-7: BLOCK DIAGRAM OF RA7/OSC1/CLKIN PINData BusQDQCKWR PORTAW
2004 Microchip Technology Inc. Preliminary DS40044B-page 35PIC16F627A/628A/648ATABLE 5-1: PORTA FUNCTIONSName FunctionInput TypeOutput TypeDescripti
PIC16F627A/628A/648ADS40044B-page 36 Preliminary 2004 Microchip Technology Inc.TABLE 5-2: SUMMARY OF REGISTERS ASSOCIATED WITH PORTA(1) 5.2 PORTB an
2004 Microchip Technology Inc. Preliminary DS40044B-page 37PIC16F627A/628A/648AFIGURE 5-8: BLOCK DIAGRAM OF RB0/INT PIN FIGURE 5-9: BLOCK DIAGRAM OF
PIC16F627A/628A/648ADS40044B-page 2 Preliminary 2004 Microchip Technology Inc.Pin Diagrams19181615141312111720PDIP, SOICSSOPPIC16F627A/628A/648ARA6/
PIC16F627A/628A/648ADS40044B-page 38 Preliminary 2004 Microchip Technology Inc.FIGURE 5-10: BLOCK DIAGRAM OF RB2/TX/CK PINFIGURE 5-11: BLOCK DIAGRAM
2004 Microchip Technology Inc. Preliminary DS40044B-page 39PIC16F627A/628A/648AFIGURE 5-12: BLOCK DIAGRAM OF RB4/PGM PINData LatchTRIS LatchRD TRISB
PIC16F627A/628A/648ADS40044B-page 40 Preliminary 2004 Microchip Technology Inc.FIGURE 5-13: BLOCK DIAGRAM OF RB5 PINData BusWR PORTBWR TRISBRD PORTB
2004 Microchip Technology Inc. Preliminary DS40044B-page 41PIC16F627A/628A/648AFIGURE 5-14: BLOCK DIAGRAM OF RB6/T1OSO/T1CKI PINData LatchTRIS Latc
PIC16F627A/628A/648ADS40044B-page 42 Preliminary 2004 Microchip Technology Inc.FIGURE 5-15: BLOCK DIAGRAM OF THE RB7/T1OSI PINData LatchTRIS LatchRD
2004 Microchip Technology Inc. Preliminary DS40044B-page 43PIC16F627A/628A/648ATABLE 5-3: PORTB FUNCTIONSTABLE 5-4: SUMMARY OF REGISTERS ASSOCIATED
PIC16F627A/628A/648ADS40044B-page 44 Preliminary 2004 Microchip Technology Inc.5.3 I/O Programming Considerations5.3.1 BIDIRECTIONAL I/O PORTSAny in
2004 Microchip Technology Inc. Preliminary DS40044B-page 45PIC16F627A/628A/648A6.0 TIMER0 MODULEThe Timer0 module timer/counter has the followingfea
PIC16F627A/628A/648ADS40044B-page 46 Preliminary 2004 Microchip Technology Inc.6.3 Timer0 PrescalerAn 8-bit counter is available as a prescaler for
2004 Microchip Technology Inc. Preliminary DS40044B-page 47PIC16F627A/628A/648A6.3.1 SWITCHING PRESCALER ASSIGNMENTThe prescaler assignment is fully
2004 Microchip Technology Inc. Preliminary DS40044B-page 3PIC16F627A/628A/648ATable of Contents1.0 General Description...
PIC16F627A/628A/648ADS40044B-page 48 Preliminary 2004 Microchip Technology Inc.7.0 TIMER1 MODULEThe Timer1 module is a 16-bit timer/counter consisti
2004 Microchip Technology Inc. Preliminary DS40044B-page 49PIC16F627A/628A/648A7.1 Timer1 Operation in Timer ModeTimer mode is selected by clearing
PIC16F627A/628A/648ADS40044B-page 50 Preliminary 2004 Microchip Technology Inc.7.3 Timer1 Operation in Asynchronous Counter ModeIf control bit T1SYN
2004 Microchip Technology Inc. Preliminary DS40044B-page 51PIC16F627A/628A/648A7.4 Timer1 OscillatorA crystal oscillator circuit is built in between
PIC16F627A/628A/648ADS40044B-page 52 Preliminary 2004 Microchip Technology Inc.8.0 TIMER2 MODULETimer2 is an 8-bit timer with a prescaler and aposts
2004 Microchip Technology Inc. Preliminary DS40044B-page 53PIC16F627A/628A/648AREGISTER 8-1: T2CON: TIMER2 CONTROL REGISTER (ADDRESS: 12h) TABLE
PIC16F627A/628A/648ADS40044B-page 54 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 55PIC16F627A/628A/648A9.0 CAPTURE/COMPARE/PWM (CCP) MODULEThe CCP (Capture/Compare/PWM) mod
PIC16F627A/628A/648ADS40044B-page 56 Preliminary 2004 Microchip Technology Inc.9.1 Capture ModeIn Capture mode, CCPR1H:CCPR1L captures the16-bit val
2004 Microchip Technology Inc. Preliminary DS40044B-page 57PIC16F627A/628A/648A9.2.1 CCP PIN CONFIGURATIONThe user must configure the RB3/CCP1 pin a
PIC16F627A/628A/648ADS40044B-page 4 Preliminary 2004 Microchip Technology Inc.NOTES:
PIC16F627A/628A/648ADS40044B-page 58 Preliminary 2004 Microchip Technology Inc.9.3 PWM ModeIn Pulse Width Modulation (PWM) mode, the CCP1 pinproduce
2004 Microchip Technology Inc. Preliminary DS40044B-page 59PIC16F627A/628A/648A9.3.2 PWM DUTY CYCLEThe PWM duty cycle is specified by writing to the
PIC16F627A/628A/648ADS40044B-page 60 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 61PIC16F627A/628A/648A10.0 COMPARATOR MODULEThe Comparator module contains two analogcompar
PIC16F627A/628A/648ADS40044B-page 62 Preliminary 2004 Microchip Technology Inc.10.1 Comparator ConfigurationThere are eight modes of operation for t
2004 Microchip Technology Inc. Preliminary DS40044B-page 63PIC16F627A/628A/648AThe code example in Example 10-1 depicts the stepsrequired to configu
PIC16F627A/628A/648ADS40044B-page 64 Preliminary 2004 Microchip Technology Inc.10.5 Comparator OutputsThe comparator outputs are read through the CM
2004 Microchip Technology Inc. Preliminary DS40044B-page 65PIC16F627A/628A/648A10.6 Comparator InterruptsThe comparator interrupt flag is set whenev
PIC16F627A/628A/648ADS40044B-page 66 Preliminary 2004 Microchip Technology Inc.FIGURE 10-4: ANALOG INPUT MODE TABLE 10-1: REGISTERS ASSOCIATED WITH
2004 Microchip Technology Inc. Preliminary DS40044B-page 67PIC16F627A/628A/648A11.0 VOLTAGE REFERENCE MODULEThe Voltage Reference is a 16-tap resist
2004 Microchip Technology Inc. Preliminary DS40044B-page 5PIC16F627A/628A/648A1.0 GENERAL DESCRIPTIONThe PIC16F627A/628A/648A are 18-Pin Flash-based
PIC16F627A/628A/648ADS40044B-page 68 Preliminary 2004 Microchip Technology Inc.EXAMPLE 11-1: VOLTAGE REFERENCE CONFIGURATION 11.2 Voltage Reference
2004 Microchip Technology Inc. Preliminary DS40044B-page 69PIC16F627A/628A/648A12.0 UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER (USART)
PIC16F627A/628A/648ADS40044B-page 70 Preliminary 2004 Microchip Technology Inc.REGISTER 12-2: RCSTA: RECEIVE STATUS AND CONTROL REGISTER (ADDRESS: 1
2004 Microchip Technology Inc. Preliminary DS40044B-page 71PIC16F627A/628A/648A12.1 USART Baud Rate Generator (BRG)The BRG supports both the Asynchr
PIC16F627A/628A/648ADS40044B-page 72 Preliminary 2004 Microchip Technology Inc.TABLE 12-3: BAUD RATES FOR SYNCHRONOUS MODE BAUDRATE (K) FOSC = 20 M
2004 Microchip Technology Inc. Preliminary DS40044B-page 73PIC16F627A/628A/648ATABLE 12-4: BAUD RATES FOR ASYNCHRONOUS MODE (BRGH = 0) BAUDRATE
PIC16F627A/628A/648ADS40044B-page 74 Preliminary 2004 Microchip Technology Inc.TABLE 12-5: BAUD RATES FOR ASYNCHRONOUS MODE (BRGH = 1) BAUDRATE
2004 Microchip Technology Inc. Preliminary DS40044B-page 75PIC16F627A/628A/648AThe data on the RB1/RX/DT pin is sampled three timesby a majority det
PIC16F627A/628A/648ADS40044B-page 76 Preliminary 2004 Microchip Technology Inc.FIGURE 12-4: RX PIN SAMPLING SCHEME, BRGH = 0 OR BRGH = 1 12.2 USART
2004 Microchip Technology Inc. Preliminary DS40044B-page 77PIC16F627A/628A/648AFIGURE 12-5: USART TRANSMIT BLOCK DIAGRAM Follow these steps when s
PIC16F627A/628A/648ADS40044B-page 6 Preliminary 2004 Microchip Technology Inc.NOTES:
PIC16F627A/628A/648ADS40044B-page 78 Preliminary 2004 Microchip Technology Inc.FIGURE 12-7: ASYNCHRONOUS TRANSMISSION (BACK TO BACK)TABLE 12-6: REGI
2004 Microchip Technology Inc. Preliminary DS40044B-page 79PIC16F627A/628A/648A12.2.2 USART ASYNCHRONOUS RECEIVERThe receiver block diagram is shown
PIC16F627A/628A/648ADS40044B-page 80 Preliminary 2004 Microchip Technology Inc.FIGURE 12-9: ASYNCHRONOUS RECEPTION WITH ADDRESS DETECTFIGURE 12-10:
2004 Microchip Technology Inc. Preliminary DS40044B-page 81PIC16F627A/628A/648AFollow these steps when setting up an AsynchronousReception:1. TRISB&
PIC16F627A/628A/648ADS40044B-page 82 Preliminary 2004 Microchip Technology Inc.12.3 USART Address Detect Function12.3.1 USART 9-BIT RECEIVER WITH AD
2004 Microchip Technology Inc. Preliminary DS40044B-page 83PIC16F627A/628A/648A12.4 USART Synchronous Master ModeIn Synchronous Master mode, the dat
PIC16F627A/628A/648ADS40044B-page 84 Preliminary 2004 Microchip Technology Inc.TABLE 12-9: REGISTERS ASSOCIATED WITH SYNCHRONOUS MASTER TRANSMISSION
2004 Microchip Technology Inc. Preliminary DS40044B-page 85PIC16F627A/628A/648A12.4.2 USART SYNCHRONOUS MASTER RECEPTIONOnce Synchronous mode is sel
PIC16F627A/628A/648ADS40044B-page 86 Preliminary 2004 Microchip Technology Inc.FIGURE 12-14: SYNCHRONOUS RECEPTION (MASTER MODE, SREN)12.5 USART Syn
2004 Microchip Technology Inc. Preliminary DS40044B-page 87PIC16F627A/628A/648A12.5.2 USART SYNCHRONOUS SLAVE RECEPTIONThe operation of the Synchron
2004 Microchip Technology Inc. Preliminary DS40044B-page 7PIC16F627A/628A/648A2.0 PIC16F627A/628A/648A DEVICE VARIETIESA variety of frequency ranges
PIC16F627A/628A/648ADS40044B-page 88 Preliminary 2004 Microchip Technology Inc.NOTES:
2004 Microchip Technology Inc. Preliminary DS40044B-page 89PIC16F627A/628A/648A13.0 DATA EEPROM MEMORYThe EEPROM data memory is readable and writabl
PIC16F627A/628A/648ADS40044B-page 90 Preliminary 2004 Microchip Technology Inc.13.1 EEADR The PIC16F648A EEADR register addresses 256bytes of data E
2004 Microchip Technology Inc. Preliminary DS40044B-page 91PIC16F627A/628A/648A13.3 READING THE EEPROM DATA MEMORYTo read a data memory location, th
PIC16F627A/628A/648ADS40044B-page 92 Preliminary 2004 Microchip Technology Inc.13.7 Using the Data EEPROMThe data EEPROM is a high endurance, byte a
2004 Microchip Technology Inc. Preliminary DS40044B-page 93PIC16F627A/628A/648A14.0 SPECIAL FEATURES OF THE CPUSpecial circuits to deal with the nee
PIC16F627A/628A/648ADS40044B-page 94 Preliminary 2004 Microchip Technology Inc.REGISTER 14-1: CONFIGURATION WORD CP — — — — CPD LVP BOREN M
2004 Microchip Technology Inc. Preliminary DS40044B-page 95PIC16F627A/628A/648A14.2 Oscillator Configurations14.2.1 OSCILLATOR TYPESThe PIC16F627A/6
PIC16F627A/628A/648ADS40044B-page 96 Preliminary 2004 Microchip Technology Inc.FIGURE 14-2: EXTERNAL PARALLEL RESONANT CRYSTAL OSCILLATOR CIRCUIT Fi
2004 Microchip Technology Inc. Preliminary DS40044B-page 97PIC16F627A/628A/648A14.2.8 SPECIAL FEATURE: DUAL SPEED OSCILLATOR MODESA software program
Kommentare zu diesen Handbüchern