> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of Jan-Erik Soderholm > Sent: 29 July 2010 16:39 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] 16F747 UART errors >=20 >=20 >=20 >=20 > 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). >=20 > Then the sequence becomes (something like) : >=20 > On each timer-interrupt : >=20 > - 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 >=20 Some years ago I wrote an example in C to explain this method to someone else: http://forum.htsoft.com/attachments/45512-servo.c Regards Mike =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .