PDA

View Full Version : Discussion Read two servo channels with an AVR?


Andrew McGregor
Aug 07, 2006, 03:34 AM
I've got an idea which will need input of two servo channels (from the RX) *and* output of two channels. Output is straightforward, but I'm having trouble figuring out how to do the input. Does anyone have any useful references?

Comatose
Aug 07, 2006, 03:46 AM
Two pin change interrupts. Store a 16 bit timer on a high pulse, then compare it to the same timer when you see a low pulse later.

Getting the whole thing jitter free is harder. Doable, but commercially interesting, so you may have a harder time finding someone to share (I won't)

Andrew McGregor
Aug 07, 2006, 05:43 AM
Ah, that's what I was missing. Thank you... I think I see how to deal with the jitter, but that'll take a bit of experimentation to be sure.