> pulse width resolution but still have the processor yielded for
> communications about 90% of the time. I'm not saying this is the best
> way... but it was the only way I could come up with to combine control of
> multiple servos, good resolution, serial communication, 6 ADCs for
> measurements, and fast 20MHz clock for computation.
>
> Drew
>
> On Thu, Jul 29, 2010 at 4:04 AM, Jan-Erik Soderholm<
>
TakeThisOuTjan-erik.soderholm
spamBeGonetelia.com> wrote:
>
>> On 2010-07-29 12:48, Oli Glaser wrote:
>>>
>>>
>>> --------------------------------------------------
>>> From: "Jan-Erik Soderholm"<
jan-erik.soderholm@spam@
RemoveMEtelia.com>
>>> Sent: Thursday, July 29, 2010 10:49 AM
>>> To: "Microcontroller discussion list - Public."<
@spam@piclistKILLspam
mit.edu>
>>> Subject: Re: [PIC] 16F747 UART errors
>>>
>>>>> Does it finish sending the byte normally? Reason being,
>>>>> this is a servo driver/current monitor for my lonelybot.com project -
>> the
>>>>> TMR0 interrupt is used to generate the 20ms "off" time for the servo's
>>>>> PWM
>>>>> input; when the 20ms is up, the interrupt holds control for the 1-2ms
>>>>> servo
>>>>> pulse.
>>>>
>>>> That might not be a good solution. Just set some timer and return from
>>>> the interrupt as soon as possible. Are you also using interrupts to read
>>>> the incomming USART data ?
>>>
>>> Yes, I'm thinking there are probably better ways to do this. Unless I'm
>>> misunderstanding what is needed - what about using the PWM peripheral for
>>> the servo input? Then you can just load the registers and let it run
>>> independently.
>>
>> Usualy, the standard PWM module(s) are not particular good at generating
>> a standard 1.5 +/- 0.5 ms servo signal. And in many cases you have not
>> a single servo anyway.
>>
>> Exactly how the signals are to be generated depends on a number
>> of factors. One is how many steps (the "resolution") on needs
>> in the servo.
>>
>>
>>>
>>>
>>>> 4800 baud means that my data strings collide with the interrupt
>>>>> frequently - my testing shows that, at 4800 baud almost 70% of my
>> strings
>>>>> collide with the interrupt in this way, which is unacceptable because I
>>>>> have
>>>>> to repeat the request 5 or 10 times which is really going to flood the
>>>>> data
>>>>> bus on my boat. Can I ignore these interrupts in my data? Am I
>>>>> guaranteed
>>>>> that the data is still good, just delayed?
>>>
>>> Do you mean the USART data sending is interrupted somewhere by the TMR0
>>> interrupt?
>>> Receiving or sending? What do you mean exactly by ignoring the
>>> interrupts/data being good? Can you give a bit more explanation?
>>>
>>>
>>>