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

serial-port

  • XAPP713 -Virtex-4 RocketIO误码率测试器

      The data plane of the reference design consists of a configurable multi-channel XBERT modulethat generates and checks high-speed serial data transmitted and received by the MGTs. Eachchannel in the XBERT module consists of two MGTs (MGTA and MGTB), which physicallyoccupy one MGT tile in the Virtex-4 FPGA. Each MGT has its own pattern checker, but bothMGTs in a channel share the same pattern generator. Each channel can load a differentpattern. The MGT serial rate depends on the reference clock frequency and the internal PMAdivider settings. The reference design can be scaled anywhere from one channel (two MGTs)to twelve channels (twenty-four MGTs).

    标签: RocketIO Virtex XAPP 713

    上传时间: 2013-12-25

    上传用户:jkhjkh1982

  • 全功能SPI接口的设计与实现

    SPI(Serial Peripheral Interface,串行外围接口)是Motorola公司提出的外围接口协议,它采用一个串行、同步、全双工的通信方式,解决了微处理器和外设之间的串行通信问题,并且可以和多个外设直接通信,具有配置灵活,结构简单等优点。根据全功能SPI总线的特点,设计的SPI接口可以最大发送和接收16位数据;在主模式和从模式下SPI模块的时钟频率最大可以达到系统时钟的1/4,并且在主模式下可以提供具有四种不同相位和极性的时钟供从模块选择;可以同时进行发送和接收操作,拥有中断标志位和溢出中断标志位。

    标签: SPI 接口的设计

    上传时间: 2013-11-11

    上传用户:himbly

  • Arduino应用_Arduino连接超声波传感器测距

    超声波传感器适用于对大幅的平面进行静止测距。普通的超声波传感器测距范围大概是 2cm~450cm,分辨率3mm(淘宝卖家说的,笔者测试环境没那么好,个人实测比较稳定的 距离10cm~2m 左右,超过此距离就经常有偶然不准确的情况发生了,当然不排除笔者技术 问题。) 测试对象是淘宝上面最便宜的SRF-04 超声波传感器,有四个脚:5v 电源脚(Vcc),触发控制端(Trig),接收端(Echo),地端(GND) 附:SRF 系列超声波传感器参数比较   模块工作原理: 采用IO 触发测距,给至少10us 的高电平信号; 模块自动发送8个40KHz 的方波,自动检测是否有信号返回; 有信号返回,通过IO 输出一高电平,高电平持续的时间就是超声波从发射到返回的时间.测试距离=(高电平时间*声速(340m/s))/2; 电路连接方法   Arduino 程序例子: constintTrigPin = 2; constintEchoPin = 3; floatcm; voidsetup() { Serial.begin(9600); pinMode(TrigPin, OUTPUT); pinMode(EchoPin, INPUT); } voidloop() { digitalWrite(TrigPin, LOW); //低高低电平发一个短时间脉冲去TrigPin delayMicroseconds(2); digitalWrite(TrigPin, HIGH); delayMicroseconds(10); digitalWrite(TrigPin, LOW); cm = pulseIn(EchoPin, HIGH) / 58.0; //将回波时间换算成cm cm = (int(cm * 100.0)) / 100.0; //保留两位小数 Serial.print(cm); Serial.print("cm"); Serial.println(); delay(1000); }

    标签: Arduino 连接 超声波传感器

    上传时间: 2013-11-01

    上传用户:xiaoyuer

  • Arduino学习笔记3_连接HMC5883L三轴电子罗盘传感器

    用途:测量地磁方向,测量物体静止时候的方向,测量传感器周围磁力线的方向。注意,测量地磁时候容易受到周围磁场影响,主芯片HMC5883 三轴磁阻传感器特点(抄自网上): 1,数字量输出:I2C 数字量输出接口,设计使用非常方便。 2,尺寸小: 3x3x0.9mm LCC 封装,适合大规模量产使用。 3,精度高:1-2 度,内置12 位A/D,OFFSET, SET/RESET 电路,不会出现磁饱和现象,不会有累加误差。 4,支持自动校准程序,简化使用步骤,终端产品使用非常方便。 5,内置自测试电路,方便量产测试,无需增加额外昂贵的测试设备。 6,功耗低:供电电压1.8V, 功耗睡眠模式-2.5uA 测量模式-0.6mA   连接方法: 只要连接VCC,GND,SDA,SDL 四条线。 Arduino GND -> HMC5883L GND Arduino 3.3V -> HMC5883L VCC Arduino A4 (SDA) -> HMC5883L SDA Arduino A5 (SCL) -> HMC5883L SCL (注意,接线是A4,A5,不是D4,D5) 源程序: #include <Wire.h> #include <HMC5883L.h> HMC5883Lcompass; voidsetup() { Serial.begin(9600); Wire.begin(); compass = HMC5883L(); compass.SetScale(1.3); compass.SetMeasurementMode(Measurement_Continuous); } voidloop() { MagnetometerRaw raw = compass.ReadRawAxis(); MagnetometerScaled scaled = compass.ReadScaledAxis(); float xHeading = atan2(scaled.YAxis, scaled.XAxis); float yHeading = atan2(scaled.ZAxis, scaled.XAxis); float zHeading = atan2(scaled.ZAxis, scaled.YAxis); if(xHeading < 0) xHeading += 2*PI; if(xHeading > 2*PI) xHeading -= 2*PI; if(yHeading < 0) yHeading += 2*PI; if(yHeading > 2*PI) yHeading -= 2*PI; if(zHeading < 0) zHeading += 2*PI; if(zHeading > 2*PI) zHeading -= 2*PI; float xDegrees = xHeading * 180/M_PI; float yDegrees = yHeading * 180/M_PI; float zDegrees = zHeading * 180/M_PI; Serial.print(xDegrees); Serial.print(","); Serial.print(yDegrees); Serial.print(","); Serial.print(zDegrees); Serial.println(";"); delay(100); }

    标签: Arduino 5883L 5883 HMC

    上传时间: 2014-03-20

    上传用户:tianyi223

  • OpenVPN is a robust and highly flexible tunneling application that uses all of the encryption, authe

    OpenVPN is a robust and highly flexible tunneling application that uses all of the encryption, authentication, and certification features of the OpenSSL library to securely tunnel IP networks over a single TCP/UDP port.

    标签: application encryption tunneling flexible

    上传时间: 2014-01-13

    上传用户:hzy5825468

  • TLC1543 AD采样子程序

    TLC1543 AD采样子程序,提供了PORT作为采样通道号的形参。

    标签: 1543 TLC 采样 程序

    上传时间: 2014-01-23

    上传用户:410805624

  • UnZip is a small zipfile extract utility. It is written to be assmall portable as possible and is in

    UnZip is a small zipfile extract utility. It is written to be assmall portable as possible and is intended to be starting point for im-plementation of .ZIP files in non-IBM environments.Source code is provided in C and Turbo Pascal. If you port this programto a non-IBM system, I would appreciate a copy of the ported source andexe files.

    标签: is portable possible extract

    上传时间: 2014-01-20

    上传用户:维子哥哥

  • 模仿cisco路由器

    模仿cisco路由器,产生netflow,送到指定的收集器上,以相对低廉的软件代价来实现昂贵的路由器的功能 fprobe -i eth0 -l 3 host:port

    标签: cisco 路由器

    上传时间: 2014-08-22

    上传用户:小眼睛LSL

  • 一个UNIX/LINUX下的基于内容的过滤服务器源代码

    一个UNIX/LINUX下的基于内容的过滤服务器源代码,可以设置关键词、URL、IP、PORT等多种方式进行网站过滤。

    标签: LINUX UNIX 服务器 源代码

    上传时间: 2014-06-21

    上传用户:pinksun9

  • Many many developers all over the net respect NASM for what i s - a widespread (thus netwide), port

    Many many developers all over the net respect NASM for what i s - a widespread (thus netwide), portable (thus netwide!), very flexible and mature assembler tool with support for many output formats (thus netwide!!). Now we have good news for you: NASM is licensed under LGPL. This means its development is open to even wider society of programmers wishing to improve their lovely assembler. The NASM project is now situated at SourceForge.net, the most famous Open Source development center on The Net. Visit our development page at http://nasm.2y.net/ and our SF project at http://sf.net/projects/nasm/

    标签: developers widespread netwide respect

    上传时间: 2014-01-20

    上传用户:2404