Hi Hank, Let me take a stab at this for you.

In your first example, you set the duty directly with constants. No surprizes there I don't think.

In the second example, you are changing the variable named DUTY, but this is not associated with the ccp reg's, so they never get changed.

In the third example, you are using a variable named DUTY to to assign values to the ccp reg's. This is the method I would use as it seem the easiest to me. It takes care of all the bit switching and all your code needs to do is change the value of DUTY.

To combine the second and third example, make the ccp assigns in the third example a subroutine. Then in the second example, before each pause, call the sub. I think in this way it will seem like it does exactly what you want.

To do what I think you are trying, I think you need to alais the ccp reg's. for example:

Code:
CCP2CON.4    VAR Duty.0       'Bit 0
CCP2CON.5    VAR Duty.1       'Bit 1
CCPR2L.0    VAR Duty.2
CCPR2L.1    VAR Duty.3
CCPR2L.2    VAR Duty.4
CCPR2L.3    VAR Duty.5
CCPR2L.4    VAR Duty.6
CCPR2L.5    VAR Duty.7
Now I have NO idea if this will actually work, Try at you own risk