Stef Mientki wrote: > Bob Axtell wrote: > >> Alan B. Pearce wrote: >> >> >>>> I've found that if I put a nop after writing to TXREG, before going >>>> back to my TXIF wait loop, I increase the chances of successful xmission >>>> a whole lot (though not 100%). Without that nop, I loose a character >>>> probably 95% of the time I write a string of text out. With it, I >>>> have a clean transmission 95% of the time. >>>> >>>> >>>> >>> I have experience only with the 16F876, but I seem to remember that there is >>> a finite time between loading the character into TXREG, and the TXIF showing >>> a correct status, it is probably one clock at the 16x baud rate, or whatever >>> your multiple is. It didn't affect me as I used Olin's macros to use a FIFO >>> to stuff characters into, then had the UART send them under interrupt >>> control. There was no loop inside the interrupt, so there was probably a 30 >>> or so instructions minimum before the next character was loaded. >>> >>> >>> >>> >> Gee, I never see any of this on my 877A and 876A designs. >> >> > If you use > a high level language with a bad optimization > or > a badly written assembler program ;-) > you will never have such a tight loop, > and thus will never see the problem. > > Stef Mientki > > Well, I only write in assembler, however I always have 15-20 instructions minimum before I test again. --Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist