首页|嵌入式系统|显示技术|模拟IC/电源|元件与制造|其他IC/制程|消费类电子|无线/通信|汽车电子|工业控制|医疗电子|测试测量
首页 > 分享下载 > 嵌入式系统 > PIC16F6278(或PIC类)与DS18B20通信的程序

PIC16F6278(或PIC类)与DS18B20通信的程序

资料介绍
PIC16F6278(或PIC类)与DS18B20通信的程序

; Program 1820.asm
;
; Performs temperature measurment.  No addressing.
;
; Note that in this routine, the results of the measurement are written
; to a data buffer beginning at data location 18H for later display or
; other processing.
;
; 12C509                                 DS1820        
; GPIO.0 (term 7) ------------------------------ DQ (term 2)
;

    
    LIST p=12C509A
    #include     
    __CONFIG   _CP_OFF & _WDT_OFF & _MCLRE_OFF & _IntRC_OSC 


    CONSTANT DATA_PIN=0

    CONSTANT BASE_VAR=07H

    CONSTANT DATA_BUFF=18H
    CONSTANT BUFF_SIZE=7


PIN_DIRS        EQU BASE_VAR+0
N        EQU BASE_VAR+1

_N           EQU BASE_VAR+2    ; these vars used by the 
O_BYTE           EQU BASE_VAR+3    ; common 1-wire routines
I_BYTE           EQU BASE_VAR+4
LOOP3     
PIC16F6278(或PIC类)与DS18B20通信的程序
本地下载

评论