> Would someone please post/send me a sample of source code that > correctly receives Async. serial using the hardware UART. I have been > working on this problem for some time and still have not gotten anything > to work. I would prefer interrupt driven, but I'm not picky. Anything > that actually works would be a real help. Interrupt handler: reset org h'00' ;reset vector goto init org h'04' ;interrupt vector PUSH ;store valuables btfsc INTCON,RBIF ;test for portB interrupt call intonb ;portB isr btfsc PIR1,RCIF ;test for async rx interrupt call asyncrx ;serial rx isr btfsc PIR1,TMR1IF ;test for timer1 interrupt call timeout1 ;timer1 isr ;btfss PIR1,TXIF ;test for async tx interrupt ;call asynctx ;serial tx isr ;btfsc INTCON,T0IF ;test for timer0 interrupt ;call timeout0 ;timer0 isr ;btfsc PIR1,TMR2IF ;test for timer2 interrupt ;call timeout2 ;timer2 isr ;btfsc PIR1,SSPIF ;test for spi interrupt ;call donespi ;spi isr PULL ;restore valuables retfie and ISR: asyncrx: ;serial rx isr btfsc RCSTA,OERR ;check for overrun error call commserrors ;cleared by clearing cren btfsc RCSTA,FERR ;check for framing error call commserrors ;cleared by reading rcreg movf RCV1,F skpz call commserrors ;flag overrun movf RCREG,W ;get new data movwf RCV1 movf RCV1,W sublw h'52' ;='R'? skpz retlw 0 bcf KEYBUFF,UP bcf KEYBUFF,DOWN retlw 0 commserrors: ;report comms errors bsf MOREFLAGS,OVERRUN;set rx error flag here bcf RCSTA,CREN ;clear cren bsf RCSTA,CREN ;reset cren retlw 0 This works fine even on the buggy 65A with BRGH set. I've got a 455KHz clock, and run at 9600 baud. Does this help? * Alex_Barrett@iee.org Robert Cooke Electronics, Norwich, UK