您当前的位置:五五电子网电子知识单片机-工控设备51单片机DS1620温度芯片与8751芯片连接代码 正文
DS1620温度芯片与8751芯片连接代码

DS1620温度芯片与8751芯片连接代码

点击数:7808 次   录入时间:03-04 11:39:06   整理:http://www.55dianzi.com   51单片机
               mov   a,#3        ; select lcd line #2.
               mov   b,#6        ; start at location #7 with
                                 ; temp display.
               lcall placecur    ; place cursor at above selected
                                 ; location.
               mov   r4,#offcur  ; kill the cursor so we dont
                                 ; have a cursor
               lcall wrlcdcom    ; being displayed.
               lcall delay       ; Delay between fetch.
               jb    p2.5,comin_back1
               ljmp  read_tmp    ; if done, go get another reading.

comin_back1:
               ljmp  comin_back; Goto program mode if switch selected

look_up:
               cjne     r1,#01h,over_32
                               ;determine if temp is above 32.
               sjmp     b0

over_32:
               ljmp     x0
st:
               ret             ; return to calling routine from here.


        ; Incredibly ( BIG ) Look-Up table begins here...........

b0:            cjne     a,#92h,b1   ; below 32 look up table
               lcall    prtlcd      ; -67 Deg F Lowest Value.
               db       '-67.0',0
               ljmp     st
b1:            cjne     a,#93h,b2
               lcall     prtlcd
               db       '-66.1',0
               ljmp     st
b2:            cjne     a,#94h,b3
               lcall     prtlcd
               db       '-65.2',0
               ljmp     st
b3:            cjne     a,#95h,b4
               lcall     prtlcd
               db       '-64.3',0
               ljmp     st
b4:            cjne     a,#96h,b5
               lcall     prtlcd
               db       '-63.4',0
               ljmp     st
b5:            cjne     a,#97h,b6
               lcall     prtlcd
               db       '-62.5',0
               ljmp     st
b6:            cjne     a,#98h,b7
               lcall     prtlcd
               db       '-61.6',0
               ljmp     st
b7:            cjne     a,#99h,b8
               lcall     prtlcd
               db       '-60.7',0
               ljmp     st
b8:            cjne     a,#9ah,b9
               lcall     prtlcd
               db       '-59.8',0
               ljmp     st
b9:            cjne     a,#9bh,b10
               lcall     prtlcd
               db       '-58.9',0

上一页  [1] [2] [3] [4] [5] [6]  下一页


本文关键字:暂无联系方式51单片机单片机-工控设备 - 51单片机