Page 1 of 1

What is the significance of CCPR1Lbits.CCPR1L ?

PostPosted: Tue Apr 20, 2021 5:45 pm
by HKPhysicist
Dear all PIC experts,
I came across an exercise which uses CCP PWM to control a DC motor. Part of the codes are:
Code: Select all
CCPR1Lbits.CCPR1L = 192;
CCPR2Lbits.CCPR2L = 0;


What is the function and significance of them? I can't find any complete explanation of them in MPLAB X IDE and my book.

Thanks for your help. :)

Re: What is the significance of CCPR1Lbits.CCPR1L ?

PostPosted: Wed Apr 21, 2021 5:15 pm
by Roche
Read the data sheet for the device - it will tell you about the PWM registers.

Re: What is the significance of CCPR1Lbits.CCPR1L ?

PostPosted: Fri Apr 23, 2021 3:20 am
by AussieSusan
As @Roche says, you are looking at the wrong document.
MPlab X is the IDE (think editor) which means that it can be used across (nearly) all MCUs.
XC8, XC16 and XC32 (plus others) are the compilers. Each has its own user guide etc that describes the language features, differences and extensions etc..
Each MCU has a specific data sheet that describes the combination of memory, modules etc. in that device. The data sheet specifies exactly what is in that MCU but not necessarily how to use it.
The Family Reference Manual is a set of documents that describe in detail the various components and modules that a family of devices has. Note that an FRM section (document) may describe some functionality of a module that is not implemented in a specific MCU so you need to check back to the MCU for that detail. The FRM also can contain more examples than the data sheet (but this depends on the overall family - PIC12/16/18 tend to have details in the data sheet while PIC24/dsPIC33 and PIC32 have the examples more in the FRM).
All information is generally in one of the manuals but you need to know which is the best one to look at for a particular question - experience helps a lot.
Susan

Re: What is the significance of CCPR1Lbits.CCPR1L ?

PostPosted: Fri Apr 23, 2021 8:24 am
by HKPhysicist
Susan,
You explain better than many so-called experts! Thanks!

Re: What is the significance of CCPR1Lbits.CCPR1L ?

PostPosted: Fri Jan 27, 2023 11:40 am
by PaulSnyder
HKPhysicisst wrote:Susan,
You explain better than many so-called experts! Thanks!


What is the significance where to buy phenq of CCPR1Lbits.CCPR1L ? · PWM for LED dimming unusual behavior by Keno » Mon Dec 07, 2020 6:57 pm · Multi RC (Futaba) servo control by CCP