SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
User avatar
By ipeerbhai
Howdy all,

I'm putzing around trying to use the artemis ATP for simple hobby servo control.
I've found this function in the SDK docs: am_hal_ctimer_config_single, and have gotten the blue LED blinking with an ISR.
( Thanks Example code ).

Problem is, the timer + ISR approach only gives me 100 to 187.5 "steps" between 1ms and 2ms pulse width, and I'd like more. I'm thinking at least 270, if not a thousand. If I use a high speed clock and fire the ISR often, I starve the CPU of everything but counting.

So, I'm guessing I need to use more than 1 timer, and direct connect the timer to a PWM output pin with Duty cycle.
Problem is, I don't really understand how to make this connection using the Apollo3 code, and can't just #include "servo.h".

Any example/pointers on how to figure out hobby servos with a resolution of at least 270 degrees in that pulse-on window?

 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum