Hello
I have a problem with the PWM (CAPCOM6) (XC167). so does my code But I can not with the Oscilloskop to measure what I have set, I get something else to see. I believe that: 1: Port1 used by the EB, but I get by amending EBCMOD1 = 0x001F in the StartXC167.A66 not resolved 2: EBCMOD1.5 can not change How can I solve the problem Thanks for any help and nice weekend
Best Regards
#include <xc167.h> #include <intrins.h> void main (void) { int i,j; DP1L = 0xFF ; ALTSEL0P1L = 0x00; CCU6_TCTR0 = 0x0002; //Frequenz Einstellung 40000000 * 1/256 = 156,250 KHz CCU6_T12PR = 0xC350; // 50000 load CCU6_T12 period register CCU6_CC62SR = 0xAFC8; //diesen Wert 45000 wird zu CCU6_CC62SR transfered CCU6_MODCTR = 0x0000; CCU6_T12MSEL = 0x0300; CCU6_TCTR4 = 0x0042; // STE12 is set(The shadow register transfer is requested),requesting the shadow transfer j=0; while(1) { i=CCU6_T12; if (i==0x1000) j=1; } }