On 22/12/2018 14:12, Martin Gregorie wrote:
> On Sat, 22 Dec 2018 13:26:05 +0000, The Natural Philosopher wrote:
>
>> Well the average nodel servo gets a pulse every 50ms so its hardly gonna
>> kill a Pi.
>>
> True, but since Linux isn't an RTOS you can't rule out jitter. A loop
> like:
>
> while(running)
> sleep 49 mS
> set output pin high
> wait pulselength /* 1-2 mS */
> set output pin low
>
> can be pre-empted during the sleep, so the 50mS cycle time isn't
> guaranteed and it can also be pre-empted during the wait while the signal
> is high. While cycle length jitter probably isn't an issue, pre-emption
> while the pulse is being output certainly is because it is guaranteed to
> make the servo jitter.
>
Indeed, but isnt there some interrupt driven PWM thing? I seem to
remember reading that there was...
--
When plunder becomes a way of life for a group of men in a society, over
the course of time they create for themselves a legal system that
authorizes it and a moral code that glorifies it.
Frédéric Bastiat
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|