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

Universal

  • PC机之间串口通信的实现

    PC机之间串口通信的实现一、实验目的 1.熟悉微机接口实验装置的结构和使用方法。 2.掌握通信接口芯片8251和8250的功能和使用方法。 3.学会串行通信程序的编制方法。 二、实验内容与要求 1.基本要求主机接收开关量输入的数据(二进制或十六进制),从键盘上按“传输”键(可自行定义),就将该数据通过8251A传输出去。终端接收后在显示器上显示数据。具体操作说明如下:(1)出现提示信息“start with R in the board!”,通过调整乒乓开关的状态,设置8位数据;(2)在小键盘上按“R”键,系统将此时乒乓开关的状态读入计算机I中,并显示出来,同时显示经串行通讯后,计算机II接收到的数据;(3)完成后,系统提示“do you want to send another data? Y/N”,根据用户需要,在键盘按下“Y”键,则重复步骤(1),进行另一数据的通讯;在键盘按除“Y”键外的任意键,将退出本程序。2.提高要求 能够进行出错处理,例如采用奇偶校验,出错重传或者采用接收方回传和发送方确认来保证发送和接收正确。 三、设计报告要求 1.设计目的和内容 2.总体设计 3.硬件设计:原理图(接线图)及简要说明 4.软件设计框图及程序清单5.设计结果和体会(包括遇到的问题及解决的方法) 四、8251A通用串行输入/输出接口芯片由于CPU与接口之间按并行方式传输,接口与外设之间按串行方式传输,因此,在串行接口中,必须要有“接收移位寄存器”(串→并)和“发送移位寄存器”(并→串)。能够完成上述“串←→并”转换功能的电路,通常称为“通用异步收发器”(UART:Universal Asynchronous Receiver and Transmitter),典型的芯片有:Intel 8250/8251。8251A异步工作方式:如果8251A编程为异步方式,在需要发送字符时,必须首先设置TXEN和CTS#为有效状态,TXEN(Transmitter Enable)是允许发送信号,是命令寄存器中的一位;CTS#(Clear To Send)是由外设发来的对CPU请求发送信号的响应信号。然后就开始发送过程。在发送时,每当CPU送往发送缓冲器一个字符,发送器自动为这个字符加上1个起始位,并且按照编程要求加上奇/偶校验位以及1个、1.5个或者2个停止位。串行数据以起始位开始,接着是最低有效数据位,最高有效位的后面是奇/偶校验位,然后是停止位。按位发送的数据是以发送时钟TXC的下降沿同步的,也就是说这些数据总是在发送时钟TXC的下降沿从8251A发出。数据传输的波特率取决于编程时指定的波特率因子,为发送器时钟频率的1、1/16或1/64。当波特率指定为16时,数据传输的波特率就是发送器时钟频率的1/16。CPU通过数据总线将数据送到8251A的数据输出缓冲寄存器以后,再传输到发送缓冲器,经移位寄存器移位,将并行数据变为串行数据,从TxD端送往外部设备。在8251A接收字符时,命令寄存器的接收允许位RxE(Receiver Enable)必须为1。8251A通过检测RxD引脚上的低电平来准备接收字符,在没有字符传送时RxD端为高电平。8251A不断地检测RxD引脚,从RxD端上检测到低电平以后,便认为是串行数据的起始位,并且启动接收控制电路中的一个计数器来进行计数,计数器的频率等于接收器时钟频率。计数器是作为接收器采样定时,当计数到相当于半个数位的传输时间时再次对RxD端进行采样,如果仍为低电平,则确认该数位是一个有效的起始位。若传输一个字符需要16个时钟,那么就是要在计数8个时钟后采样到低电平。之后,8251A每隔一个数位的传输时间对RxD端采样一次,依次确定串行数据位的值。串行数据位顺序进入接收移位寄存器,通过校验并除去停止位,变成并行数据以后通过内部数据总线送入接收缓冲器,此时发出有效状态的RxRDY信号通知CPU,通知CPU8251A已经收到一个有效的数据。一个字符对应的数据可以是5~8位。如果一个字符对应的数据不到8位,8251A会在移位转换成并行数据的时候,自动把他们的高位补成0。 五、系统总体设计方案根据系统设计的要求,对系统设计的总体方案进行论证分析如下:1.获取8位开关量可使用实验台上的8255A可编程并行接口芯片,因为只要获取8位数据量,只需使用基本输入和8位数据线,所以将8255A工作在方式0,PA0-PA7接实验台上的8位开关量。2.当使用串口进行数据传送时,虽然同步通信速度远远高于异步通信,可达500kbit/s,但由于其需要有一个时钟来实现发送端和接收端之间的同步,硬件电路复杂,通常计算机之间的通信只采用异步通信。3.由于8251A本身没有时钟,需要外部提供,所以本设计中使用实验台上的8253芯片的计数器2来实现。4:显示和键盘输入均使用DOS功能调用来实现。设计思路框图,如下图所示: 六、硬件设计硬件电路主要分为8位开关量数据获取电路,串行通信数据发送电路,串行通信数据接收电路三个部分。1.8位开关量数据获取电路该电路主要是利用8255并行接口读取8位乒乓开关的数据。此次设计在获取8位开关数据量时采用8255令其工作在方式0,A口输入8位数据,CS#接实验台上CS1口,对应端口为280H-283H,PA0-PA7接8个开关。2.串行通信电路串行通信电路本设计中8253主要为8251充当频率发生器,接线如下图所示。

    标签: PC机 串口通信

    上传时间: 2013-12-19

    上传用户:小火车啦啦啦

  • USB Demonstration for DK3200 w

    The μPSD32xx family, from ST, consists of Flash programmable system devices with a 8032 MicrocontrollerCore. Of these, the μPSD3234A and μPSD3254A are notable for having a complete implementationof the USB hardware directly on the chip, complying with the Universal Serial Bus Specification, Revision1.1.This application note describes a demonstration program that has been written for the DK3200 hardwaredemonstration kit (incorporating a μPSD3234A device). It gives the user an idea of how simple it is to workwith the device, using the HID class as a ready-made device driver for the USB connection.IN-APPLICATION-PROGRAMMING (IAP) AND IN-SYSTEM-PROGRAMMING (ISP)Since the μPSD contains two independent Flash memory arrays, the Micro Controller Unit (MCU) can executecode from one memory while erasing and programming the other. Product firmware updates in thefield can be reliably performed over any communication channel (such as CAN, Ethernet, UART, J1850)using this unique architecture. For In-Application-Programming (IAP), all code is updated through theMCU. The main advantage for the user is that the firmware can be updated remotely. The target applicationruns and takes care on its own program code and data memory.IAP is not the only method to program the firmware in μPSD devices. They can also be programmed usingIn-System-Programming (ISP). A IEEE1149.1-compliant JTAG interface is included on the μPSD. Withthis, the entire device can be rapidly programmed while soldered to the circuit board (Main Flash memory,Secondary Boot Flash memory, the PLD, and all configuration areas). This requires no MCU participation.The MCU is completely bypassed. So, the μPSD can be programmed or reprogrammed any time, anywhere, even when completely uncommitted.Both methods take place with the device in its normal hardware environment, soldered to a printed circuitboard. The IAP method cannot be used without previous use of ISP, because IAP utilizes a small amountof resident code to receive the service commands, and to perform the desired operations.

    标签: Demonstration 3200 USB for

    上传时间: 2014-02-27

    上传用户:zhangzhenyu

  • 对带有uPSD3234A的DK3200的USB演示

    The μPSD32xx family, from ST, consists of Flash programmable system devices with a 8032 Microcontroller Core. Of these, the μPSD3234A and μPSD3254A are notable for having a complete implementation of the USB hardware directly on the chip, complying with the Universal Serial Bus Specification, Revision 1.1.This application note describes a demonstration program that has been written for the DK3200 hardware demonstration kit (incorporating a μPSD3234A device). It gives the user an idea of how simple it is to work with the device, using the HID class as a ready-made device driver for the USB connection.

    标签: 3234A uPSD 3234 3200

    上传时间: 2014-04-03

    上传用户:lizhizheng88

  • 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

  • USB接口的定义及识别

    USB 是英文Universal Serial Bus 的缩写,中文含义是“通用串行总线”。它是一种应用在PC 领域的新型接口技术。早在1995年,就已经有PC 机带有USB 接口了,但由于缺乏软件及硬件设备的支持,这些PC 机的USB 接口都闲置未用。

    标签: USB 接口 定义 识别

    上传时间: 2013-10-20

    上传用户:LIKE

  • 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

  • superpro 3000u 驱动及编程器软件下载

    superpro 3000u 驱动 PIC16C65B@QFP44 [SA245] PIC16C65B:          Part number QFP44:              Package in QFP44 SA245:              Adapter purchase number AM29DL320GT@FBGA48 [SA642+B026] AM29DL320GT:        Part number FBGA48:             Package in FBGA48 SA642:              Adapter purchase number (Top board with socket) B026:               Adapter purchase number (Bottom board, exchangable for different parts) 87C196CA@PLCC68(Universal adapter) [PEP+S414T] 87C196CA:           Part number PLCC68:             Package in PLCC68 Universal adapter:  this adapter is valid for all parts in this package PEP:                The PEP (Pin-driver Expansion Pack necessary to work with the adapter S414T) S414T:              Adapter purchase number (Universal for all parts in this package) S71PL127J80B@FBGA64(special adapter) [(SA642A-B079A-Y096AF001)] S71PL127J80B:            Part number FBGA64:                  Package in FBGA64 special adapter:         this adapter is valid for this

    标签: superpro 3000u 驱动 编程器软件

    上传时间: 2013-10-23

    上传用户:Avoid98

  • 西门子建筑电器-电气安装技术部发行的各类产品样本

    西门子建筑电器-电气安装技术部发行的各类产品样本:小型断路器、剩余电流保护断路器和模数化产品(中/ 英文)Miniature Circuit-Breakers, Residual Current Operated Circuit-Breakers and Modular Devices (Chinese/English)低压熔断器系统(中/ 英文)Fuse System (Chinese/English)雷击,过电压-不再是问题(中文)Thunderstorms - no problem (Chinese)西门子建筑电器目录(中文)Electrical Installation Technology Catalog (Chinese)终端配电保护产品(中文)5 IN 1 (Chinese)SIKUS 和 STAB Universal 目录(中文)SIKUS and STAB Universal Catalogue (Chinese)SIKUS HC 目录(中文)SIKUS HC Catalogue (Chinese)SentronTM 母线槽 (中文)SentronTM Busway System (Chinese)SentronTM 母线槽系统快速选型 (准备中) (中文)SentronTM Busway System quick selection (in preparing) (Chinese)建筑低压配电一体化解决方案-住宅小区应用(中文)Building LV PD Solution (Chinese)西门子 DELTA vista“远景”系列开关和插座价目表(中文)Delta vista Switch and Socket Pricelist (Chinese)instabus EIB 面向未来的楼宇智能控制系统(中文)instabus EIB (Chinese)instabus EIB 面向未来的楼宇智能控制系统技术手册 (准备中) (中文)instabus EIB technical handbook (in preparing) (Chinese)西门子电气安装技术业绩卓越(中/ 英文)ET Reference Manual (Chinese/English)

    标签: 西门子 电器 样本 电气安装

    上传时间: 2013-11-23

    上传用户:瓦力瓦力hong

  • superpro 3000u 驱动及编程器软件下载

    superpro 3000u 驱动 PIC16C65B@QFP44 [SA245] PIC16C65B:          Part number QFP44:              Package in QFP44 SA245:              Adapter purchase number AM29DL320GT@FBGA48 [SA642+B026] AM29DL320GT:        Part number FBGA48:             Package in FBGA48 SA642:              Adapter purchase number (Top board with socket) B026:               Adapter purchase number (Bottom board, exchangable for different parts) 87C196CA@PLCC68(Universal adapter) [PEP+S414T] 87C196CA:           Part number PLCC68:             Package in PLCC68 Universal adapter:  this adapter is valid for all parts in this package PEP:                The PEP (Pin-driver Expansion Pack necessary to work with the adapter S414T) S414T:              Adapter purchase number (Universal for all parts in this package) S71PL127J80B@FBGA64(special adapter) [(SA642A-B079A-Y096AF001)] S71PL127J80B:            Part number FBGA64:                  Package in FBGA64 special adapter:         this adapter is valid for this

    标签: superpro 3000u 驱动 编程器软件

    上传时间: 2014-03-27

    上传用户:ippler8

  • SQLDirect Component Library is a light-weight Borland Database Engine replacement for Borland Delphi

    SQLDirect Component Library is a light-weight Borland Database Engine replacement for Borland Delphi v.4 - 9(2005) and C++Builder v.4 - 6. It uses the native application programming interfaces to access to the following SQL-servers: * Centura (formerly, Gupta) SQLBase Server * IBM DB2 Universal Database * Informix Server * Interbase/Firebird Server * Microsoft SQL Server * MySQL Server * Oracle Database Server * PostgreSQL Server * Sybase Adaptive Server Enterprise and Adaptive Server Anywhere * ODBC datasources * OLEDB datasources

    标签: Borland light-weight replacement SQLDirect

    上传时间: 2013-12-10

    上传用户:cuibaigao