This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

XC167 CAPCOM6 examples

Hello! Can you help me with start up code to initialize CAPCOM6 unit of XC167 to generate PWM? I use MCB-XC167 board and XC16X.h register declaration file. My project doesn't work.
My initialization is:

  DP2 = 0xff00;

  P1L = 0x0000;

  DP1L_P0 = 1;
  DP1L_P1 = 1;
  DP1L_P2 = 1;
  DP1L_P3 = 1;
  DP1L_P4 = 1;
  DP1L_P5 = 1;

  ALTSEL0P1L = 0x003F;
  CCU6_T12PR = 200;

  CCU6_CC60R = 100;
  CCU6_CC61R = 50;
  CCU6_CC62R = 25;

  CCU6_CC60SR = 100;
  CCU6_CC61SR = 50;
  CCU6_CC62SR = 25;

  CCU6_T12MSEL = 0x0333;
  CCU6_T12DTC = 0x080A;

  CCU6_TCTR4 = 0x0002;


Maybe I forgot something.

0