亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? main.lst

?? 達(dá)拉斯 1-Wire 主機(jī)通信 這份資料展示了如何把 1-Wire 主機(jī)通信在應(yīng)用到一個(gè)AVR系統(tǒng)中
?? LST
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
##############################################################################
#                                                                            #
# IAR Atmel AVR C/EC++ Compiler V3.20A/W32             19/Aug/2004  16:08:04 #
# Copyright 1996-2004 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Source file  =  Z:\qvcs\AVR318 Dallas 1-wire Communication              #
#                    Interface\Source Code\IAR\polled\main.c                 #
#    Command line =  --cpu=m32 -ms -o "Z:\qvcs\AVR318 Dallas 1-wire          #
#                    Communication Interface\Source                          #
#                    Code\IAR\polled\Debug\Obj\" -lC "Z:\qvcs\AVR318 Dallas  #
#                    1-wire Communication Interface\Source                   #
#                    Code\IAR\polled\Debug\List\" -lA "Z:\qvcs\AVR318        #
#                    Dallas 1-wire Communication Interface\Source            #
#                    Code\IAR\polled\Debug\List\" --initializers_in_flash    #
#                    --root_variables -z2 --no_cse --no_inline               #
#                    --no_code_motion --no_cross_call --no_clustering        #
#                    --debug -DENABLE_BIT_DEFINITIONS -e -I "C:\Program      #
#                    Files\IAR Systems\Embedded Workbench 3.2\avr\INC\" -I   #
#                    "C:\Program Files\IAR Systems\Embedded Workbench        #
#                    3.2\avr\INC\CLIB\" --eeprom_size 1024 "Z:\qvcs\AVR318   #
#                    Dallas 1-wire Communication Interface\Source            #
#                    Code\IAR\polled\main.c"                                 #
#    List file    =  Z:\qvcs\AVR318 Dallas 1-wire Communication              #
#                    Interface\Source Code\IAR\polled\Debug\List\main.lst    #
#    Object file  =  Z:\qvcs\AVR318 Dallas 1-wire Communication              #
#                    Interface\Source Code\IAR\polled\Debug\Obj\main.r90     #
#                                                                            #
#                                                                            #
##############################################################################

