English
Language : 

PIC18F1220 Datasheet, PDF (303/310 Pages) Microchip Technology – 18/20/28-Pin High-Performance, Enhanced Flash Microcontrollers with 10-bit A/D and nanoWatt Technology
Pin Functions
MCLR/VPP/RA5 ............................................................ 8
OSC1/CLKI/RA7 .......................................................... 8
OSC2/CLKO/RA6 ........................................................ 8
RA0/AN0 ...................................................................... 8
RA1/AN1/LVDIN .......................................................... 8
RA2/AN2/VREF- ............................................................ 8
RA3/AN3/VREF+ ........................................................... 8
RA4/T0CKI ................................................................... 8
RB0/AN4/INT0 ............................................................. 9
RB1/AN5/TX/CK/INT1 .................................................. 9
RB2/P1B/INT2 ............................................................. 9
RB3/CCP1/P1A ............................................................ 9
RB4/AN6/RX/DT/KBI0 ................................................. 9
RB5/PGM/KBI1 ............................................................ 9
RB6/PGC/T1OSO/T13CKI/P1C/KBI2 .......................... 9
RB7/PGD/T1OSI/P1D/KBI3 ......................................... 9
VDD ............................................................................... 9
VSS ............................................................................... 9
Pinout I/O Descriptions
PIC18F1220/1320 ........................................................ 8
PIR Registers ..................................................................... 78
PLL Lock Time-out ............................................................. 34
Pointer, FSR ....................................................................... 53
POP .................................................................................. 220
POR. See Power-on Reset.
PORTA
Associated Registers ................................................. 89
Functions ................................................................... 89
LATA Register ............................................................ 87
PORTA Register ........................................................ 87
TRISA Register .......................................................... 87
PORTB
Associated Registers ................................................. 98
Functions ................................................................... 98
LATB Register ............................................................ 90
PORTB Register ........................................................ 90
RB7:RB4 Interrupt-on-Change
Flag (RBIF Bit) ................................................... 90
TRISB Register .......................................................... 90
Postscaler
Timer2 ...................................................................... 109
WDT
Assignment (PSA Bit) ...................................... 101
Rate Select (T0PS2:T0PS0 Bits) ..................... 101
Power Managed Modes ..................................................... 19
Comparison between Run
and Idle Modes .................................................. 20
Entering ...................................................................... 20
Idle Modes ................................................................. 21
Multiple Sleep Commands ......................................... 20
Run Modes ................................................................. 26
Selecting .................................................................... 19
Sleep Mode ................................................................ 21
Summary (table) ........................................................ 19
Wake from .................................................................. 28
Power-on Reset (POR) .............................................. 34, 171
Power-up Delays ................................................................ 18
Power-up Timer (PWRT) .......................................18, 34, 171
Prescaler
Capture .................................................................... 117
Timer0 ...................................................................... 101
Assignment (PSA Bit) ...................................... 101
Rate Select (T0PS2:T0PS0 Bits) ..................... 101
Timer2 ...................................................................... 119
PIC18F1220/1320
PRO MATE II Universal Device Programmer .................. 235
Product Identification System .......................................... 307
Program Counter
PCL Register ............................................................. 44
PCLATH Register ...................................................... 44
PCLATU Register ...................................................... 44
Program Memory
Instructions in ............................................................ 46
Interrupt Vector .......................................................... 41
Map and Stack for PIC18F1220 ................................ 41
Map and Stack for PIC18F1320 ................................ 41
Reset Vector .............................................................. 41
Program Verification and Code Protection ...................... 185
Associated Registers ............................................... 185
Configuration Register ............................................. 188
Data EEPROM ......................................................... 188
Program Memory ..................................................... 186
Programming, Device Instructions ................................... 191
PUSH ............................................................................... 220
PUSH and POP Instructions .............................................. 43
PWM (CCP Module)
CCPR1H:CCPR1L Registers ................................... 119
Duty Cycle ............................................................... 119
Example Frequencies/Resolutions .......................... 119
Period ...................................................................... 119
TMR2 to PR2 Match .........................................109, 119
PWM (ECCP Module) ...................................................... 119
Associated Registers ............................................... 130
Direction Change in Full-Bridge
Output Mode .................................................... 124
Effects of a Reset .................................................... 129
Enhanced PWM Auto-Shutdown ............................. 126
Full-Bridge Application Example .............................. 124
Full-Bridge PWM Output
(Active-High) Diagram ..................................... 123
Half-Bridge Output
(Active-High) Diagram ..................................... 122
Half-Bridge Output Mode
Applications Example ...................................... 122
Operation in Low-Power Modes .............................. 129
Output Configurations .............................................. 119
Output Relationships (Active-High) .......................... 120
Output Relationships (Active-Low) .......................... 121
Programmable Dead-Band Delay ............................ 126
PWM Direction Change
(Active-High) Diagram ..................................... 125
PWM Direction Change at Near 100%
Duty Cycle (Active-High) Diagram ................... 125
Setup for PWM Operation ........................................ 129
Start-up Considerations ........................................... 128
Q
Q Clock ............................................................................ 119
R
RAM. See Data Memory.
RCALL ............................................................................. 221
RCIO Oscillator .................................................................. 13
RCON Register
Bit Status During Initialization .................................... 35
RCSTA Register
SPEN Bit .................................................................. 131
Register File ....................................................................... 47
Register File Summary .................................................50–51
 2004 Microchip Technology Inc.
DS39605C-page 301