//芯片資料請到www.elecfans.com查找 //DS1820 C51 子程序//這里以11.0592M晶體為例,不同的晶體速度可能需要調整延時的時間//sbit DQ =P2^1;//根據實際情況定義端口 typedef unsigned char byte;typedef unsigned int word; //延時void delay(word useconds){ for(;useconds>0;useconds--);} //復位byte ow_reset(void){ byte presence; DQ = 0; //pull DQ line low delay(29); // leave it low for 480us DQ = 1; // allow line to return high delay(3); // wait for presence presence = DQ; // get presence signal delay(25); // wait for end of timeslot return(presence); // presence signal returned} // 0=presence, 1 = no part //從 1-wire 總線上讀取一個字節byte read_byte(void){ byte i; byte value = 0; for (i=8;i>0;i--) { value>>=1; DQ = 0; // pull DQ low to start timeslot DQ = 1; // then return high delay(1); //for (i=0; i<3; i++); if(DQ)value|=0x80; delay(6); // wait for rest of timeslot } return(value);} //向 1-WIRE 總線上寫一個字節void write_byte(char val){ byte i; for (i=8; i>0; i--) // writes byte, one bit at a time { DQ = 0; // pull DQ low to start timeslot DQ = val&0x01; delay(5); // hold value for remainder of timeslot DQ = 1; val=val/2; } delay(5);} //讀取溫度char Read_Temperature(void){ union{ byte c[2]; int x; }temp; ow_reset(); write_byte(0xCC); // Skip ROM write_byte(0xBE); // Read Scratch Pad temp.c[1]=read_byte(); temp.c[0]=read_byte(); ow_reset(); write_byte(0xCC); //Skip ROM write_byte(0x44); // Start Conversion return temp.x/2;}
上傳時間: 2013-11-03
上傳用戶:hongmo
PLC 以 其 可靠性高、抗干擾能力強、配套齊全、功能完善、適應性強等特點,廣泛應用于各種控制領域。PLC作為通用工業控制計算機,是面向工礦企業的工控設備,使用梯形圖符號進行編程,與繼電器電路相當接近,被廣大工程技術人員接受。但是在實際應用中,如何編程能夠提高PLC程序運行速度是一個值得我們思考研究的問題。1 PLC工作原理PLC 與 計 算機的工作原理基本相同,即在系統程序的管理下,通過運行應用程序完成用戶任務。但兩者的工作方式有所不同。計算機一般采用等待命令的工作方式,而PLC在確定了工作任務并裝人了專用程序后成為一種專用機,它采用循環掃描工作方式,系統工作任務管理及應用程序執行都是用循環掃描方式完成的。PLC 有 兩 種基本的工作狀態,即運行(RUN)與停止(STOP)狀態。在這兩種狀態下,PLC的掃描過程及所要完成的任務是不盡相同的,如圖1所示。 PLC在RUN工作狀態時,執行一次掃描操作所的時間稱為掃描周期,其典型值通常為1一100nis,不同PLC廠家的產品則略有不同。掃描周期由內部處理時間、輸A/ 輸出處理執行時間、指令執行時間等三部分組成。通常在一個掃描過程中,執行指令的時間占了絕大部分,而執行指令的時間與用戶程序的長短有關。用戶 程 序 是根據控制要求由用戶編制,由許多條PLC指令所組成。不同的指令所對應的程序步不同,以三菱FX2N系列的PLC為例,PLC對每一個程序步操作處理時間為:基本指令占0.741s/步,功能指令占幾百微米/步。完成一個控制任務可以有多種編制程序的方法,因此,選擇合理、巧妙的編程方法既可以大大提高程序運行速度,又可以保證可靠性。 提高PLC程序運行速度的幾種編程方法2.1 用數據傳送給位元件組合的方法來控制輸出在 PL C應 用編程中,最后都會有一段輸出控制程序,一般都是用邏輯取及輸出指令來編寫,如圖2所示。在圖2所示的程序中,邏輯取的程序步為1,輸出的程序步為2,執行上述程序共需3個程序步。通常情況下,PLC要控制的輸出都不會是少量的,比如,有8個輸出,在條件滿足時要同時輸出。此時,執行圖2所示的程序共需17個程序步。若我們通過位元件的組合并采用數據傳送的方法來完成圖2所示的程序,就會大大減少程序步驟。在三 菱 PLC中,只處理ON/OFF狀態的元件(如X,Y,M和S),稱為位元件。但將位元件組合起來也可以處理數據。位元件組合由Kn加首元件號來表示。位元件每4bit為一組組合成單元。如KYO中的n是組數,當n=1時,K,Yo 對應的是Y3一Yo。當n二2時,KZYo對應的是Y7一Yo。通過位元件組合,就可以用處理數據的方式來處理位元件,圖2程序所示的功能可用圖3所示的傳送數據的方式來完成。
上傳時間: 2013-11-11
上傳用戶:幾何公差
This application note describes how the existing dual-port block memories in the Spartan™-IIand Virtex™ families can be used as Quad-Port memories. This essentially involves a dataaccess time (halved) versus functionality (doubled) trade-off. The overall bandwidth of the blockmemory in terms of bits per second will remain the same.
上傳時間: 2013-11-08
上傳用戶:lou45566
This application note shows how to achieve low-cost, efficient serial configuration for Spartan FPGA designs. The approachrecommended here takes advantage of unused resources in a design, thereby reducing the cost, part count, memory size,and board space associated with the serial configuration circuitry. As a result, neither processor nor PROM needs to be fullydedicated to performing Spartan configuration.In particular, information is provided on how the idle processing time of an on-board controller can be used to loadconfiguration data from an off-board source. As a result, it is possible to upgrade a Spartan design in the field by sending thebitstream over a network.
上傳時間: 2014-08-16
上傳用戶:adada
很多不同的廠家生產各種型號的計算機,它們運行完全不同的操作系統,但TCP.IP協議族允許它們互相進行通信。這一點很讓人感到吃驚,因為它的作用已遠遠超出了起初的設想。T C P / I P起源于6 0年代末美國政府資助的一個分組交換網絡研究項目,到9 0年代已發展成為計算機之間最常應用的組網形式。它是一個真正的開放系統,因為協議族的定義及其多種實現可以不用花錢或花很少的錢就可以公開地得到。它成為被稱作“全球互聯網”或“因特網(Internet)”的基礎,該廣域網(WA N)已包含超過1 0 0萬臺遍布世界各地的計算機。本章主要對T C P / I P協議族進行概述,其目的是為本書其余章節提供充分的背景知識。 TCP.IP協議 縮略語 ACK (ACKnowledgment) TCP首部中的確認標志 API (Application Programming Interface) 應用編程接口 ARP (Address Resolution Protocol) 地址解析協議 ARPANET(Defense Advanced Research Project Agency NETwork) (美國)國防部遠景研究規劃局 AS (Autonomous System) 自治系統 ASCII (American Standard Code for Information Interchange) 美國信息交換標準碼 ASN.1 (Abstract Syntax Notation One) 抽象語法記法1 BER (Basic Encoding Rule) 基本編碼規則 BGP (Border Gateway Protocol) 邊界網關協議 BIND (Berkeley Internet Name Domain) 伯克利I n t e r n e t域名 BOOTP (BOOTstrap Protocol) 引導程序協議 BPF (BSD Packet Filter) BSD 分組過濾器 CIDR (Classless InterDomain Routing) 無類型域間選路 CIX (Commercial Internet Exchange) 商業互聯網交換 CLNP (ConnectionLess Network Protocol) 無連接網絡協議 CRC (Cyclic Redundancy Check) 循環冗余檢驗 CSLIP (Compressed SLIP) 壓縮的S L I P CSMA (Carrier Sense Multiple Access) 載波偵聽多路存取 DCE (Data Circuit-terminating Equipment) 數據電路端接設備 DDN (Defense Data Network) 國防數據網 DF (Don’t Fragment) IP首部中的不分片標志 DHCP (Dynamic Host Configuration Protocol) 動態主機配置協議 DLPI (Data Link Provider Interface) 數據鏈路提供者接口 DNS (Domain Name System) 域名系統 DSAP (Destination Service Access Point) 目的服務訪問點 DSLAM (DSL Access Multiplexer) 數字用戶線接入復用器 DSSS (Direct Sequence Spread Spectrum) 直接序列擴頻 DTS (Distributed Time Service) 分布式時間服務 DVMRP (Distance Vector Multicast Routing Protocol) 距離向量多播選路協議 EBONE (European IP BackbONE) 歐洲I P主干網 EOL (End of Option List) 選項清單結束 EGP (External Gateway Protocol) 外部網關協議 EIA (Electronic Industries Association) 美國電子工業協會 FCS (Frame Check Sequence) 幀檢驗序列 FDDI (Fiber Distributed Data Interface) 光纖分布式數據接口 FIFO (First In, First Out) 先進先出 FIN (FINish) TCP首部中的結束標志 FQDN (Full Qualified Domain Name) 完全合格的域名 FTP (File Transfer Protocol) 文件傳送協議 HDLC (High-level Data Link Control) 高級數據鏈路控制 HELLO 選路協議 IAB (Internet Architecture Board) Internet體系結構委員會 IANA (Internet Assigned Numbers Authority) Internet號分配機構 ICMP (Internet Control Message Protocol) Internet控制報文協議 IDRP (InterDomain Routing Protocol) 域間選路協議 IEEE (Institute of Electrical and Electronics Engineering) (美國)電氣與電子工程師協會 IEN (Internet Experiment Notes) 互聯網試驗注釋 IESG (Internet Engineering Steering Group) Internet工程指導小組 IETF (Internet Engineering Task Force) Internet工程專門小組 IGMP (Internet Group Management Protocol) Internet組管理協議 IGP (Interior Gateway Protocol) 內部網關協議 IMAP (Internet Message Access Protocol) Internet報文存取協議 IP (Internet Protocol) 網際協議 I RTF (Internet Research Task Force) Internet研究專門小組 IS-IS (Intermediate System to Intermediate System Protocol) 中間系統到中間系統協議 ISN (Initial Sequence Number) 初始序號 ISO (International Organization for Standardization) 國際標準化組織 ISOC (Internet SOCiety) Internet協會 LAN (Local Area Network) 局域網 LBX (Low Bandwidth X) 低帶寬X LCP (Link Control Protocol) 鏈路控制協議 LFN (Long Fat Net) 長肥網絡 LIFO (Last In, First Out) 后進先出 LLC (Logical Link Control) 邏輯鏈路控制 LSRR (Loose Source and Record Route) 寬松的源站及記錄路由 MBONE (Multicast Backbone On the InterNEt) Internet上的多播主干網 MIB (Management Information Base) 管理信息庫 MILNET (MILitary NETwork) 軍用網 MIME (Multipurpose Internet Mail Extensions) 通用I n t e r n e t郵件擴充 MSL (Maximum Segment Lifetime) 報文段最大生存時間 MSS (Maximum Segment Size) 最大報文段長度 M TA (Message Transfer Agent) 報文傳送代理 MTU (Maximum Transmission Unit) 最大傳輸單元 NCP (Network Control Protocol) 網絡控制協議 NFS (Network File System) 網絡文件系統 NIC (Network Information Center) 網絡信息中心 NIT (Network Interface Tap) 網絡接口栓(S u n公司的一個程序) NNTP (Network News Transfer Protocol) 網絡新聞傳送協議 NOAO (National Optical Astronomy Observatories) 國家光學天文臺 NOP (No Operation) 無操作 NSFNET (National Science Foundation NETwork) 國家科學基金網絡 NSI (NASA Science Internet) (美國)國家宇航局I n t e r n e t NTP (Network Time Protocol) 網絡時間協議 NVT (Network Virtual Terminal) 網絡虛擬終端 OSF (Open Software Foudation) 開放軟件基金 OSI (Open Systems Interconnection) 開放系統互連 OSPF (Open Shortest Path First) 開放最短通路優先 PAWS (Protection Against Wrapped Sequence number) 防止回繞的序號 PDU (Protocol Data Unit) 協議數據單元 POSIX (Portable Operating System Interface) 可移植操作系統接口 PPP (Point-to-Point Protocol) 點對點協議 PSH (PuSH) TCP首部中的急迫標志 RARP (Reverse Address Resolution Protocol) 逆地址解析協議 RFC (Request For Comments) Internet的文檔,其中的少部分成為標準文檔 RIP (Routing Information Protocol) 路由信息協議 RPC (Remote Procedure Call) 遠程過程調用 RR (Resource Record) 資源記錄 RST (ReSeT) TCP首部中的復位標志 RTO (Retransmission Time Out) 重傳超時 RTT (Round-Trip Time) 往返時間 SACK (Selective ACKnowledgment) 有選擇的確認 SLIP (Serial Line Internet Protocol) 串行線路I n t e r n e t協議 SMI (Structure of Management Information) 管理信息結構 SMTP (Simple Mail Transfer Protocol) 簡單郵件傳送協議 SNMP (Simple Network Management Protocol) 簡單網絡管理協議 SSAP (Source Service Access Point) 源服務訪問點 SSRR (Strict Source and Record Route) 嚴格的源站及記錄路由 SWS (Silly Window Syndrome) 糊涂窗口綜合癥 SYN (SYNchronous) TCP首部中的同步序號標志 TCP (Transmission Control Protocol) 傳輸控制協議 TFTP (Trivial File Transfer Protocol) 簡單文件傳送協議 TLI (Transport Layer Interface) 運輸層接口 TTL (Ti m e - To-Live) 生存時間或壽命 TUBA (TCP and UDP with Bigger Addresses) 具有更長地址的T C P和U D P Telnet 遠程終端協議 UA (User Agent) 用戶代理 UDP (User Datagram Protocol) 用戶數據報協議 URG (URGent) TCP首部中的緊急指針標志 UTC (Coordinated Universal Time) 協調的統一時間 UUCP (Unix-to-Unix CoPy) Unix到U n i x的復制 WAN (Wide Area Network) 廣域網 WWW (World Wide Web) 萬維網 XDR (eXternal Data Representation) 外部數據表示 XID (transaction ID) 事務標識符 XTI (X/Open Transport Layer Interface) X/ O p e n運輸層接口
上傳時間: 2013-11-13
上傳用戶:tdyoung
User ManualRev. 1.2SmartRF® CC2420DK: Packet Sniffer for IEEE 802.15.4 and ZigBee Table of contents1 INTRODUCTION...............................................................................................31.1 HARDWARE PLATFORM.......................................................................................31.2 SOFTWARE.........................................................................................................32 USER INTERFACE..........................................................................................42.1 MENUS AND TOOLBARS.......................................................................................62.2 SETUP................................................................................................................62.3 SELECT FIELDS...................................................................................................72.3.1 Tips............................................................................................................72.4 PACKET DETAILS.................................................................................................72.5 ADDRESS BOOK..................................................................................................92.5.1 Tips............................................................................................................92.6 DISPLAY FILTER................................................................................................102.7 TIME LINE.........................................................................................................103 HELP....................................................................................................................114 TROUBLESHOOTING..................................................................................125 GENERAL INFORMATION........................................................................135.1 DOCUMENT HISTORY........................................................................................135.2 DISCLAIMER......................................................................................................135.3 TRADEMARKS...................................................................................................136 ADDRESS INFORMATION........................................................................14
上傳時間: 2014-01-14
上傳用戶:zhangyi99104144
We offer a broad line of high performance low dropout (LDO) linear regulators with fasttransient response, excellent line and load regulation, and very wide input voltage rangefrom 0.9V to 100V. Output currents range from 20mA to 10A, with positive, negative andmultiple output versions available. Many devices offer output voltage operation <0.8V andsome feature operation as low as 0V, even with a single supply. Most are stable with ceramicoutput capacitors. LDO regulators can be applied in virtually any application.
上傳時間: 2013-11-15
上傳用戶:努力努力再努力
EPON主要由三個部分構成,包括光線路終端(OLlj Optical Line Terminal)、光分配網絡(ODN,Optical Distribution Network)和光網絡單元(ONU,Optical Network Unit .
上傳時間: 2013-11-11
上傳用戶:JGR2013
The LTC®3207/LTC3207-1 is a 600mA LED/Camera driverwhich illuminates 12 Universal LEDs (ULEDs) and onecamera fl ash LED. The ULEDs are considered universalbecause they may be individually turned on or off, setin general purpose output (GPO) mode, set to blink at aselected on-time and period, or gradate on and off at aselected gradation rate. This device also has an externalenable (ENU) pin that may be used to blink, gradate, orturn on/off the LEDs without using the I2C bus. This may beuseful if the microprocessor is in sleep or standby mode. Ifused properly, these features may save valuable memoryspace, programming time, and reduce the I2C traffi c.
上傳時間: 2014-01-04
上傳用戶:LANCE
本軟件是關于MAX338, MAX339的英文數據手冊:MAX338, MAX339 8通道/雙4通道、低泄漏、CMOS模擬多路復用器 The MAX338/MAX339 are monolithic, CMOS analog multiplexers (muxes). The 8-channel MAX338 is designed to connect one of eight inputs to a common output by control of a 3-bit binary address. The dual, 4-channel MAX339 is designed to connect one of four inputs to a common output by control of a 2-bit binary address. Both devices can be used as either a mux or a demux. On-resistance is 400Ω max, and the devices conduct current equally well in both directions. These muxes feature extremely low off leakages (less than 20pA at +25°C), and extremely low on-channel leakages (less than 50pA at +25°C). The new design offers guaranteed low charge injection (1.5pC typ) and electrostatic discharge (ESD) protection greater than 2000V, per method 3015.7. These improved muxes are pin-compatible upgrades for the industry-standard DG508A and DG509A. For similar Maxim devices with lower leakage and charge injection but higher on-resistance, see the MAX328 and MAX329.
上傳時間: 2013-11-12
上傳用戶:18711024007