readtemp
bcf tncs_port, tncs ;starts on high to low edge
movlw 0x0e ;14 bits are clocked in
movwf count1
read_bit
bcf temp_lsb, 1 ;clear bit 1
btfsc tsio_port, tsio ;check data from LM74?LM71
bsf temp_lsb, 1 ;set bit 1 if data is set
bsf tsc_port, tsc ;raise clock
rlf temp_lsb, f
rlf temp_msb, f ;rotates both bytes left
bcf tsc_port, tsc ;lower clock
decfsz count1, f ;decrement counter
goto read_bit
bsf tncs_port, tncs ;raise Not Chip Select = stop LM74/LM71
retlw 0x00