this is 2x faster (500kbps @ 4MHz) : ; serial tx ; assumes PORTB1 initially on high state rrf data,w xorwf data,f movlw 1 xorwf PORTB,f ;start bit skpnc xorwf PORTB,f ;b0 btfsc data,0 xorwf PORTB,f ;b1 btfsc data,1 xorwf PORTB,f ;b2 btfsc data,2 xorwf PORTB,f ;b3 . . . nop bsf PORTB,0 ; regards, Reggie Marc wrote: > > > 9600 is near the limit for a 4 MHz oscillator. > > Why? > > You can easily send a bit each 16 XTAL cycles. At 4MHz that is 250kbps: > > movlw 0 ; start > nop > nop > movwf PORTB > > movlw 0 ; lsb > btfsc tmp,0 > movlw 1 > movwf PORTB > > movlw 0 > btfsc tmp,1 > movlw 1 > movwf PORTB > > movlw 0 > btfsc tmp,2 > movlw 1 > movwf PORTB > > etc