Let's Make Robots!

tiny2313 pwm dc motor control

tiny2313 pwm timer1 does not work the OCR1A and OCR1B



I want to control 2 DC motors...


I set the Timer1 for fast pwm no problem... I run at 4 mhz....


what prescaller I need?

and even if I set the OCR1A and OCR1B the speed is constant... any ideea?





TCCR1A |= (1<<WGM10)|(1<<WGM11)|(1<<COM1B1)|(1<<COM1B0)|(1<<COM1A1)|(1<<COM1A0);

TCCR1B |= (1<<CS11)|(1<<WGM13)|(1<<WGM12); //prescaller