虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

Off-line

  • DS1820 C51 子程序 (一线数据传输)

    //芯片资料请到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;}

    标签: 1820 C51 DS 程序

    上传时间: 2013-11-03

    上传用户:hongmo

  • 提高PLC程序运行速度的几种编程方法

    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所示的传送数据的方式来完成。

    标签: PLC 程序 运行速度 编程方法

    上传时间: 2013-11-11

    上传用户:几何公差

  • XAPP228 -Virtex器件内的四端口存储器

    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.

    标签: Virtex XAPP 228 器件

    上传时间: 2013-11-08

    上传用户:lou45566

  • XAPP098 - Spartan FPGA低成本、高效率串行配置

    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.

    标签: Spartan XAPP FPGA 098

    上传时间: 2014-08-16

    上传用户:adada

  • tcp ip协议详解 中文版PDF

    很多不同的厂家生产各种型号的计算机,它们运行完全不同的操作系统,但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运输层接口

    标签: tcp 协议

    上传时间: 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

  • 线性低压差 (LDO) 稳压器解决方案

    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.

    标签: LDO 线性 低压差 稳压器

    上传时间: 2013-11-15

    上传用户:努力努力再努力

  • EPON系统OAM模块的软件实现

    EPON主要由三个部分构成,包括光线路终端(OLlj Optical Line Terminal)、光分配网络(ODN,Optical Distribution Network)和光网络单元(ONU,Optical Network Unit .

    标签: EPON OAM 模块

    上传时间: 2013-11-11

    上传用户:JGR2013

  • LTC3207,LTC3207-1用户指南

      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.

    标签: 3207 LTC 用户

    上传时间: 2014-01-04

    上传用户:LANCE

  • MAX338/MAX339的英文数据手册

      本软件是关于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.

    标签: MAX 338 339 英文

    上传时间: 2013-11-12

    上传用户:18711024007