This application note demonstrates how to write an Inter Integrated Circuit bus driver (I2C) for the XA-S3 16-bitMicrocontroller from Philips Semiconductors.Not only the driver software is given. This note also contains a set of (example) interface routines and a smalldemo application program. All together it offers the user a quick start in writing a complete I2C system applicationwith the PXAS3x.The driver routines support interrupt driven single mAster transfers. Furthermore, the routines are suitable foruse in conjunction with real time operating systems.
上传时间: 2013-11-02
上传用户:zw380105939
The 87LPC76X Microcontroller combines in a small package thebenefits of a high-performance microcontroller with on-boardhardware supporting the Inter-Integrated Circuit (I2C) bus interface.The 87LPC76X can be programmed both as an I2C bus mAster, aslave, or both. An overview of the I2C bus and description of the bussupport hardware in the 87LPC76X microcontrollers appears inapplication note AN464, Using the 87LPC76X Microcontroller as anI2C Bus mAster. That application note includes a programmingexample, demonstrating a bus-mAster code. Here we show anexample of programming the microcontroller as an I2C slave.The code listing demonstrates communications routines for the87LPC76X as a slave on the I2C bus. It compliments the program inAN464 which demonstrates the 87LPC76X as an I2C bus mAster.One may demonstrate two 87LPC76X devices communicating witheach other on the I2C bus, using the AN464 code in one, and theprogram presented here in the other. The examples presented hereand in AN464 allow the 87LPC76X to be either a mAster or a slave,but not both. Switching between mAster and slave roles in amultimAster environment is described in application note AN435.The software for a slave on the bus is relatively simple, as theprocessor plays a relatively passive role. It does not initiate bustransfers on its own, but responds to a mAster initiating thecommunications. This is true whether the slave receives or transmitsdata—transmission takes place only as a response to a busmAster’s request. The slave does not have to worry about arbitrationor about devices which do not acknowledge their address. As theslave is not supposed to take control of the bus, we do not demandit to resolve bus exceptions or “hangups”. If the bus becomesinactive the processor simply withdraws, not interfering with themAster (or mAsters) on the bus which should (hopefully) try toresolve the situation.
上传时间: 2013-11-19
上传用户:shirleyYim
Presents short and simple I2C software routines that support onlyslave (rather than mAster or mAster & slave) operation and an ASMdemonstration program. The slave-only software in this app notecomplements the mAster mode software presented in AN464, Usingthe 87LPC76X microcontroller as an I2C bus mAster.
上传时间: 2013-11-22
上传用户:1039312764
I2C interface, is a very powerful tool for system designers. Theintegrated protocols allow systems to be completely software defined.Software development time of different products can be reduced byassembling a library of reusable software modules. In addition, themultimAster capability allows rapid testing and alignment ofend-products via external connections to an assembly-line computer.The mask programmable 87LPC76X and its EPROM version, the87LPC76X, can operate as a mAster or a slave device on the I2Csmall area network. In addition to the efficient interface to thededicated function ICs in the I2C family, the on-board interfacefacilities I/O and RAM expansion, access to EEPROM andprocessor-to-processor communications.
标签: microcontro Using 76X LPC
上传时间: 2013-12-30
上传用户:Artemis
基于多点网络的水厂自动监控系统设计Design of MPI Based Automatic Monitoring and Control System in Water Works刘 美 俊(湖南工程学院,湘潭411101)摘要针对水厂工作水泵多、现场离控制站距离远的特点,提出了一种基于MPI多点网络的自动监控系统的设计方法,分析了系统的工作原理,介绍了系统中数据的采集与处理、主站与从站的通信原理以及系统软件的设计。由于这种系统的主、从站PLC之间采用MPI网络通信,具有运行可靠、性能价格比高的特点,所以适用于中小规模水厂的分布式监控场合。关键词多点网络主站从站监控系统Abstract Ina ccordancew ithth efe atuersof w aterw orks,i. e. ,manyp umpsin o perationa ndth ep umps, farfor mt hec ontrolst ation,th em ethodo fdesigninga na utomati(〕monitoringa ndc ontorlsy stemb asedo nM PIis p resented.Th eo perationalpr incipleo fth esy stemi san alyzed,th ed atac olection,data processing; communication between mAster station and slave station as wel as design and system software are discussed. Because MPI network communicationis used among mAster station, slave stations and PLC, the system is reliable and high cost-efective. It is, suitable for smal and mediumsized water works for distrbuted monitoring and control.Keywords MPI mAsterst ation Slaves tation Monitoringa ndc ontorlsy stem 自来 水 厂 的自动控制系统一般分为两大部分,一对组态硬件要求较高,投资较大。相对而言,MPI网是水源地深水泵的工作控制,一是水厂区变频恒压供络速度可达187.5 M bps,通过一级中继器传输距离可水控制,两部分的实际距离通常都比较远。某厂水源达Ikm 。根据水厂的具体情况,确定以MPI方式组地有3台深井泵给水厂区的蓄水池供水。水厂区的成网络,主站PLC为S7-300系列的CPU3121FM,从任务是对水池的水进行消毒处理后,通过加压泵向管站为S7-200系列的CPU222。这样既满足了系统要路恒压供水。选用Siemens公司的S7系列可编程控求,又相对于Profibus网络节省了三分之一的成本,制器(PLC)和上位机组成实时数据采集和监控系统, 这种分布式监控系统具有较高的性能价格比。系统对深水泵进行远程控制,对供水泵采用变频器进行恒中PLC的物理层采用RS - 485接口,网络延伸选用压控制以保证整个水厂的电机设备安全、可靠地运带防雷保护的中继器,使系统的安全运行得到了保行。证。MPI网络的拓扑结构如图1所示。1 多点网络(NWI)监控系统的组成Sie me ns 公司S7系列PLC通常有MP」多点网络与Profibus现场总线网络两种组网方式。Profibus现场总线的应用目前较为普遍,通用性较好,它由Profibus一DP, Profibus一FMS, Profibus一PA组成。Profibus - DP型用于分散外设间的数据传输,传输速率为9.6kbps一12Mbps,主要用于现场控制器与分散1/0之间的通信,可满足交直流调速系统快速响应的时间要求,特别适合于加工自动化领域的应用;Profibus - FMS主要解决车间级通信问题,完成中等传输速度的循环或非循环数据交换任务,适用于纺织、楼宇自动化、可编程控制器、低压开关等;Profibus - PA型采用了OSI模型的物理层和数据链路层,适用于过程自动化的总线类型。
上传时间: 2013-10-09
上传用户:fac1003
1 Communication Protocol (Computer as mAster) The communication protocol describes here allows your computer to access 4096 internal registers (W0000-W4095) and 1024 internal relays (B0000-B1023) in the Workstation.. 1.1 Request Message Format Request message is a command message to be sent from the computer to the Workstation. The data structure of request message is shown below. Note that numbers are always in hexadecimal form and converted into ASCII characters. For example, Workstation unit number 14 will appear in the message as character 0(30h) followed by character E(45h); a BCC of 5Ah will appear in the message as character 5(35h) followed by character A(41h).
上传时间: 2013-10-28
上传用户:cxl274287265
通信IP网作为实时业务传输载体,要求能够对相邻系统之间通信故障进行快速检测,在出现故障时可以快速切换到备份链路,以保证实时数据不间断传输。在研究BFD协议原理的基础上,根据通信IP网运行中出现的问题,应用BFD双向快速检测功能,实现了VRRP的mAster/Backup状态毫秒级切换,并利用BFD会话检测静态路由所在链路的状态,实现一跳和多跳的静态路由自动切换,提高了通信IP网的可靠性。
上传时间: 2013-11-09
上传用户:wivai
Abstract: Communication with 1-Wire slave devices requires a 1-Wire mAster. There are numerous ways to build a 1-Wire mAster (see reference design 4206, "Choosing the Right 1-Wire mAster for Embedded Applications"). Thisdocument describes the DS1WM, a synthesizable 1-Wire mAster that can be implemented in an application-specificintegrated circuit (ASIC) or field-programmable gate array (FPGA).
上传时间: 2014-12-22
上传用户:xanxuan
The #1 Step-by-Step Guide to labviewNow Completely Updated for labview 8! mAster labview 8 with the industry's friendliest, most intuitive tutorial: labview for Everyone, Third Edition. Top labview experts Jeffrey Travis and Jim Kring teach labview the easy way: through carefully explained, step-by-step examples that give you reusable code for your own projects! This brand-new Third Edition has been fully revamped and expanded to reflect new features and techniques introduced in labview 8. You'll find two new chapters, plus dozens of new topics, including Project Explorer, AutoTool, XML, event-driven programming, error handling, regular expressions, polymorphic VIs, timed structures, advanced reporting, and much more. Certified labview Developer (CLD) candidates will find callouts linking to key objectives on NI's newest exam, making this book a more valuable study tool than ever. Not just what to d why to do it! Use labview to build your own virtual workbench mAster labview's foundations: wiring, creating, editing, and debugging VIs; using controls and indicators; working with data structures; and much more Learn the "art" and best practices of effective labview development NEW: Streamline development with labview Express VIs NEW: Acquire data with NI-DAQmx and the labview DAQmx VIs NEW: Discover design patterns for error handling, control structures, state machines, queued messaging, and more NEW: Create sophisticated user interfaces with tree and tab controls, drag and drop, subpanels, and more Whatever your application, whatever your role, whether you've used labview or not, labview for Everyone, Third Edition is the fastest, easiest way to get the results you're after!
上传时间: 2013-10-14
上传用户:shawvi
ZigBee技术是一种应用于短距离范围内,低传输数据速率下的各种电子设备之间的无线通信技术。ZigBee名字来源于蜂群使用的赖以生存和发展的通信方式,蜜蜂通过跳ZigZag形状的舞蹈来通知发现的新食物源的位置、距离和方向等信息,以此作为新一代无线通讯技术的名称。ZigBee过去又称为“HomeRF Lite”、“RF-EasyLink”或“FireFly”无线电技术,目前统一称为ZigBee技术。 2、ZigBee技术的特点 自从马可尼发明无线电以来,无线通信技术一直向着不断提高数据速率和传输距离的方向发展。例如:广域网范围内的第三代移动通信网络(3G)目的在于提供多媒体无线服务,局域网范围内的标准从IEEE802.11的1Mbit/s到IEEE802.11g的54Mbit/s的数据速率。而当前得到广泛研究的ZigBee技术则致力于提供一种廉价的固定、便携或者移动设备使用的极低复杂度、成本和功耗的低速率无线通信技术。这种无线通信技术具有如下特点: 功耗低:工作模式情况下,ZigBee技术传输速率低,传输数据量很小,因此信号的收发时间很短,其次在非工作模式时,ZigBee节点处于休眠模式。设备搜索时延一般为30ms,休眠激活时延为15ms,活动设备信道接入时延为15ms。由于工作时间较短、收发信息功耗较低且采用了休眠模式,使得ZigBee节点非常省电,ZigBee节点的电池工作时间可以长达6个月到2年左右。同时,由于电池时间取决于很多因素,例如:电池种类、容量和应用场合,ZigBee技术在协议上对电池使用也作了优化。对于典型应用,碱性电池可以使用数年,对于某些工作时间和总时间(工作时间+休眠时间)之比小于1%的情况,电池的寿命甚至可以超过10年。 数据传输可靠:ZigBee的媒体接入控制层(MAC层)采用talk-when-ready的碰撞避免机制。在这种完全确认的数据传输机制下,当有数据传送需求时则立刻传送,发送的每个数据包都必须等待接收方的确认信息,并进行确认信息回复,若没有得到确认信息的回复就表示发生了碰撞,将再传一次,采用这种方法可以提高系统信息传输的可靠性。同时为需要固定带宽的通信业务预留了专用时隙,避免了发送数据时的竞争和冲突。同时ZigBee针对时延敏感的应用做了优化,通信时延和休眠状态激活的时延都非常短。 网络容量大:ZigBee低速率、低功耗和短距离传输的特点使它非常适宜支持简单器件。ZigBee定义了两种器件:全功能器件(FFD)和简化功能器件(RFD)。对全功能器件,要求它支持所有的49个基本参数。而对简化功能器件,在最小配置时只要求它支持38个基本参数。一个全功能器件可以与简化功能器件和其他全功能器件通话,可以按3种方式工作,分别为:个域网协调器、协调器或器件。而简化功能器件只能与全功能器件通话,仅用于非常简单的应用。一个ZigBee的网络最多包括有255个ZigBee网路节点,其中一个是主控(mAster)设备,其余则是从属(Slave)设备。若是通过网络协调器(Network Coordinator),整个网络最多可以支持超过64000个ZigBee网路节点,再加上各个Network Coordinator可互相连接,整个ZigBee网络节点的数目将十分可观。 兼容性:ZigBee技术与现有的控制网络标准无缝集成。通过网络协调器(Coordinator)自动建立网络,采用载波侦听/冲突检测(CSMA-CA)方式进行信道接入。为了可靠传递,还提供全握手协议。
标签: zigbee
上传时间: 2013-11-24
上传用户:siguazgb