TXSTA, TMRT tells you about the start of the stop bit, but nothing says about the end of it. I remember something about a delay to wait for the end of the stop bit. Just make a Xus delay loop where x is the duration of a bit. In your case 8.68us. Since your problem is about the last character, this may be useless. OTOH, you can decrease your error probability ;). I think Tony Nixon has a routine in files. Just in case I post what degenerates over the time in my computer :) ;Changing FOSC and BaudRate you get SPBRG and UNBIT #define FOSC 16000000 ; #define BaudRate 19200 #define BAUD (((10*FOSC/(16*BaudRate))+5)/10)-1;Calcula spbrg #define UNBIT ((1000000000/BaudRate)/((1000000000/(FOSC/4))*3)) ..... SendByte: bcf STATUS,RP0 movwf TXREG ;Move the byte to send in the UART's TX register bsf STATUS,RP0 WaitTxStopBit btfss TXSTA,TRMT ;Wait until the stop bit starts goto WaitTxStopBit movlw UNBIT ;self calculated at compilation time movwf TxBitDelayCount OneBitDelayLoop decfsz TxBitDelayCount,F ;Wait until stop bit finishes goto OneBitDelayLoop bcf STATUS,RP0 return Regards. Dennis. PD: Oh!, I did absolute! father forgives me! :) F_: While it's an example is ok! ----- Original Message ----- From: "Mike Morris" Sent: Monday, December 22, 2003 6:34 AM Subject: Re: [PIC:] Serial / Hyperterminal glitch.....PROBLEM SOLVED > It's definitely not Hyperterminal. Below are some of the characters I > output @ 115,200 to hyperterminal. There are no delays of any kind (other > than waiting for the TXIF bit to be set indicating the TXREG is empty), and > it works flawlessly. The trailing 0 is to terminate the string... it > doesn't get output. Code below will probably look icky if your email client > doesn't display it in a monospaced font. > > hdr0txt dt 0x1b,"[0;47m",0x1b,"[2J",0x1b,"[1;8H",0 ;wht bg, > clear screen, cursor to 1,8 > hdr1txt dt 0x1b,"[1;37;44mNVT",0x1b,"[0;34;47m Tester V",0 ;blue txt, > blk bg > hdr2txt dt "Device: Status:",0x0a,0x0a,0x0d,0 > ;hdr2 + LFLFCR > hdr3txt dt " Pos. Neg. BNC. Peak",0x0a,0x0d,0 ;hdr3 + LFCR > hdr4txt dt " In In In Det.",0x0a,0x0d,0 > ;hdr4 + LFCR > hdr5txt dt "Test (mV) (mV) (mV) (mV)",0x0a,0x0d,0 ;hdr5 + LFCR > hdr6txt dt "---- ---- ---- ---- ----",0 ;hdr6 > > I think your suspicions are correct... it's most likely an issue with the C > routines. > > - Mike -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu