I'm trying to create a 1kHz PWM to control a firgelli L12. First time using an Arduino - it should be simple but I'm pretty sure the frequency is off judging by the the way the actuator is spazzing about (it sort of goes to the configuration but then keeps on making slight movements rather than sitting still). Here's the code:
TCCR1A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM11) | _BV(WGM10);
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS11) | _BV(CS10);
OCR1AH = 0;
OCR1AL = 250;
OCR1BH = 0;
OCR1BL = 30;
So I was hoping the timer would count up to 250 and then reset. Any idea what I've missed?