XMEGA 32A4 PWM 5.4 MHZ

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi, im trying to make 5.4mhz PWM

this is my firt code

int deseado=10;
TCD0_PER=50;
TCD0_CTRLB = 0X13; // WGMODE  SINGLE SLOPE PWM  Y HABILITACION DEL CANAL DE COMPARACION A
TCD0_CTRLA = 0X02; // FUENTE DE RELOJ  SIN DIVISION DE TIEMPO
do {
TCD0_CCA = deseado;	
while (!(TCD0_INTFLAGS & 1));
TCD0_CCA = 0;
}while(1); 

the pwm is 4.8 Mhz, but this is not enough, anybody help me?