;**********************************************************************

; serial port setup
; RA5 = RX, RA4 = TX  (with 4MHz clock use SPBRG = 12 for 19.2K baud)
; with BRGH = 1 (high speed) -> SPBRG = Fosc/(16 + (x + 1))
usart
	bsf	STATUS,RP0	; bank 1
	movlw	d'12'
	movwf	SPBRG		; default spbrg = 12 -> 19.2K baud
	movlw	b'00100100'	; BRGH = 1 so baud = clk/(16*(x+1))
	movwf	TXSTA		; master clk, 8 bit, async mode, enable port
	bcf	STATUS,RP0	; bank 0
	movlw	b'10010000'
	movwf	RCSTA		; 8 bit, async mode, continuous receive
	return

;**********************************************************************
