On 2010-07-29 12:48, Oli Glaser wrote: > > > -------------------------------------------------- > From: "Jan-Erik Soderholm" > Sent: Thursday, July 29, 2010 10:49 AM > To: "Microcontroller discussion list - Public." > 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 - t= he >>> 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 strin= gs >>> 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? > > > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .