Example: confidence

Section 64. Capture/Compare/PWM/Timer (MCCP …

2013 Microchip Technology 64-1 MCCP andSCCP64 Section 64. Capture/Compare/PWM/Timer (MCCP and SCCP)HIGHLIGHTSThis Section of the manual contains the following major Introduction .. Registers .. Time Base Generator .. Module Sync Outputs .. Sync and Triggered Operation .. timer Modes .. Output compare and PWM Modes .. Input capture Operation During Sleep and Idle Modes .. Effects of a Reset .. Register Maps .. Related Application Revision History.

PIC24F Family Reference Manual DS33035A-page 64-2 © 2013 Microchip Technology Inc. 64.1 INTRODUCTION Select PIC24F family devices include one or more Capture/Compare ...

Tags:

  Section, Capture, Timer, Compare, Mcpc, Section 64, Capture compare pwm timer

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Section 64. Capture/Compare/PWM/Timer (MCCP …

1 2013 Microchip Technology 64-1 MCCP andSCCP64 Section 64. Capture/Compare/PWM/Timer (MCCP and SCCP)HIGHLIGHTSThis Section of the manual contains the following major Introduction .. Registers .. Time Base Generator .. Module Sync Outputs .. Sync and Triggered Operation .. timer Modes .. Output compare and PWM Modes .. Input capture Operation During Sleep and Idle Modes .. Effects of a Reset .. Register Maps .. Related Application Revision History.

2 64-62 PIC24F Family Reference ManualDS33035A-page 64-2 2013 Microchip Technology INTRODUCTIONS elect PIC24F family devices include one or more Capture/Compare/PWM/Timer (CCP) modules are similar to the multi-purpose timer modules found on many other 16-bit micro-controllers. They also provide the functionality of the comparable Input capture , Output Compareand General Purpose timer peripherals found in all earlier PIC24F modules can operate in one of three major modes: General Purpose timer Input capture Output compare /PWMT here are two different forms of the module, distinguished by the number of PWM outputs thatthe module can generate.

3 Single output modules (SCCPs) provide only one PWM output modules (MCCPs) can provide up to six outputs and an extended range of outputcontrol features, depending on the pin count of the particular modules (SCCP and MCCP) include these features. User-selectable clock inputs, including system clock and external clock input pins Input clock prescaler for time base Output postscaler for module interrupt events or triggers Synchronization output signal for coordinating other MCCP/SCCP modules with user-configurable alternate and auxiliary source options Fully asynchronous operation in all modes and in low-power operation Special output trigger for A/D conversions 16-Bit and 32-Bit General Purpose timer modes with optional gated operation for simple time

4 Measurements capture Modes:- Backward compatible with previous Input capture peripherals of the PIC24F family- 16-bit or 32-bit capture of time base on external event- Up to four-level deep FIFO capture buffer- capture source input multiplexer- Gated capture operation to reduce noise-induced false captures Output compare /PWM Modes- Backward compatible with previous Output compare peripherals of the PIC24F family- Single Edge and Dual Edge compare modes- Center-Aligned compare mode- Variable Frequency Pulse mode.

5 External Input modeMCCP modules also include these extended PWM features: Single Output Steerable mode Brush DC Motor (Forward and Reverse) modes Half-Bridge with Dead-Time Delay Push-Pull PWM mode Output Scan mode Auto-shutdown with programmable source and shutdown state Programmable output polarityThe SCCP and MCCP modules can be operated only in one of the three major modes ( capture , compare or timer ) at any time. The other modes are not available unless the module conceptual block diagram for the module is shown in Figure 64-1.

6 All three modes use the TimeBase Generator and the common timer register pair (CCPxTMRH/L). Other shared hardwarecomponents, such as comparators and buffer registers, are activated and used as a particularmode requires. 2013 Microchip Technology 64-3 Section 64. Capture/Compare/PWM/Timer (MCCP and SCCP)MCCP andSCCP64 Figure 64-1:MCCP/SCCP Conceptual Block REGISTERSEach MCCP/SCCP module has up to seven control and status registers: CCPxCON1L (Register 64-1) controls many of the features common to all modes, including input clock selection, time base prescaling and timer synchronization.

7 The module is also enabled and the operational mode is selected from this register. CCPxCON1H (Register 64-2) controls interrupt generation, Trigger mode operations and postscaler selection for all modes. CCPxCON2L (Register 64-3) controls auto-shutdown and restart operation, primarily for PWM operations. CCPxCON2H (Register 64-4) configures other Input capture and Output compare features, and configures auxiliary output operation. CCPxCON3L (Register 64-5) controls multiple output PWM dead time; it is not available on SCCP modules.

8 CCPxCON3H (Register 64-6) controls the output of the Output compare and PWM modes, and configures the PWM Output mode for MCCP modules. CCPxSTATL (Register 64-7) contains read-only status bits showing the state of module module also includes eight buffer/counter registers that serve as timer Value registers ordata holding buffers: CCPxTMRH and CCPxTMRL are the 32-Bit timer /Counter register pair CCPxPRH and CCPxPRL are the 32-Bit timer Period register pair CCPxRA is the 16-bit primary data buffer for Output compare operations CCPxRB is the 16-bit secondary data buffer for Output compare operations CCPxBUFH and CCPxBUFL are the 32-Bit Buffer register pair, which are used in Input capture FIFO operationsTime BaseGeneratorClockSourcesInput CaptureOutput compare /PWMTMR32 CCSELMOD<3.

9 0>Sync andGatingSources16/32-BitAuxiliary OutputCCPxIFCCTxIFExternalCaptureCompare /PWMO utput(s)OCFA/OCFBT imerCCP Sync OutSpecial Event Trigger Out (A/D)InputCCPxTMRH/LPIC24F Family Reference ManualDS33035A-page 64-4 2013 Microchip Technology Inc. Register 64-1:CCPxCON1L: capture / compare /PWMx Control 1 Low RegisterR/W-0U-0R/W-0R/W-0R/W-0R/W-0R/W- 0R/W-0 CCPON CCPSIDLCCPSLPTMRSYNCCLKSEL2(1)CLKSEL1(1) CLKSEL0(1)bit 15bit 8R/W-0R/W-0R/W-0R/W-0R/W-0R/W-0R/W-0R/W- 0 TMRPS1 TMRPS0 TMR32 CCSELMOD3 MOD2 MOD1 MOD0bit 7bit 0 Legend:R = Readable bitW = Writable bitU = Unimplemented bit, read as 0 -n = Value at POR 1 = Bit is set 0 = Bit is clearedx = Bit is unknownbit 15 CCPON.

10 CCPx Module Enable1 = Module is enabled with operating mode specified by MOD<3:0>0 = Module is disabledbit 14 Unimplemented: Read as 0 bit 13 CCPSIDL: CCPx Stop in Idle Mode Bit1 = Discontinues module operation when device enters Idle mode0 = Continues module operation in Idle modebit 12 CCPSLP: CCPx Sleep Mode Enable bit1 = Module continues to operate in Sleep modes0 = Module does not operate in Sleep modesbit 11 TMRSYNC: Time Base Clock Synchronization bit1 = Module time base clock is synchronized to internal system clocks.


Related search queries