Hi
You might want to make sure that the dutycycle is set to 0 before enabling the PWM module.
As it is now, when you "activate" the LCD sections, there will be a 7 second delay between the PWM module being enabled (you setting CCP4CON at the start of the program) and the time at which the ramp up actually starts, ie when you actually set the dutycycle to 0.
/Henrik.
Thanks again, Henrik. Do you mean I should have:
before the CCP4CON register setting?Code:CCP4CON.4 = 0 CCP4CON.5 = 0 CCPR4L = 0
I will try that out tonight, as well as reducing the PAUSE statements.
As usual, you were right Henrik. I added the code above right after turning on CCP/PWM on CCP4 and reduced all the pauses within the #IFDEF USE_LCD_FOR_DEBUG and now everything works as before. It was obvious once you pointed it out, so thanks again for being so patient.
Bookmarks