Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

PIC18F1220E/SSSQTP Datasheet(PDF) 118 Page - Microchip Technology

Part # PIC18F1220E/SSSQTP
Description  18/20/28-Pin High-Performance, Enhanced Flash Microcontrollers
PDF  308 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC18F1220E/SSSQTP Datasheet(HTML) 118 Page - Microchip Technology

Back Button PIC18F1220E/SSSQTP Datasheet HTML 114Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 115Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 116Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 117Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 118Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 119Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 120Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 121Page - Microchip Technology PIC18F1220E/SSSQTP Datasheet HTML 122Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 118 / 308 page
background image
PIC18F1220/1320
DS39605F-page 116
© 2007 Microchip Technology Inc.
15.1
ECCP Outputs
The Enhanced CCP module may have up to four
outputs, depending on the selected operating mode.
These outputs, designated P1A through P1D, are
multiplexed with I/O pins on PORTB. The pin
assignments are summarized in Table 15-1.
To configure I/O pins as PWM outputs, the proper PWM
mode must be selected by setting the P1Mn and
CCP1Mn
bits
(CCP1CON<7:6>
and
<3:0>,
respectively). The appropriate TRISB direction bits for
the port pins must also be set as outputs.
TABLE 15-1:
PIN ASSIGNMENTS FOR VARIOUS ECCP MODES
15.2
CCP Module
Capture/Compare/PWM Register 1 (CCPR1) is com-
prised of two 8-bit registers: CCPR1L (low byte) and
CCPR1H (high byte). The CCP1CON register controls
the operation of CCP1. All are readable and writable.
TABLE 15-2:
CCP MODE – TIMER
RESOURCE
15.3
Capture Mode
In Capture mode, CCPR1H:CCPR1L captures the 16-bit
value of the TMR1 or TMR3 registers when an event
occurs on pin RB3/CCP1/P1A. An event is defined as
one of the following:
• every falling edge
• every rising edge
• every 4th rising edge
• every 16th rising edge
The event is selected by control bits, CCP1M3:CCP1M0
(CCP1CON<3:0>). When a capture is made, the inter-
rupt request flag bit, CCP1IF (PIR1<2>), is set; it must
be cleared in software. If another capture occurs before
the value in register CCPR1 is read, the old captured
value is overwritten by the new captured value.
15.3.1
CCP PIN CONFIGURATION
In Capture mode, the RB3/CCP1/P1A pin should be
configured as an input by setting the TRISB<3> bit.
15.3.2
TIMER1/TIMER3 MODE SELECTION
The timers that are to be used with the capture feature
(either Timer1 and/or Timer3) must be running in Timer
mode or Synchronized Counter mode. In Asynchro-
nous Counter mode, the capture operation may not
work. The timer to be used with the CCP module is
selected in the T3CON register.
15.3.3
SOFTWARE INTERRUPT
When the Capture mode is changed, a false capture
interrupt may be generated. The user should keep bit,
CCP1IE (PIE1<2>), clear while changing capture
modes to avoid false interrupts and should clear the
flag bit, CCP1IF, following any such change in
operating mode.
ECCP Mode
CCP1CON
Configuration
RB3
RB2
RB6
RB7
Compatible CCP
00xx 11xx
CCP1
RB2/INT2
RB6/PGC/T1OSO/T13CKI/KBI2
RB7/PGD/T1OSI/KBI3
Dual PWM
10xx 11xx
P1A
P1B
RB6/PGC/T1OSO/T13CKI/KBI2
RB7/PGD/T1OSI/KBI3
Quad PWM
x1xx 11xx
P1A
P1B
P1C
P1D
Legend:
x
= Don’t care. Shaded cells indicate pin assignments not used by ECCP in a given mode.
Note
1:
TRIS register values must be configured appropriately.
CCP Mode
Timer Resource
Capture
Compare
PWM
Timer1 or Timer3
Timer1 or Timer3
Timer2
Note:
If the RB3/CCP1/P1A is configured as an
output, a write to the port can cause a
capture condition.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com