I must have been asleep yesterday. I use the MAX31856 regularly with a PIC16F1789. The MAX31865 has the same interface. I need to use mode 3 as the GLCD display doesn't work with mode 1. If DavidAlfa's code doesn't work, you may find these settings helpful.
Here is the setup for a PIC16F1789. You may need to change the register names as the 16F1946 has two MSSP modules; whereas, the 16F1789 only has one.
;*******************************************************************************
;Setup SPI serial port
;*******************************************************************************
;;Mode 0 ;CKP=0, CKE=1
; banksel SSPSTAT ;16F1783 DS refers to these registers as shown |B4
; clrf SSPSTAT ;but the text omits the "1's", works either way |b4
; bsf SSPSTAT,6 ;CKE=1 =active to idle |B4
; movlw b'00100001' ;SPI clk=Fosc/4,bit<0>=0,clk=Fosc/16,bit<0>=1 |B4
; movwf SSPCON1 ;bit<4>,CKP=0 = idle low, bit<5> enables SPI |B4
;;Mode 1 ;CKP=0,CKE=0
; banksel SSPSTAT ;all SPI controls in Bank4 |B4
; clrf SSPSTAT ;CKE=0, SMP=0 (sample at middle) |B4
; movlw b'00100001' ;enable SPEN, set SPI CLK to Fosc/16 |B4
; movwf SSPCON1 ;CKP=0,master clk =Fosc/x (see below) |B4
;;Mode 2 ;CKP=1,CKE=1
; banksel SSPSTAT ;all SPI controls in Bank4 |B4
; clrf SSPSTAT ;CKE=1, SMP=1 (sample at middle) |B4
; bsf SSPSTAT,6 ; |B4
; movlw b'00110001' ;enable SPEN, set SPI CLK to Fosc/16 |B4
; movwf SSPCON1 ;CKP=1,master clk =Fosc/x (see below) |B4
;;Mode3 ;CKP=1,CKE=0
banksel SSPSTAT ; |B4
clrf SSPSTAT ; |B4
movlw b'00110001' ;enable serial port, clk = Fosc/16 |B4
movwf SSPCON1 ; |B4
;*******************************************************************************
bsf SSPSTAT,7 ;set SMP, doess not affect mode |B4
;NB: Modes 0,2,3 work with display. Mode 1 does not. Only Modes 1&3 work
;with MAX31856. Tested at Fosc/16 = 2 MHz. Modes defined as per Wikipedia.
;*******************************************************************************
And here are the 3 routines I use to communicate to the MAX31856
;*******************************************************************************
PutAddr ;call from any bank, returns |B0
movlb 2 ; |B2
bcf TC_CS ; |B2
movlb 4 ; |B4
movwf SSPBUF ; |B4
btfss SSPSTAT,BF ; |B4
bra $-1 ; |B4
return
;NB: Can combine Putreg and GetReg as what is written to SSPBUF doesn't matter
;when reading. Factor off "ExitR_W" as a separate call. Saves about 7 LOC
PutReg ;enter w/ value to be written in WREG
movwf SSPBUF ; |B4
btfss SSPSTAT,BF ; |B4
bra $-1 ; |B4
movlb 2 ; |B2
bsf TC_CS ; |B2
movlb 0 ; |B0
return
GetReg
clrf SSPBUF ;if read not necessary, then just clrf |B4
btfss SSPSTAT,BF ; |B4
bra $-1 ; |B4
movf SSPBUF,w ;move first read byte to WREG |B4
return ;NB:returns in|B4 |B4
EDIT: Since this uses polling, you may need to add a NOP or two before returning to take care of the errata issue. The SSPIF flag as in DavidAlfa's routine has the same problem. It might be worth checking the C-code disassembly to see if there is a delay.