Z:\qvcs\AVR318 Dallas 1-wire Communication Interface\Source Code\IAR\polled\main.c
      1          // This file has been prepared for Doxygen automatic documentation generation.
      2          /*! \file ********************************************************************
      3          *
      4          * Atmel Corporation
      5          *
      6          * \li File:               main.c
      7          * \li Compiler:           IAR EWAAVR 3.20a
      8          * \li Support mail:       avr@atmel.com
      9          *
     10          * \li Supported devices:  All AVRs.
     11          *
     12          * \li Application Note:   AVR318 - Dallas 1-Wire(R) master.
     13          *                         
     14          *
     15          * \li Description:        Example on how to use the 1-Wire(R) interface
     16          *                         master.
     17          *
     18          *                         $Revision: 1.6 $
     19          *                         $Date: Thursday, August 19, 2004 09:02:02 UTC $
     20          ****************************************************************************/
     21          
     22          #include <ioavr.h>
     23          #include <inavr.h>
     24          
     25          #include "OWIPolled.h"
     26          #include "OWIHighLevelFunctions.h"
     27          #include "OWIBitFunctions.h"
     28          #include "..\common_files\OWIcrc.h"
     29          
     30          #include <string.h> // Used for memcpy.
     31          
     32          
     33          // Defines used only in code example.
     34          #define DS1820_FAMILY_ID                0x10 
     35          #define DS1820_START_CONVERSION         0x44
     36          #define DS1820_READ_SCRATCHPAD          0xbe
     37          #define DS1820_ERROR                    -1000   // Return code. Outside temperature range.
     38          
     39          #define DS2890_FAMILY_ID                0x2c
     40          #define DS2890_WRITE_CONTROL_REGISTER   0X55
     41          #define DS2890_RELEASE_CODE             0x96
     42          #define DS2890_WRITE_POSITION           0x0f
     43          
     44          #define SEARCH_SUCCESSFUL               0x00
     45          #define SEARCH_CRC_ERROR                0x01
     46          
     47          #define FALSE       0
     48          #define TRUE        1
     49          
     50          #define MAX_DEVICES 8       //!< Max number of devices to search for.
     51          
     52          #define BUSES   (OWI_PIN_0 | OWI_PIN_1) //!< Buses to search.
     53          
     54          
     55          /*! \brief  Data type used to hold information about slave devices.
     56           *  
     57           *  The OWI_device data type holds information about what bus each device
     58           *  is connected to, and its 64 bit identifier.
     59           */
     60          typedef struct
     61          {
     62              unsigned char bus;      //!< A bitmask of the bus the device is connected to.
     63              unsigned char id[8];    //!< The 64 bit identifier.
     64          } OWI_device;
     65          
     66          
     67          // Prototypes of functions used in exemples.
     68          unsigned char SearchBuses(OWI_device * devices, unsigned char len, unsigned char buses);
     69          OWI_device * FindFamily(unsigned char familyID, OWI_device * devices, unsigned char size);
     70          signed int DS1820_ReadTemperature(unsigned char bus, unsigned char * id);
     71          void DS2890_SetWiperPosition(unsigned char position, unsigned char bus, unsigned char * id);
     72          
     73          
     74          /*! \brief  Example application for the polled drivers.
     75           *
     76           *  Example application for the software only and polled UART driver.
     77           *  This example application will find all devices (upper bounded by MAX_DEVICES) 
     78           *  on the buses defined by BUSES. It then tries to find either a DS1820 or DS2890 
     79           *  device on a bus, and communicate with them to read temperature (DS1820) or 
     80           *  set wiper position (DS2890).
     81           *  This example is not written in a very optimal way. It is merely intended to show
     82           *  how the polled 1-Wire(R) driver can be used.
     83           */

   \                                 In segment CODE, align 2, keep-with-next
     84          void main(void)
   \                     main:
     85          {
   \   00000000   ........                   CALL    ?PROLOGUE7_L09
   \   00000004                              REQUIRE ?Register_R4_is_cg_reg
   \   00000004                              REQUIRE ?Register_R5_is_cg_reg
   \   00000004                              REQUIRE ?Register_R6_is_cg_reg
     86              static OWI_device devices[MAX_DEVICES];
     87              OWI_device * ds1820;
     88              OWI_device * ds2890;
     89              signed int temperature = 0;
   \   00000004   2444                       CLR     R4
   \   00000006   2455                       CLR     R5
     90              unsigned char wiperPos = 0;
   \   00000008   2466                       CLR     R6
     91              
     92              // Initialize PORTB as output. Can be used to display values on
     93              // the LEDs on a STK500 development board.
     94              DDRB = 0xff;
   \   0000000A   EF0F                       LDI     R16,255
   \   0000000C   BB07                       OUT     0x17,R16
     95          
     96              OWI_Init(BUSES);
   \   0000000E   E003                       LDI     R16,3
   \   00000010   ........                   CALL    OWI_Init
     97              
     98              // Do the bus search until all ids are read without crc error.    
     99              while(SearchBuses(devices, MAX_DEVICES, BUSES) != SEARCH_SUCCESSFUL)
   \                     ??main_0:
   \   00000014   E033                       LDI     R19,3
   \   00000016   E028                       LDI     R18,8
   \   00000018   ....                       LDI     R16,LOW(??devices)
   \   0000001A   ....                       LDI     R17,(??devices) >> 8
   \   0000001C   ....                       RCALL   SearchBuses
   \   0000001E   2300                       TST     R16
   \   00000020   F7C9                       BRNE    ??main_0
    100              {
    101              
    102              }
    103              
    104              // See if there is a DS1820 or DS2890 on a bus.
    105              ds1820 = FindFamily(DS1820_FAMILY_ID, devices, MAX_DEVICES);
   \   00000022   E018                       LDI     R17,8
   \   00000024   ....                       LDI     R18,LOW(??devices)
   \   00000026   ....                       LDI     R19,(??devices) >> 8
   \   00000028   E100                       LDI     R16,16
   \   0000002A   ....                       RCALL   FindFamily
   \   0000002C   01C8                       MOVW    R25 : R24,R17 : R16
    106              ds2890 = FindFamily(DS2890_FAMILY_ID, devices, MAX_DEVICES);
   \   0000002E   E018                       LDI     R17,8
   \   00000030   ....                       LDI     R18,LOW(??devices)
   \   00000032   ....                       LDI     R19,(??devices) >> 8
   \   00000034   E20C                       LDI     R16,44
   \   00000036   ....                       RCALL   FindFamily
   \   00000038   01D8                       MOVW    R27 : R26,R17 : R16
    107              
    108              // Do something useful with the slave devices in an eternal loop.
    109              for (;;)
    110              {
    111                  // If there is a DS1820 temperature sensor on a bus, read the
    112                  // temperature.
    113                  // The DS1820 must have Vdd pin connected for this code to work.
    114                  if (ds1820 != NULL)
   \                     ??main_1:
   \   0000003A   2F08                       MOV     R16,R24
   \   0000003C   2B09                       OR      R16,R25
   \   0000003E   F039                       BREQ    ??main_2
    115                  {
    116                      temperature = DS1820_ReadTemperature((*ds1820).bus, (*ds1820).id);
   \   00000040   019C                       MOVW    R19 : R18,R25 : R24
   \   00000042   5F2F                       SUBI    R18,255
   \   00000044   4F3F                       SBCI    R19,255
   \   00000046   01FC                       MOVW    R31 : R30,R25 : R24
   \   00000048   8100                       LD      R16,Z
   \   0000004A   ....                       RCALL   DS1820_ReadTemperature
   \   0000004C   0128                       MOVW    R5 : R4,R17 : R16
    117                  }        
    118                  // If there is a DS2890 digital potentiometer, increment the
    119                  // wiper value.
    120                  if (ds2890 != NULL)
   \                     ??main_2:
   \   0000004E   2F0A                       MOV     R16,R26
   \   00000050   2B0B                       OR      R16,R27
   \   00000052   F039                       BREQ    ??main_3
    121                  {
    122                      DS2890_SetWiperPosition(wiperPos++, (*ds2890).bus, (*ds2890).id);
   \   00000054   019D                       MOVW    R19 : R18,R27 : R26
   \   00000056   5F2F                       SUBI    R18,255
   \   00000058   4F3F                       SBCI    R19,255
   \   0000005A   911C                       LD      R17,X
   \   0000005C   2D06                       MOV     R16,R6
   \   0000005E   ....                       RCALL   DS2890_SetWiperPosition
   \   00000060   9463                       INC     R6
    123                  }
    124                  
    125                  // Discard lsb of temperature and output to PORTB.
    126                  PORTB = ~(temperature >> 1);
   \                     ??main_3:
   \   00000062   0182                       MOVW    R17 : R16,R5 : R4
   \   00000064   9515                       ASR     R17
   \   00000066   9507                       ROR     R16
   \   00000068   9500                       COM     R16
   \   0000006A   BB08                       OUT     0x18,R16
   \   0000006C   CFE6                       RJMP    ??main_1
    127              }
    128          }

   \                                 In segment NEAR_Z, align 1, keep-with-next, root
   \   00000000                              REQUIRE `?<Segment init: NEAR_Z>`
   \                     ??devices:
   \   00000000                              DS 72
    129          
    130          
    131          /*! \brief  Perform a 1-Wire search
    132           *
    133           *  This function shows how the OWI_SearchRom function can be used to 
    134           *  discover all slaves on the bus. It will also CRC check the 64 bit
    135           *  identifiers.
    136           *
    137           *  \param  devices Pointer to an array of type OWI_device. The discovered 
    138           *                  devices will be placed from the beginning of this array.
    139           *
    140           *  \param  len     The length of the device array. (Max. number of elements).
    141           *
    142           *  \param  buses   Bitmask of the buses to perform search on.
    143           *
    144           *  \retval SEARCH_SUCCESSFUL   Search completed successfully.
    145           *  \retval SEARCH_CRC_ERROR    A CRC error occured. Probably because of noise
    146           *                              during transmission.
    147           */

   \                                 In segment CODE, align 2, keep-with-next
    148          unsigned char SearchBuses(OWI_device * devices, unsigned char len, unsigned char buses)
   \                     SearchBuses:
    149          {
   \   00000000   ........                   CALL    ?PROLOGUE15_L09
   \   00000004                              REQUIRE ?Register_R4_is_cg_reg
   \   00000004                              REQUIRE ?Register_R5_is_cg_reg
   \   00000004                              REQUIRE ?Register_R6_is_cg_reg
   \   00000004                              REQUIRE ?Register_R7_is_cg_reg
   \   00000004                              REQUIRE ?Register_R8_is_cg_reg
   \   00000004                              REQUIRE ?Register_R9_is_cg_reg
   \   00000004                              REQUIRE ?Register_R10_is_cg_reg
   \   00000004                              REQUIRE ?Register_R11_is_cg_reg
   \   00000004                              REQUIRE ?Register_R12_is_cg_reg
   \   00000004                              REQUIRE ?Register_R13_is_cg_reg
   \   00000004                              REQUIRE ?Register_R14_is_cg_reg
   \   00000004   01C8                       MOVW    R25 : R24,R17 : R16
   \   00000006   2ED2                       MOV     R13,R18
    150              unsigned char i, j;
    151              unsigned char presence;
    152              unsigned char * newID;
    153              unsigned char * currentID;
    154              unsigned char currentBus;
    155              unsigned char lastDeviation;
    156              unsigned char numDevices;
    157              
    158              // Initialize all addresses as zero, on bus 0 (does not exist).
    159              // Do a search on the bus to discover all addresses.    
    160              for (i = 0; i < len; i++)
   \   00000008   E0B0                       LDI     R27,0
   \                     ??SearchBuses_0:
   \   0000000A   15BD                       CP      R27,R13
   \   0000000C   F520                       BRCC    ??SearchBuses_1
    161              {
    162                  devices[i].bus = 0x00;
   \   0000000E   E000                       LDI     R16,0
   \   00000010   2E90                       MOV     R9,R16
   \   00000012   2F4B                       MOV     R20,R27
   \   00000014   E050                       LDI     R21,0
   \   00000016   E009                       LDI     R16,9
   \   00000018   E010                       LDI     R17,0
   \   0000001A   ........                   CALL    ?S_EC_MUL_L02

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲午夜日本在线观看| 亚洲一区二区综合| 欧美中文字幕一区| 国产精品资源网| 日韩精品欧美成人高清一区二区| 国产日韩av一区| 欧美一区二区三区成人| 色哟哟一区二区在线观看| 国产一区二区免费视频| 午夜伦理一区二区| 亚洲乱码一区二区三区在线观看| 久久久久久久久伊人| 91精品欧美一区二区三区综合在| av中文字幕一区| 国产成人99久久亚洲综合精品| 丝袜美腿一区二区三区| 一区二区欧美精品| 中文字幕永久在线不卡| 久久久av毛片精品| 精品欧美黑人一区二区三区| 国产精品欧美极品| 久久久久久9999| 精品欧美一区二区久久| 91精品蜜臀在线一区尤物| 91精品福利在线| 91视视频在线直接观看在线看网页在线看 | 免费久久精品视频| 亚洲福利一区二区| 一区二区三区国产精品| 亚洲日本护士毛茸茸| **性色生活片久久毛片| 国产精品久久久久久户外露出| 久久久久久久久伊人| 久久久久久亚洲综合影院红桃| 日韩欧美一级二级三级| 日韩一卡二卡三卡四卡| 日韩一区二区在线免费观看| 日韩女优毛片在线| 精品人伦一区二区色婷婷| 日韩无一区二区| 精品国产百合女同互慰| 精品国产91九色蝌蚪| 久久蜜桃香蕉精品一区二区三区| 精品国产凹凸成av人导航| 久久久精品天堂| 中文字幕国产一区二区| 1000精品久久久久久久久| 亚洲猫色日本管| 亚洲高清在线精品| 日韩电影在线一区二区| 老司机免费视频一区二区| 国内欧美视频一区二区| 国产91精品久久久久久久网曝门| 成人午夜激情片| 色婷婷久久久亚洲一区二区三区 | 粉嫩av亚洲一区二区图片| 成人午夜在线播放| 色综合久久久久综合| 欧美日韩在线观看一区二区| 91精品国产91久久综合桃花| 精品成a人在线观看| 日本一区二区三区在线不卡| 亚洲精品国产视频| 青椒成人免费视频| 国产乱码字幕精品高清av| heyzo一本久久综合| 欧美视频三区在线播放| 精品日韩一区二区三区免费视频| 久久视频一区二区| 136国产福利精品导航| 五月天一区二区三区| 国产一区二区伦理| 色激情天天射综合网| 日韩美女在线视频| 国产精品国产馆在线真实露脸| 亚洲精品国产a久久久久久 | 韩国欧美一区二区| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美性色黄大片手机版| 久久亚洲影视婷婷| 洋洋成人永久网站入口| 国产精品自拍在线| 欧美无人高清视频在线观看| 国产亚洲制服色| 香蕉成人伊视频在线观看| 国产精品亚洲人在线观看| 在线观看亚洲成人| 欧美高清在线一区二区| 午夜不卡在线视频| 成人av资源在线观看| 欧美一级艳片视频免费观看| 中文字幕永久在线不卡| 久久精品国产精品亚洲红杏| 在线免费观看日本欧美| 久久久亚洲精品石原莉奈| 97se亚洲国产综合自在线不卡| 日韩亚洲欧美在线| 亚洲乱码中文字幕| 国产成人av一区二区三区在线观看| 欧美日韩黄色影视| 成人免费在线视频| 国产在线精品一区在线观看麻豆| 欧美日韩国产色站一区二区三区| 国产午夜精品一区二区三区视频 | 亚洲人成网站精品片在线观看 | 色婷婷一区二区| 久久精品亚洲乱码伦伦中文| 午夜欧美2019年伦理| 91丝袜高跟美女视频| 久久久精品免费免费| 男女性色大片免费观看一区二区| 色综合天天综合网天天狠天天| 国产亚洲一区二区在线观看| 日韩在线播放一区二区| 在线观看网站黄不卡| 国产精品久久三| 国产成人免费视频网站高清观看视频| 欧美高清www午色夜在线视频| 亚洲视频中文字幕| www.在线成人| 欧美激情自拍偷拍| 国产在线精品不卡| 精品裸体舞一区二区三区| 日本aⅴ精品一区二区三区| 在线观看国产精品网站| 亚洲男帅同性gay1069| 成年人网站91| 中文字幕一区av| 99九九99九九九视频精品| 欧美国产日产图区| 国产成人aaa| 中文字幕一区二区三区在线不卡| 成人在线视频首页| 国产精品对白交换视频| av动漫一区二区| 亚洲日本va在线观看| 在线观看视频91| 亚洲成人av一区二区三区| 欧美美女视频在线观看| 亚洲电影第三页| 制服丝袜中文字幕一区| 欧美日韩另类国产亚洲欧美一级| 亚洲自拍偷拍综合| 欧美日韩精品系列| 强制捆绑调教一区二区| 久久亚洲一区二区三区四区| 国产成人精品免费在线| 国产精品网友自拍| 日本道免费精品一区二区三区| 亚洲伊人伊色伊影伊综合网| 这里是久久伊人| 国产伦理精品不卡| 欧美激情一区二区三区全黄| 色综合久久综合| 午夜日韩在线电影| 久久综合狠狠综合久久综合88| 国产伦精品一区二区三区视频青涩 | 色94色欧美sute亚洲线路一ni| 亚洲在线视频免费观看| 4hu四虎永久在线影院成人| 国产一区二区0| 亚洲日本护士毛茸茸| 3d动漫精品啪啪1区2区免费| 国产一区二区三区香蕉| 亚洲视频在线观看一区| 91麻豆精品国产无毒不卡在线观看| 久久99久久99小草精品免视看| 欧美激情一区三区| 欧美日韩三级视频| 国产高清亚洲一区| 一区二区三区波多野结衣在线观看| 91麻豆精品国产无毒不卡在线观看| 韩日欧美一区二区三区| 亚洲美女在线国产| 精品国产一区二区三区av性色| 成人毛片老司机大片| 视频一区视频二区中文| 久久精品一区二区| 欧美日韩色一区| 成人午夜在线视频| 日本强好片久久久久久aaa| 国产精品欧美精品| 欧美一卡在线观看| 日本道免费精品一区二区三区| 精品一区二区在线视频| 亚洲综合av网| 国产精品你懂的| 制服丝袜国产精品| 成人av资源站| 精品制服美女丁香| 亚洲一级不卡视频| 国产日韩欧美精品一区| 91麻豆精品国产91久久久使用方法| 成人av免费在线播放| 麻豆精品视频在线观看免费| 亚洲精品精品亚洲| 国产精品嫩草久久久久| 日韩精品一区二区三区视频| 欧美日韩在线不卡| 91在线观看污|