PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : PWM mit XC167 (CAPCOM6)



habouba
21.02.2008, 17:31
phyCORE-XC167 with XC167CI

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