Society of Robots - Robot Forum
Software => Software => Topic started by: jhaller on September 22, 2009, 04:28:29 PM
-
Hello,
I think that the latest Axon source code may be missing the PWM functions, can anyone verify?
I unzip it, serach for a function like PWM_Init_timer1_LED and nothing is found.
Thanks.
-
It's in pwm.c
Here's the full function if you still cannot locate it:
void PWM_Init_timer1_LED(u08 bitRes){
// enable timer2 as 8,9,10bit PWM
if(bitRes == 9)
{ // 9bit mode
sbi(TCCR1A,PWM11);
cbi(TCCR1A,PWM10);
}
else if( bitRes == 10 )
{ // 10bit mode
sbi(TCCR1A,PWM11);
sbi(TCCR1A,PWM10);
}
else
{ // default 8bit mode
cbi(TCCR1A,PWM11);
sbi(TCCR1A,PWM10);
}
// clear output compare values
OCR1B = 0;
}