I konw that the On-Board PWM can be performed in the background, and that when you are not using the PWM module the duty cycle freeezes until you come back to it in code. Here is what I need to konw.. Where does the CCPx registers get stored adn how can I retrive the data for the duty cycle for the PWM mode. Basically what I am asking is lets say I am using the ON-Board CCP1 (PWM MODE) and I freeze it in the main loop. Now in a different subroutine I want to continue this, How can I do that. I have tried many options but with not success.
here is what I have tried:
I have saved the value of the duty variable before jumping out of the main loop .. now in the subroutine I set the duty = SAVED value of the duty cycle before I jumped out. I get that the CCP value is full ON. How do i fix this problem?
any help on this topic would be greatly appreciated. thanks
srigopal
Bookmarks