Kevin Olalde wrote: > > Thanks, your version worked (of course). > > Here's what I see I was doing different: > - You set RB1/RX low and RB2/TX high, I set them both low. Where did you get > this, I didn't see this in the datasheet? No, it's just the way I like to do it, which is an idle RS232 state. > - You only set RB1 as an input, I set both RB1 and RB2 (pg. 71 in the datasheet) There have been numerous yays and nays for UART setup. I have always configured this way and have never had problems. As I understand it, once the UART is enabled, it takes control of the port RX TX pins anyway, so this may be irrelevant. I haven't heard of anyone pre-setting UART bits that cause a failure, although that may be incorrect. > - The order of setup was different, is this significant? I wouldn't imagine so..?? > - Your receive routine blocks. I was polling looking at the RCIF flag: > Receive btfss PIR1, ; check if we have received and data > return ; if not, just return > ; otherwise, move received byte into > movf RCREG, W ; result into W > return Did you clear the RCIF flag after a byte was received??? That's why I don't use this flag unless UART interrupts are enabled. > - you're putting the output into TXREG, then waiting for TRMT to clear. > I was waiting for TRMT to clear then loading TXREG. Horses for courses I would think, except this bit 'may' be misleading before the very first byte is transmitted. I can't see this though, because the data sheet mentions the TRMT flag = 1 on powerup meaning an empty TX buffer. -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.