PIC16F628-20/P Microchip Technology Inc., PIC16F628-20/P Datasheet - Page 163
![no-image](/images/manufacturer_photos/0/4/440/microchip_technology_inc__sml.jpg)
PIC16F628-20/P
Manufacturer Part Number
PIC16F628-20/P
Description
18 PIN, 3.5 KB FLASH, 224 RAM, 16 I/O
Manufacturer
Microchip Technology Inc.
Datasheet
1.PIC16F628-20P.pdf
(170 pages)
Specifications of PIC16F628-20/P
Comparators
2
Cpu Speed
5 MIPS
Eeprom Memory
128 Bytes
Input Output
16
Interface
SCI/USART
Memory Type
Flash
Number Of Bits
8
Package Type
18-pin PDIP
Programmable Memory
3.5K Bytes
Ram Size
224 Bytes
Speed
20 MHz
Timers
2-8-bit, 1-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part
Electrostatic Device
INDEX
A
A/D
Absolute Maximum Ratings .............................................. 127
ADDLW Instruction ........................................................... 109
ADDWF Instruction ........................................................... 109
ANDLW Instruction ........................................................... 109
ANDWF Instruction ........................................................... 109
Architectural Overview .......................................................... 7
Assembler
B
Baud Rate Error .................................................................. 69
Baud Rate Formula ............................................................. 69
BCF Instruction ................................................................. 110
Block Diagram
Block Diagrams
BRGH bit ............................................................................. 69
Brown-Out Detect (BOD) .................................................... 96
BSF Instruction ................................................................. 110
BTFSC Instruction............................................................. 110
BTFSS Instruction ............................................................. 111
C
CALL Instruction ............................................................... 111
Capture (CCP Module) ....................................................... 62
Capture/Compare/PWM (CCP)........................................... 61
CCP1CON Register
CCP2CON Register
Clocking Scheme/Instruction Cycle .................................... 11
CLRF Instruction ............................................................... 111
CLRW Instruction .............................................................. 112
CLRWDT Instruction ......................................................... 112
Code Protection ................................................................ 105
COMF Instruction .............................................................. 112
Comparator Configuration................................................... 54
2003 Microchip Technology Inc.
Special Event Trigger (CCP)....................................... 63
MPASM Assembler ................................................... 121
TMR0/WDT PRESCALER .......................................... 44
Comparator I/O Operating Modes............................... 54
Comparator Output ..................................................... 56
RA3:RA0 and RA5 Port Pins ...................................... 35
Timer1 ......................................................................... 47
Timer2 ......................................................................... 50
USART Receive.......................................................... 77
USART Transmit ......................................................... 75
Block Diagram............................................................. 62
CCP Pin Configuration................................................ 62
CCPR1H:CCPR1L Registers...................................... 62
Changing Between Capture Prescalers...................... 62
Software Interrupt ....................................................... 62
Timer1 Mode Selection ............................................... 62
Capture Mode. See Capture
CCP1 .......................................................................... 61
CCP2 .......................................................................... 61
Compare Mode. See Compare
PWM Mode. See PWM
Timer Resources......................................................... 61
CCP1M3:CCP1M0 Bits............................................... 61
CCP1X:CCP1Y Bits .................................................... 61
CCP2M3:CCP2M0 Bits............................................... 61
CCP2X:CCP2Y Bits .................................................... 61
CCPR1H Register............................................... 61
CCPR1L Register ............................................... 61
Preliminary
Comparator Interrupts......................................................... 57
Comparator Module ............................................................ 53
Comparator Operation ........................................................ 55
Comparator Reference ....................................................... 55
Compare (CCP Module) ..................................................... 62
Configuration Bits ............................................................... 91
Configuring the Voltage Reference..................................... 59
Crystal Operation................................................................ 93
D
DATA .................................................................................. 89
Data .................................................................................... 88
Data EEPROM Memory...................................................... 87
Data Memory Organization................................................. 13
DECF Instruction .............................................................. 112
DECFSZ Instruction.......................................................... 113
Development Support ....................................................... 121
E
Errata .................................................................................... 3
External Crystal Oscillator Circuit ....................................... 93
G
General purpose Register File............................................ 13
GOTO Instruction.............................................................. 113
I
I/O Ports ............................................................................. 29
I/O Programming Considerations ....................................... 42
ID Locations...................................................................... 105
INCF Instruction................................................................ 114
INCFSZ Instruction ........................................................... 114
In-Circuit Serial Programming........................................... 106
Indirect Addressing, INDF and FSR Registers ................... 25
Instruction Flow/Pipelining .................................................. 11
Instruction Set
Block Diagram ............................................................ 62
CCP Pin Configuration ............................................... 62
CCPR1H:CCPR1L Registers ..................................... 62
Software Interrupt ....................................................... 63
Special Event Trigger ................................................. 63
Timer1 Mode Selection............................................... 63
EECON1 Register ...................................................... 87
EECON2 Register ...................................................... 87
ADDLW ..................................................................... 109
ADDWF .................................................................... 109
ANDLW ..................................................................... 109
ANDWF .................................................................... 109
BCF .......................................................................... 110
BSF........................................................................... 110
BTFSC...................................................................... 110
BTFSS ...................................................................... 111
CALL......................................................................... 111
CLRF ........................................................................ 111
CLRW ....................................................................... 112
CLRWDT .................................................................. 112
COMF ....................................................................... 112
DECF........................................................................ 112
DECFSZ ................................................................... 113
GOTO ....................................................................... 113
INCF ......................................................................... 114
INCFSZ..................................................................... 114
IORLW ...................................................................... 115
IORWF...................................................................... 115
MOVF ....................................................................... 115
PIC16F62X
DS40300C-page 161