--- ds1820.asm Fri Dec 28 10:55:59 2001 +++ ds1820-gpasm-revised.asm Tue Jan 8 13:57:21 2002 @@ -59,21 +59,6 @@ endif endif - ifdef __16f84 -base equ 0x0c ; first free file register address -stack equ 0x4f+1 ; end address of stack -port equ portb ; port on which bits are used -movwt macro ; move w to tris - tris trisb - endm -bank0 macro - endm -bank1 macro - endm - endif - ifdef __16f84 - endif - ifdef __12c509 base equ 0x07 ; first free file register address stack equ 0x1f+1 ; end address of stack @@ -1243,7 +1228,6 @@ ;; ??? check the crc some day! ;; in verbose mode, dump the data in hex -data bank1 ;; btfss port,b_in ; verbose mode on? goto data_skip ; no, skip it @@ -1257,22 +1241,6 @@ data_skip ;;; -;;; dump stack pointer at top value -;;; - if debug == 1 -dump macro m_label - pushl m_label ; print the label byte - bank0 - call tx_byte - tx_put fsr ; ??? stack check - call tx_space - endm - else -dump macro m_label ; null macro - endm - endif - -;;; ;;; Calculation of high resolution temperature from the count per degrees ;;; c and remaining count values fetched from the DS1820 scratchpad. ;;; @@ -1297,13 +1265,11 @@ pushl16 d'100' bank0 call sb_multiply - dump 'A' ;; subtract 25 from accumulator pushl16 d'25' ;; bank0 call sb_subtract - dump 'B' ;; keep on stack for later use @@ -1318,7 +1284,6 @@ pushl16 d'100' ;; bank0 call sb_multiply - dump 'C' ;; divide by count per degrees c pushf r_ds_count @@ -1326,14 +1291,12 @@ ;; bank0 call sb_divide call sb_nip ; drop remainder - dump 'D' ;; we now have offset from temperature in hundredths of degrees ;; add to previouosly saved value ;; bank0 call sb_add - dump 'E' ;; we now have the measurement in degrees centigrade, scaled by ;; 100, such that 23.54 degrees is binary value for decimal 2354 @@ -1374,7 +1337,6 @@ ;; convert value to bcd bank0 call sb_bcd - dump 'F' ;; transmit the bcd output buffer call tx_byte_hex ; d2 (msd)