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

test-Driven

  • Nios 的用户定义接口逻辑实例

    Nios 的用户定义接口逻辑实例 有许多人问我使用 Nios 的用户定义接口逻辑怎么用,想了几天决定设计一个实例来说明。该例为一个使用 user to interface logic 设计的 PWM 实例,其中包括三个文件:    plus32.v 是一个为 32bit nios 设计的 pwm 实例。    plus16.v 是一个为 16bit nios 设计的 pwm 实例。    test.s   是一个使用中断调用 pwm 的汇编语言测试程序。以上模块和程序均调试通过,并可稳定工作。这里让大家参考是使大家通过该例来真正理解 user to interface logic 设计方法,和nios 中通过汇编调用中断的方法,所以超值喔。另外热烈欢迎大家的指导。 注:在设计 Nios 时,将你调用的 user to interface logic 插件重命名为 plus_0,这样我的 test.s 可不作任何改动,你就可用示波器通过 nios 的 plus 管脚观察到一个要求的输出。

    标签: Nios 用户 定义 接口

    上传时间: 2013-11-15

    上传用户:cc1915

  • PCA9544A 4channel I2C multiple

    The PCA9544A provides 4 interrupt inputs, one for each channeland one open drain interrupt output. When an interrupt is generated byany device, it will be detected by the PCA9544A and the interruptoutput will be driven LOW. The channel need not be active fordetection of the interrupt. A bit is also set in the control byte.Bits 4 – 7 of the control byte correspond to channels 0 – 3 of thePCA9544A, respectively. Therefore, if an interrupt is generated byany device connected to channel 2, the state of the interrupt inputs isloaded into the control register when a read is accomplished.Likewise, an interrupt on any device connected to channel 0 wouldcause bit 4 of the control register to be set on the read. The mastercan then address the PCA9544A and read the contents of thecontrol byte to determine which channel contains the devicegenerating the interrupt. The master can then reconfigure thePCA9544A to select this channel, and locate the device generatingthe interrupt and clear it. The interrupt clears when the deviceoriginating the interrupt clears.

    标签: 4channel multiple 9544A 9544

    上传时间: 2014-12-28

    上传用户:潜水的三贡

  • Designing Boards with Atmel AT

    Designing Boards with Atmel AT89C51, AT89C52, AT89C1051, and AT89C2051 for Writing Flash at In-Circuit Test:Recent improvements in chips andtesters have made it possible for thetester to begin taking over the role traditionallyassigned to the PROM programmer.Instead of having a PROM programmerwrite nonvolatile memoriesbefore assembling the board, the in-circuittester writes them during in-circuittesting operations. Many Teradyne Z18-series testers are now in use loadingcode into nonvolatile memories, microcontrollersand in-circuit programmable logic devices. The purpose of this note is to explain how the Z18 approaches the writing task for Atmel AT89C series IC’s,so that designers of boards using these chips can get the best results.

    标签: Designing Boards Atmel with

    上传时间: 2013-11-20

    上传用户:lijianyu172

  • SPCE061A指令系统

    SPCE061A采用的内核           SPCE061A采用的内核(CPU)为μ‘nSP。          μ‘nSP(读做micro-n-S-P)是凌阳科技推出的16位微处理器,它的突出特点是较高的处理速度,这就使其有能力进行复杂的数字信号处理(DSP,Digital Signal Processing)。 μ‘nSP内核由凌阳自主开发,因而也具备它自己的指令系统。 指令系统.61 3.1 指令系统的概述及符号约定.61 3.2 数据传送指令62 3.3 算术运算..66 3.3.1 加法运算..67 3.3.2 减法运算..68 3.3.3 带进位的加减运算.70 3.3.4 取补运算..70 3.3.5 SPCE061A的乘法指令.71 3.3.6 SPCE061A的n项内积运算指令.71 3.3.7 比较运算(影响标志位N,Z,S,C)..73 3.4 SPCE061A的逻辑运算.74 3.4.1 逻辑与..74 3.4.2 逻辑或..75 3.4.3 逻辑异或..76 3.4.4 测试(TEST).78 3.4.5 SPCE061A的移位操作.80 3.5 SPCE061A的控制转移类指令..83 3.6 伪指令86 3.6.1 伪指令的语法格式及特点..87 3.6.2 伪指令符号约定..87 3.6.3 标准伪指令.87 3.6.4 宏定义与调用98 3.6.5 段的定义与调用101 3.6.6 结构的定义与调用..102 3.6.7 过程的定义与调用..106 3.6.8 伪指令的应用举例..106

    标签: SPCE 061A 061 指令系统

    上传时间: 2013-10-31

    上传用户:xuanchangri

  • 基于单片机控制的二氧化碳浓度测试计

    基于单片机控制的二氧化碳浓度测试计:基于CDM4161二氧化碳气体浓度测试模块以及ATtiny26单片机,提出了一种二氧化碳浓度测试计的设计方案。该方案具有硬件电路简单、成本低、可靠性高、测量准确等优点,具有较高的实用价值。 Abstract: Abstract:A desigh scheme of CO2 concentration meter based on CDM4161carbon dioxide concentration test module and ATtiny26micro-controller is presented in this paper.The design scheme features simple hardware circuit,low-cost,high reli-ability,accurate measurement and it has a high practical value.

    标签: 单片机控制 二氧化碳 测试

    上传时间: 2013-11-14

    上传用户:zjwangyichao

  • Emulating a synchronous serial

    The C500 microcontroller family usually provides only one on-chip synchronous serialchannel (SSC). If a second SSC is required, an emulation of the missing interface mayhelp to avoid an external hardware solution with additional electronic components.The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using optimized SW routines with a performance up to 25KBaud in Slave Mode with half duplex transmission and an overhead less than 60% atSAB C513 with 12 MHz. Due to the implementation in C this performance is not the limitof the chip. A pure implementation in assembler will result in a strong reduction of theCPU load and therefore increase the maximum speed of the interface. In addition,microcontrollers like the SAB C505 will speed up the interface by a factor of two becauseof an optimized architecture compared with the SAB C513.Moreover, this solution lays stress on using as few on-chip hardware resources aspossible. A more excessive consumption of those resources will result in a highermaximum speed of the emulated interface.Due to the restricted performance of an 8 bit microcontroller a pin compatible solution isprovided only; the internal register based programming interface is replaced by a set ofsubroutine calls.The attached source files also contain a test shell, which demonstrates how to exchangeinformation between an on-chip HW-SSC and the emulated SW-SSC via 5 external wiresin different operation modes. It is based on the SAB C513 (Siemens 8 bit microcontroller).A table with load measurements is presented to give an indication for the fraction of CPUperformance required by software for emulating the SSC.

    标签: synchronous Emulating serial

    上传时间: 2014-01-31

    上传用户:z1191176801

  • 使用软件程序仿真C500微控制器系列SSC(同步串行通道)功

    The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using SW routines implemented in C. The code is focused onthe SAB C513, but will fit to all C500 derivatives.Beyond the low level software drivers a test shell is delivered. This shell allows a quicktest of the software drivers by an emulator or a starter kit demo board.

    标签: C500 SSC 软件 程序

    上传时间: 2013-11-24

    上传用户:363186

  • P90CL301 I2C driver routines

    This application note shows how to write an Inter Integrated Circuit bus driver (I²C) for the Philips P90CL301micro-controller.It is not only an example of writing a driver, but it also includes a set of application interface software routines toquickly implement a complete I²C multi-master system application.For specific applications the user will have to make minimal changes in the driver program. Using the drivermeans linking modules to your application software and including a header-file into the application sourceprograms. A small example program of how to use the driver is listed.The driver supports i.a. polled or interrupt driven message handling, slave message transfers and multi-mastersystem applications. Furthermore, it is made suitable for use in conjunction with real time operating systems, likepSOS+.

    标签: routines driver P90 301

    上传时间: 2013-11-23

    上传用户:weixiao99

  • XA-S3 I2C driver software

    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.

    标签: software driver XA-S I2C

    上传时间: 2013-11-02

    上传用户:zw380105939

  • PCB可测性设计布线规则之建议―从源头改善可测率

    P C B 可测性设计布线规则之建议― ― 从源头改善可测率PCB 设计除需考虑功能性与安全性等要求外,亦需考虑可生产与可测试。这里提供可测性设计建议供设计布线工程师参考。1. 每一个铜箔电路支点,至少需要一个可测试点。如无对应的测试点,将可导致与之相关的开短路不可检出,并且与之相连的零件会因无测试点而不可测。2. 双面治具会增加制作成本,且上针板的测试针定位准确度差。所以Layout 时应通过Via Hole 尽可能将测试点放置于同一面。这样就只要做单面治具即可。3. 测试选点优先级:A.测垫(Test Pad) B.通孔(Through Hole) C.零件脚(Component Lead) D.贯穿孔(Via Hole)(未Mask)。而对于零件脚,应以AI 零件脚及其它较细较短脚为优先,较粗或较长的引脚接触性误判多。4. PCB 厚度至少要62mil(1.35mm),厚度少于此值之PCB 容易板弯变形,影响测点精准度,制作治具需特殊处理。5. 避免将测点置于SMT 之PAD 上,因SMT 零件会偏移,故不可靠,且易伤及零件。6. 避免使用过长零件脚(>170mil(4.3mm))或过大的孔(直径>1.5mm)为测点。7. 对于电池(Battery)最好预留Jumper,在ICT 测试时能有效隔离电池的影响。8. 定位孔要求:(a) 定位孔(Tooling Hole)直径最好为125mil(3.175mm)及其以上。(b) 每一片PCB 须有2 个定位孔和一个防呆孔(也可说成定位孔,用以预防将PCB反放而导致机器压破板),且孔内不能沾锡。(c) 选择以对角线,距离最远之2 孔为定位孔。(d) 各定位孔(含防呆孔)不应设计成中心对称,即PCB 旋转180 度角后仍能放入PCB,这样,作业员易于反放而致机器压破板)9. 测试点要求:(e) 两测点或测点与预钻孔之中心距不得小于50mil(1.27mm),否则有一测点无法植针。以大于100mil(2.54mm)为佳,其次是75mil(1.905mm)。(f) 测点应离其附近零件(位于同一面者)至少100mil,如为高于3mm 零件,则应至少间距120mil,方便治具制作。(g) 测点应平均分布于PCB 表面,避免局部密度过高,影响治具测试时测试针压力平衡。(h) 测点直径最好能不小于35mil(0.9mm),如在上针板,则最好不小于40mil(1.00mm),圆形、正方形均可。小于0.030”(30mil)之测点需额外加工,以导正目标。(i) 测点的Pad 及Via 不应有防焊漆(Solder Mask)。(j) 测点应离板边或折边至少100mil。(k) 锡点被实践证实是最好的测试探针接触点。因为锡的氧化物较轻且容易刺穿。以锡点作测试点,因接触不良导致误判的机会极少且可延长探针使用寿命。锡点尤其以PCB 光板制作时的喷锡点最佳。PCB 裸铜测点,高温后已氧化,且其硬度高,所以探针接触电阻变化而致测试误判率很高。如果裸铜测点在SMT 时加上锡膏再经回流焊固化为锡点,虽可大幅改善,但因助焊剂或吃锡不完全的缘故,仍会出现较多的接触误判。

    标签: PCB 可测性设计 布线规则

    上传时间: 2014-01-14

    上传用户:cylnpy