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

interface-f

  • XA-S3的IIC接口的驱动器软件程序(C语言)

    The XA-S3 is a member of Philips Semiconductors’ XA (eXtended Architecture) family of high performance 16-bit single-chip Microcontrollers. The XA-S3 combines many powerful peripherals on one chip. Therefore, it is suited for general multipurpose high performance embedded control functions.One of the on-chip peripherals is the I2C bus interface. This report describes worked-out driver software (written in C) to program / use the I2C interface of the XA-S3. The driver software, together with a demo program and interface software routines offer the user a quick start in writing a complete I2C - XAS3 system application.

    标签: XA-S IIC C语言 接口

    上传时间: 2013-11-10

    上传用户:liaofamous

  • Reading and Writing iButtons v

    Abstract: This application note explains the hardware of different types of 1-Wire® interfaces and software examples adapted to this hardware with a focus on serial ports. Depending on the types of iButtons required for a project and the type of computer to be used, the most economical interface is easily found. The hardware examples shown are basically two different types: 5V general interface and 12V RS-232 interface. Within the 5V group a common printed circuit board could be used for all circuits described. The variations can be achieved by different populations of components. The same principal is used for the 12V RS-232 interface. The population determines if it is a Read all or a Read/Write all type of interface. There are other possible circuit implementations to create a 1-Wire interface. The circuits described in this application note cover many different configurations. For a custom application, one of the described options can be adapted to meet individual needs.

    标签: iButtons Reading Writing and

    上传时间: 2013-10-29

    上传用户:long14578

  • I2C slave routines for the 87L

    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.

    标签: routines slave I2C 87L

    上传时间: 2013-11-19

    上传用户:shirleyYim

  • Using the 87LPC76X microcontro

    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

  • CAN与RS232转换节点的设计与实现

    CAN与RS232转换节点的设计与实现 介绍将CAN总线接口与RS232总线接口相互转换的设计方法和2种总线电平转换关系,实现CAN总线与各模块的接口设计,制定了相应的软硬件设计方案,并给出软件设计流程图以及部分硬件设计原理图。为CAN总线与RS232总线互联提供了一种方法,对CAN总线与RS232总线接口设备的互联和广泛应用的实现具有重要意义。关键词:CAN总线;RS-232总线;串行通信Design and Realization of CAN and RS232 Transformation NodeZHOU Wei, CHENG Xiao-hong(Information Institute, Wuhan University of Technology, Wuhan 430070)【Abstract】This paper introduces one design method of the CAN bus interface and the RS232 bus interface interconversion, emphasizes two kindof bus level transformation relations, realizes the CAN bus and various modules connection design, formulates the design proposal of correspondingsoftware and hardware, and gives the flow chart of software design as well as the partial schematic diagram of hardware design. It providesonemethod for the CAN bus and the RS232 bus interconnection, has the vital significance to widespread application realization of the CAN busand theRS232 bus interface equipment interconnection.【Key words】CAN bus; RS-232 bus; serial communication

    标签: CAN 232 RS 转换

    上传时间: 2013-11-04

    上传用户:leesuper

  • 单片机外围线路设计

    当拿到一张CASE单时,首先得确定的是能用什么母体才能实现此功能,然后才能展开对外围硬件电路的设计,因此首先得了解每个母体的基本功能及特点,下面大至的介绍一下本公司常用的IC:单芯片解决方案• SN8P1900 系列–  高精度 16-Bit  模数转换器–  可编程运算放大器 (PGIA)•  信号放大低漂移: 2V•  放大倍数可编程: 1/16/64/128  倍–  升压- 稳压调节器 (Charge-Pump Regulator)•  电源输入: 2.4V ~ 5V•  稳压输出: e.g. 3.8V at SN8P1909–  内置液晶驱动电路 (LCD Driver)–  单芯片解决方案 •  耳温枪  SN8P1909 LQFP 80 Pins• 5000 解析度量测器 SN8P1908 LQFP 64 Pins•  体重计  SN8P1907 SSOP 48 Pins单芯片解决方案• SN8P1820 系列–  精确的12-Bit  模数转换器–  可编程运算放大器 (PGIA)• Gain Stage One: Low Offset 5V, Gain: 16/32/64/128• Gain Stage One: Low Offset 2mV, Gain: 1.3 ~ 2.5–  升压- 稳压调节器•  电源输入: 2.4V ~ 5V•  稳压输出: e.g. 3.8V at SN8P1829–  内置可编程运算放大电路–  内置液晶驱动电路 –  单芯片解决方案 •  电子医疗器 SN8P1829 LQFP 80 Pins 高速/低功耗/高可靠性微控制器• 最新SN8P2000 系列– SN8P2500/2600/2700 系列– 高度抗交流杂讯能力• 标准瞬间电压脉冲群测试 (EFT): IEC 1000-4-4• 杂讯直接灌入芯片电源输入端• 只需添加1颗 2.2F/50V 旁路电容• 测试指标稳超 4000V (欧规)– 高可靠性复位电路保证系统正常运行• 支持外部复位和内部上电复位• 内置1.8V 低电压侦测可靠复位电路• 内置看门狗计时器保证程序跳飞可靠复位– 高抗静电/栓锁效应能力– 芯片工作温度有所提高: -200C ~ 700C     工规芯片温度: -400C ~ 850C 高速/低功耗/高可靠性微控制器• 最新 SN8P2000 系列– SN8P2500/2600/2700 系列– 1T  精简指令级结构• 1T:  一个外部振荡周期执行一条指令•  工作速度可达16 MIPS / 16 MHz Crystal–  工作消耗电流 < 2mA at 1-MIPS/5V–  睡眠模式下消耗电流 < 1A / 5V额外功能• 高速脉宽调制输出 (PWM)– 8-Bit PWM up to 23 KHz at 12 MHz System Clock– 6-Bit PWM up to 93 KHz  at 12 MHz System Clock– 4-Bit PWM up to 375 KHz  at 12 MHz System Clock• 内置高速16 MHz RC振荡器 (SN8P2501A)• 电压变化唤醒功能• 可编程控制沿触发/中断功能– 上升沿 / 下降沿 / 双沿触发• 串行编程接口

    标签: 单片机 线路设计

    上传时间: 2013-10-21

    上传用户:jiahao131

  • 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

  • 实验指导书 (TPC-H实验台C语言版)

    《现代微机原理与接口技术》实验指导书 TPC-H实验台C语言版 1.实验台结构1)I / O 地址译码电路如上图1所示地址空间280H~2BFH共分8条译码输出线:Y0~Y7 其地址分别是280H~287H、288H~28FH、290H~297H、298H~29FH、2A0H~2A7H、2A8H~2AFH、2B0H~2B7H、2B8H~2BFH,8根译码输出线在实验台I/O地址处分别由自锁紧插孔引出供实验选用(见图2)。 2) 总线插孔采用“自锁紧”插座在标有“总线”区引出数据总线D7~D0;地址总线A9~A0,读、写信号IOR、IOW;中断请求信号IRQ ;DMA请求信号DRQ1;DMA响应信号DACK1 及AEN信号,供学生搭试各种接口实验电路使用。3) 时钟电路如图-3所示可以输出1MHZ 2MHZ两种信号供A/D转换器定时器/计数器串行接口实验使用。图34) 逻辑电平开关电路如图-4所示实验台右下方设有8个开关K7~K0,开关拨到“1”位置时开关断开,输出高电平。向下打到“0”位置时开关接通,输出低电平。电路中串接了保护电阻使接口电路不直接同+5V 、GND相连,可有效地防止因误操作误编程损坏集成电路现象。图 4 图 55) L E D 显示电路如图-5所示实验台上设有8个发光二极管及相关驱动电路(输入端L7~L0),当输入信号为“1” 时发光,为“0”时灭6) 七段数码管显示电路如图-6所示实验台上设有两个共阴极七段数码管及驱动电路,段码为同相驱动器,位码为反相驱动器。从段码与位码的驱动器输入端(段码输入端a、b、c、d、e、f、g、dp,位码输入端s1、 s2)输入不同的代码即可显示不同数字或符号。

    标签: TPC-H 实验指导书 C语言 实验台

    上传时间: 2013-11-22

    上传用户:sssnaxie

  • 自制微型51/AVR通用编程器

    微型51/AVR 编程器套件装配说明书 请您在动手装配这个编程器之前,务必先看完本说明书,避免走弯路。 1.收到套件后请对照元器件列表检查一下,元件、配件是否齐全? Used  Part Type        Designator ==== ================ ========== 1    1k               R6         1    1uf 50V          C11        5    2k2              R2 R3 R4 R5 R11     1    10K*8            RN1        2    11.0592MHZ       Q1 Q2      1    12V,0.5W         D2         2    15k              R7 R8      2    21k              R9 R10     4    33p              C6 C7 C8 C9         1    47uf 25V         C10        1    74HC164          IC6        2    78L05            IC4 IC5    1    100uf 25V        C12        1    220R             R1         1    AT89C51          IC2        1    B40C800(W02)     D1         2    BS170            T1 T2      1    BS250            T3         1    DB9/F            J2         1    J1X2             J1         1    LED GN5          D3         1    LM317L           IC1        1    TLC2272          IC7        1    ZIF40            IC3        5    1uf              C1 C2 C3 C4 C5 另外,套件配有1.5米串行电缆一根和配套的PCB一块,不含电源。编程器使用的15V交流电源或12V直流电源需要自己配套。2.装配要点:先焊接阻容元件,3个集成电路插座(IC2,IC7,IC6)其次是晶振, 全桥,稳压IC 等,然后焊接J2,最后焊接T1,T2,T3三只场效应管。焊接场效应管时务必按照以下方法:拔去电烙铁的电源,使用电烙铁余温去焊接三只场效应管,否则静电很容易损坏管子。这是装配成功的关键。这三只管子有问题,最典型的现象是不能联机。由于电源插座封装比较特殊,国内无法配套上,已改用电源线接线柱,可直接焊接在PCB板焊盘上,如下图1所示(在下图中两个红色圆圈内指示的焊盘),然后在连接到套件中配套的电源插座上。最近有朋友反映用15V交流比较麻烦,还要另外配变压器。如果要使用12V的直流电,无需将全桥焊上,将两个接线柱分别焊接在全桥的正负输出位置的焊盘上即可,如下图2所示,蓝色圆圈内指示的焊盘,连接电源的时候要注意正负极,不要接错了。方形焊盘是正极。40脚ZIF插座焊接前,应该将BR1飞线焊接好。注意:由于焊盘比较小,注意焊接温度,不要高温长时间反复焊接,会导致焊盘脱落。

    标签: AVR 51 编程器

    上传时间: 2013-12-31

    上传用户:caiguoqing

  • 微型计算机课程设计论文—通用微机发声程序的汇编设计

    微型计算机课程设计论文—通用微机发声程序的汇编设计 本文讲述了在微型计算机中利用可编程时间间隔定时器的通用发声程序设计,重点讲述了程序的发声原理,节拍的产生,按节拍改变的动画程序原理,并以设计一个简单的乐曲评分程序为引子,分析程序设计的细节。关键字:微机 8253 通用发声程序 动画技术 直接写屏 1. 可编程时间间隔定时器8253在通用个人计算机中,有一个可编程时间间隔定时器8253,它能够根据程序提供的计数值和工作方式,产生各种形状和各种频率的计数/定时脉冲,提供给系统各个部件使用。本设计是利用计算机控制发声的原理,编写演奏乐曲的程序。    在8253/54定时器内部有3个独立工作的计数器:计数器0,计数器1和计数器2,每个计数器都分配有一个断口地址,分别为40H,41H和42H.8253/54内部还有一个公用的控制寄存器,端地址为43H.端口地址输入到8253/54的CS,AL,A0端,分别对3个计数器和控制器寻址.     对8353/54编程时,先要设定控制字,以选择计数器,确定工作方式和计数值的格式.每计数器由三个引脚与外部联系,见教材第320页图9-1.CLK为时钟输入端,GATE为门控信号输入端,OUT为计数/定时信号输入端.每个计数器中包含一个16位计数寄存器,这个计数器时以倒计数的方式计数的,也就是说,从计数初值逐次减1,直到减为0为止.     8253/54的三个计数器是分别编程的,在对任一个计数器编程时,必须首先讲控制字节写入控制寄存器.控制字的作用是告诉8253/54选择哪个计数器工作,要求输出什么样的脉冲波形.另外,对8253/54的初始化工作还包括,向选定的计数器输入一个计数初值,因为这个计数值可以是8为的,也可以是16为的,而8253/5的数据总线是8位的,所以要用两条输出指令来写入初值.下面给出8253/54初始化程序段的一个例子,将计数器2设定为方式3,(关于计数器的工作方式参阅教材第325—330页)计数初值为65536.    MOV   AL,10110110B ;选择计数器2,按方式3工作,计数值是二进制格式    OUT   43H,AL      ; j将控制字送入控制寄存器    MOV   AL,0        ;计数初值为0    OUT   42H,AL      ;将计数初值的低字节送入计数器2    OUT   42H,AL      ;将计数初值的高字节送入计数器2    在IBM PC中8253/54的三个时钟端CLK0,CLK1和CLK2的输入频率都是1.1931817MHZ. PC机上的大多数I/O都是由主板上的8255(或8255A)可编程序外围接口芯片(PPI)管理的.关于8255A的结构和工作原理及应用举例参阅教材第340—373页.教材第364页的”PC/XT机中的扬声器接口电路”一节介绍了扬声器的驱动原理,并给出了通用发声程序.本设计正是基于这个原理,通过编程,控制加到扬声器上的信号的频率,奏出乐曲的.2.发声程序的设计下面是能产生频率为f的通用发声程序:MOV      AL, 10110110B   ;8253控制字:通道2,先写低字节,后写高字节        ;方式3,二进制计数OUT      43H, AL                  ;写入控制字MOV      DX, 0012H               ;被除数高位MOV      AX, 35DEH              ;被除数低位 DIV      ID      ;求计数初值n,结果在AX中OUT      42H, AL     ;送出低8位MOV      AL, AHOUT      42H,AL     ;送出高8位IN      AL, 61H     ;读入8255A端口B的内容MOV      AH, AL                  ;保护B口的原状态OR  AL, 03H     ;使B口后两位置1,其余位保留OUT 61H,AL     ;接通扬声器,使它发声

    标签: 微型计算机 发声程序 论文 微机

    上传时间: 2013-10-17

    上传用户:sunjet