We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Thanks a lot! It's very helpful for me. Can You suggest the best way to switch on/off PWM output? My task is to provide time diagram where PWM take turns with blank space. I try to start/stop T12 timer with TCTR4 bit T12RS but it has no influence on output.