MeLabs has an example for the 16F877 @4MHz. Interrupt-driven, 32 byte buffer, 9600 bps hardware serial using assembly language interrupt handler. http://www.microengineeringlabs.com/resources/samples/x1/pbp/serbufAx.bas Portions are in BASIC, but the USART int/buffer code is all assembly. Regards, -Bruce tech@rentron.com http://www.rentron.com > Hi all, > i=B4m trying to comunicate a PC with a PIC16f874(clock 4 MHZ) , using t= he USART asynchronous mode at 9600 bps. The length of each message is 8 bytes (8bits,Non Parity,1Stop bit). This PIC has a FIFO buf= fer(Register RCREG) of two bytes, so the idea is to clean the buffer before the third byte reach the buffer, i=B4ve been triying to= improve the code in the PIC to clean the buffer as fast as possible, but i =B4m still having this problem. Is there any good code to= avoid it? Can it be done adding hardware? Thanks a lot > __________________________________________________ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu