Hello List,
Recently I've decided to switch my robots drive over to standard PWM servo motors, where pulses range from 1ms to 2ms yada yada yada. I've never used the PWM connectors on the Robostix, just the serial connection and a few of the GPIO pins. I'd just like to know if the following method/pseudo-code for setting the duty cycle makes sense (on PWM 1A based on the servo script in robostix/gumstix/i2c-io/ ):

     set TCCR1A to 0xAA
     set TCCR1B to 0x1A
     set ICR1 to 40000
     set TCNT1 to 0
     set direction b.5 out

     //then to set the duty cycle like the script
     set OCR1A ( {pulsewidth} * 2 )

Seems simple enough to understand, ideally this would be integrated into a C program running off a verdex motherboard using i2c-io. Am I missing anything?

Mike Caruso