phyCORE-XC167 with XC167CI Abdeslam Salik Hallo I work with a phyCORE-XC167 with XC167CI (16). IÂ'generetead PWM (CAPCOM6), so I have the timer T12 Stopped So that I can given the frequency for T12 I give the period Then I set the Output CC60 and COUT60 Then i giving the Value to compared And finally , I started the timer T12 #################### #################### //Programm // ######### sbit P1L_0 = P1L^0 ; // declare portpin to use sbit DP1L_0 = DP1L^0 ; // declare direction bit to use sbit P1L_1 = P1L^1 ; sbit DP1L_1 = DP1L^1 ; void main (void) { DP1L_0 = 1 ; //init Direction to output DP1L_1 = 1 ; //init Direction to output //PWM Konfiguration CCU6_TCTR0 = 0x0010 ; // T12 ist gestoppt CCU6_T12PR = 800; //Die Periode der Timer CCU6_TCTR0 = 0x0009; //T12PRE=1 und T12CLK=001 CCU6_T12MSEL = 0x0003; //Compare output on pins COUT6x and CC6x. CCU6_TCTR4 = 0x0002 ; // Start the Timer while(1) // endlosschleife { CCU6_T12 = 400; // Count value to compared } } ################# ################# but i have no reaction in the Output ? Thanks in advance Many thanks for your help
Hello, you have a mistake in your "think-chain" with CCU6_T12 = 400; you set the value of the Timer T12 The CapCom does it work with a running timer. When the timer compares with the value in the corresponding register. Every output has its own register with names like CCU6_CC6xR (x=1,2,3).
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.