here are a couple of BIN to ASCII converters I wrote, might be useful.
;**********************************************************************
; Routine:ASCIItoBIN
; Input Registers:ASCII_MSW, ASCII_LSW
; Output Registers: BUFFER
; Internal Registers:None
; CALLS:None
; Function: Receives two ASCII bytes in ASCII_MSW and ASCII_LSW registers.
; These two bytes are converted into 1 byte binary, returned from this
; routine in register BUFFER
;**********************************************************************
ASCIItoBIN MOVLW 65 ;convert ascii into MSW address
SUBWF ASCII_MSW,W
MOVLW 48
BTFSC StatusREG,C
MOVLW 55
SUBWF ASCII_MSW,W
ANDLW b'00001111'
MOVWF BUFFER ;Save result of the upper nibble
SWAPF BUFFER,1
MOVLW 65 ;convert ascii into LSW address
SUBWF ASCII_LSW,W
MOVLW 48
BTFSC StatusREG,C
MOVLW 55
SUBWF ASCII_LSW,W
ANDLW b'00001111' ;Get result of lower nibble
IORWF BUFFER,1 ;and put final result in BUFFER for output
retlw 0