Ttelmah
Joined: 11 Mar 2010 Posts: 20061
|
|
Posted: Sun Jul 31, 2016 2:11 pm |
|
|
Right.
This is a _CCP_ divisor, not a clock divisor.
CCP_CAPTURE_DIV_4, means that the CCP will capture every fourth edge.
You don't want this.
It is the clock divisor you want an should change to give different counts. If you want a higher count, then decrease the clock division.
Also (ammended to add this), look at the header in the .h file.:
| Code: |
////////////////////////////////////////////////////////////////// CCP
// CCP Functions: SETUP_CCPx, SET_PWMx_DUTY
// CCP Variables: CCP_x, CCP_x_LOW, CCP_x_HIGH
// Constants used for SETUP_CCPx() are:
|
Now compare this with the one for setup_timer_1 say:
| Code: |
////////////////////////////////////////////////////////////////// Timer 1
// Timer 1 Functions: SETUP_TIMER_1, GET_TIMER1, SET_TIMER1
// Constants used for SETUP_TIMER_1() are:
// (or (via |) together constants from each group)
|
Note how the latter tells you you can 'or' values together. The former does not. |
|