>> you know form experience? > Yes. good to know > You must test TXIF before sending each byte. If your code is not too > slow, probably you will be able to put two characters into TXREG in the > same loop iteration only in the first run. Probably in the next > iteration the chars will not be transmitted yet. That's fine with me. My application is the sampler for a (slow) logical analyser. At 100kHz (20 MHz 16F648A, so 50 instructions) I want to: - check and report a 100kHz tick miss - wait for the next 100kHz tick - gather 5 pin values (no, they are not neatly next to each other on 1 port) - check whether something has changed - if so, (or elapsed time == 256) enqueue the new pin values and the elapsed time - if possible, send from the queue - quit the loop if needed - check whether the trigger condition is fulfilled, if so enable the sampling This is might just be possible in 50 instructions (in Jal, not assembler!) if the "if possible, send from the queue" keeps the queue size even (the queue is also filled 2 bytes at a time). So the only thing I care is that when I find TXSTA_TRMT set, I can pull two bytes from the queue en stuff them into TXREG. I won't check TXIF at all. -- Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist