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

X  

PIC18F6X2X Datasheet(PDF) 175 Page - Microchip Technology

Part # PIC18F6X2X
Description  64/80-Pin High Performance, 64-Kbyte Enhanced FLASH Microcontrollers with A/D
PDF  386 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC18F6X2X Datasheet(HTML) 175 Page - Microchip Technology

Back Button PIC18F6X2X Datasheet HTML 171Page - Microchip Technology PIC18F6X2X Datasheet HTML 172Page - Microchip Technology PIC18F6X2X Datasheet HTML 173Page - Microchip Technology PIC18F6X2X Datasheet HTML 174Page - Microchip Technology PIC18F6X2X Datasheet HTML 175Page - Microchip Technology PIC18F6X2X Datasheet HTML 176Page - Microchip Technology PIC18F6X2X Datasheet HTML 177Page - Microchip Technology PIC18F6X2X Datasheet HTML 178Page - Microchip Technology PIC18F6X2X Datasheet HTML 179Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 175 / 386 page
background image
 2003 Microchip Technology Inc.
Advance Information
DS39612A-page 173
PIC18F6X2X/8X2X
17.4.9
SETUP FOR PWM OPERATION
The following steps should be taken when configuring
the ECCPx module for PWM operation:
1.
Configure the PWM pins PxA and PxB (and PxC
and PxD, if used) as inputs by setting the
corresponding TRIS bits.
2.
Set the PWM period by loading the PR2 (PR4)
register.
3.
Configure the ECCPx module for the desired
PWM mode and configuration by loading the
CCPxCON register with the appropriate values:
• Select one of the available output
configurations and direction with the
PxM1:PxM0 bits.
• Select the polarities of the PWM output
signals with the CCPxM3:CCPxM0 bits.
4.
Set the PWM duty cycle by loading the CCPRxL
register and CCPxCON<5:4> bits.
5.
For Half-Bridge Output mode, set the dead band
delay by loading ECCPxDEL<6:0> with the
appropriate value.
6.
If auto shutdown operation is required, load the
ECCPxAS register:
• Select the auto shutdown sources using the
ECCPxAS2:ECCPxAS0 bits.
• Select the shutdown states of the PWM
output pins using PSSxAC1:PSSxAC0 and
PSSxBD1:PSSxBD0 bits.
• Set the ECCPxASE bit (ECCPxAS<7>).
• Configure the comparators using the CMCON
register.
• Configure the comparator inputs as analog
inputs.
7.
If auto restart operation is required, set the
PxRSEN bit (ECCPxDEL<7>).
8.
Configure and start TMRn (TMR2 or TMR4):
• Clear the TMRn interrupt flag bit by clearing
the TMRnIF bit (PIR1<1> for Timer2 or
PIR3<3> for Timer4).
• Set the TMRn prescale value by loading the
TnCKPS bits (TnCON<1:0>).
• Enable Timer2 (or Timer4) by setting the
TMRnON bit (TnCON<2>).
9.
Enable PWM outputs after a new PWM cycle
has started:
• Wait until TMRn overflows (TMRnIF bit is set).
• Enable the CCPx/PxA, PxB, PxC and/or PxD
pin outputs by clearing the respective TRIS
bits.
• Clear the ECCPASE bit (ECCPxAS<7>).
17.4.10
EFFECTS OF A RESET
Both Power-on Reset and subsequent RESETS will
force all ports to Input mode and the CCP registers to
their RESET states.
This forces the enhanced CCP module to reset to a
state compatible with the standard CCP module.



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