piclist 2010\07\29\113937a >
Thread: 16F747 UART errors
www.piclist.com/techref/microchip/devices.htm?key=16F
face picon face BY : Jan-Erik Soderholm email (remove spam text)





On 2010-07-29 16:59, Drew Maurer wrote:
{Quote hidden}

Note that there is no need to have all servos "in sync". It might often
be easer to take care of one 1-2 ms puls at the time and at the end
sum it up to (aprox) 20 ms before starting over again. It might
be more "work" for the processor to keep track of a number of pulses
active at the same time. And the servios doesn't care if one servo
gets its pulse first, then the second servo and so on.

That way, you can have a lookup-table with the timer values for
all your "positions", say aprox 100 different values/positions
(few applications needs more then 100 different servo positions).

Then the sequence becomes (something like) :

On each timer-interrupt :

- stop pulse for servo pointed to by servo-flag.
- All servos done ?
  If so:
    Reset servo-flag to first servo (minus 1?)
    Load timer with "rest-of-20ms".
  If not :
    Start pulse for next servo.
    Load timer with "postition" for next servo.
    Set servo-flag to "next-servo".
  RETFI

And then setup/initialization at power on and so on of course.

With this setup, you will not stay many cycles in the
timer-interrup and it will probably not interfere
with the USART routines/interrupts. As I read your
description, I go the impression that you stay in the
timer-interrupt the whole 1-2 mS period ? That is a
looong time... :-)




  In this way I get 8bit
{Quote hidden}

>> -
<4C51A097.4000900@telia.com> quoted-printable

In reply to: <AANLkTinQLQ01q6NPjUpb9nTXPSnqYt8sB=mPdQ4_Gm5R@mail.gmail.com>
See also: www.piclist.com/techref/microchip/devices.htm?key=16F

Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) 16F747 UART errors

month overview.

new search...