Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rdp

  • Rank
  1. Here is the code I entered to see how well I could implement a PWM project. ccp1con = 1100b; // PWM mode pr2 = 200; //Period = 25kHz, ccpr1l = 100; //Duty Cycle clear_bit( trisc, 2 ); // PWM CCP1 = Output t2con = 0x04; //timer 2 on bit = on The issue is in the Registers Watch window in Debug mode. The ccp1con register does not display my data correctly. it appears to be shifted right one bit. The asm file is correct however as it looks correct in MPLab. It also seems to act as if I did not set bits 2 and 3, but 1 and 2 istead, ie the PWM was not working.
  • Create New...