基于单片机的步进电机开环控制系统:通过ATMEL89C51单片机对步进电机进行控制,主要介绍了步进电机控制器、驱动电路和LED显示电路的设计,实现了步进电机的开环控制。在步进电机控制器的设计中,重点阐述了脉冲产生电路以及对速度的控制。该系统具有成本低、控制方便的特点。关键词: 单片机; 步进电机; 开环控制 Abstract: The design using ATMEL89C51 single chip to control the step2motor with its controller, driving circuit and LED disp lay circuit to realize step motor open2loop controlwere introduced. For the controller in this design,the circuit to p roduce pulse and the speed controlwere expatiated emphatically. This system possesses features of lower cost, easier control.Key words: single ch ip; step2motor; open2loop con trol
上传时间: 2013-10-13
上传用户:cicizoe
摘要:本水位监测报警器使用5V低压直流电源(也可以用3节5号电池代替)就可以对5~15厘米的水位进行监测,用LED显示和数码管显示水位,并可以对不再此范围内的水位发出报警。主要采用CD4066、74LS86、74LS32、CD4511芯片,再加上数码管、蜂鸣器、发光二极管、电阻这些器件组成一个简单而灵敏的监测报警电路,操作简单,接通电源即可工作。因为大部分电路采用数字电路,所以本水位监测报警器还具有耗能低、准确性高的特点。关键字:译码电路 报警电路 监测电路 Abstract: The water level alarm monitoring the use of 5 V low-voltage DC power (can also use three batteries replaced on the 5th) will be able to 5 to 15 centimeters of water level monitoring, with LED display and digital display of water level, and this can no longer Within the scope of a water level alarm. Mainly CD4066, 74LS86, 74LS32, CD4511 chips, coupled with digital control, buzzer, light-emitting diode, the resistance of these devices composed of a simple and sensitive monitoring alarm circuits. Because the majority of circuits using digital circuitry, so the water level monitored alarm system also has low energy consumption, high accuracy of the characteristics. Keyword: Decoding circuit alarm circuit monitoring circuit
上传时间: 2013-11-05
上传用户:王庆才
含原理图+电路图+程序的波形发生器:在工作中,我们常常会用到波形发生器,它是使用频度很高的电子仪器。现在的波形发生器都采用单片机来构成。单片机波形发生器是以单片机核心,配相应的外围电路和功能软件,能实现各种波形发生的应用系统,它由硬件部分和软件部分组成,硬件是系统的基础,软件则是在硬件的基础上,对其合理的调配和使用,从而完成波形发生的任务。 波形发生器的技术指标:(1) 波形类型:方型、正弦波、三角波、锯齿波;(2) 幅值电压:1V、2V、3V、4V、5V;(3) 频率值:10HZ、20HZ、50HZ、100HZ、200HZ、500HZ、1KHZ;(4) 输出极性:双极性操作设计1、 机器通电后,系统进行初始化,LED在面板上显示6个0,表示系统处于初始状态,等待用户输入设置命令,此时,无任何波形信号输出。2、 用户按下“F”、“V”、“W”,可以分别进入频率,幅值波形设置,使系统进入设置状态,相应的数码管显示“一”,此时,按其它键,无效;3、 在进入某一设置状态后,输入0~9等数字键,(数字键仅在设置状态时,有效)为欲输出的波形设置相应参数,LED将参数显示在面板上;4、 如果在设置中,要改变已设定的参数,可按下“CL”键,清除所有已设定参数,系统恢复初始状态,LED显示6个0,等待重新输入命令;5、 当必要的参数设定完毕后,所有参数显示于LED上,用户按下“EN”键,系统会将各波形参数传递到波形产生模块中,以便控制波形发生,实现不同频率,不同电压幅值,不同类型波形的输出;6、 用户按下“EN”键后,波形发生器开始输出满足参数的波形信号,面板上相应类型的运行指示灯闪烁,表示波形正在输出,LED显示波形类型编号,频率值、电压幅值等波形参数;7、 波形发生器在输出信号时,按下任意一个键,就停止波形信号输出,等待重新设置参数,设置过程如上所述,如果不改变参数,可按下“EN”键,继续输出原波形信号;8、 要停止波形发生器的使用,可按下复位按钮,将系统复位,然后关闭电源。硬件组成部分通过综合比较,决定选用获得广泛应用,性能价格高的常用芯片来构成硬件电路。单片机采用MCS-51系列的89C51(一块),74LS244和74LS373(各一块),反相驱动器 ULN2803A(一块),运算放大器 LM324(一块) 波形发生器的硬件电路由单片机、键盘显示器接口电路、波形转换(D/ A)电路和电源线路等四部分构成。1.单片机电路功能:形成扫描码,键值识别,键功能处理,完成参数设置;形成显示段码,向LED显示接口电路输出;产生定时中断;形成波形的数字编码,并输出到D/A接口电路;如电路原理图所示: 89C51的P0口和P2口作为扩展I/O口,与8255、0832、74LS373相连接,可寻址片外的寄存器。单片机寻址外设,采用存储器映像方式,外部接口芯片与内部存储器统一编址,89C51提供16根地址线P0(分时复用)和P2,P2口提供高8位地址线,P0口提供低8位地址线。P0口同时还要负责与8255,0832的数据传递。P2.7是8255的片选信号,P2.6是0832(1)的片选,P2.5是0832(2)的片选,低电平有效,P0.0、P0.1经过74LS373锁存后,送到8255的A1、A2作,片内A口,B口,C口,控制口等寄存器的字选。89C51的P1口的低4位连接4只发光三极管,作为波形类型指示灯,表示正在输出的波形是什么类型。单片机89C51内部有两个定时器/计数器,在波形发生器中使用T0作为中断源。不同的频率值对应不同的定时初值,定时器的溢出信号作为中断请求。控制定时器中断的特殊功能寄存器设置如下:定时控制寄存器TCON=(00010000)工作方式选择寄存器(TMOD)=(00000000)中断允许控制寄存器(IE)=(10000010)2、键盘显示器接口电路功能:驱动6位数码管动态显示; 提供响应界面; 扫面键盘; 提供输入按键。由并口芯片8255,锁存器74LS273,74LS244,反向驱动器ULN2803A,6位共阴极数码管(LED)和4×4行列式键盘组成。8255的C口作为键盘的I/O接口,C口的低4位输出到扫描码,高4位作为输入行状态,按键的分布如图所示。8255的A口作为LED段码输出口,与74LS244相连接,B口作为LED的位选信号输出口,与ULN2803A相连接。8255内部的4个寄存器地址分配如下:控制口:7FFFH , A口:7FFFCH , B口:7FFDH , C口:7FFEH 3、D/A电路功能:将波形样值的数字编码转换成模拟值;完成单极性向双极性的波形输出;构成由两片0832和一块LM324运放组成。0832(1)是参考电压提供者,单片机向0832(1)内的锁存器送数字编码,不同的编码会产生不同的输出值,在本发生器中,可输出1V、2V、3V、4V、5V等五个模拟值,这些值作为0832(2)的参考电压,使0832(2)输出波形信号时,其幅度是可调的。0832(2)用于产生各种波形信号,单片机在波形产生程序的控制下,生成波形样值编码,并送到0832(2)中的锁存器,经过D/A转换,得到波形的模拟样值点,假如N个点就构成波形的一个周期,那么0832(2)输出N个样值点后,样值点形成运动轨迹,就是波形信号的一个周期。重复输出N个点后,由此成第二个周期,第三个周期……。这样0832(2)就能连续的输出周期变化的波形信号。运放A1是直流放大器,运放A2是单极性电压放大器,运放A3是双极性驱动放大器,使波形信号能带得起负载。地址分配:0832(1):DFFFH ,0832(2):BFFFH4、电源电路:功能:为波形发生器提供直流能量;构成由变压器、整流硅堆,稳压块7805组成。220V的交流电,经过开关,保险管(1.5A/250V),到变压器降压,由220V降为10V,通过硅堆将交流电变成直流电,对于谐波,用4700μF的电解电容给予滤除。为保证直流电压稳定,使用7805进行稳压。最后,+5V电源配送到各用电负载。
上传时间: 2013-11-08
上传用户:685
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
The MC68HC05K0 is a low cost, low pin countsingle chip microcomputer with 504 bytes of userROM and 32 bytes of RAM. The MC68HC05K0 isa member of the 68HC05K series of devices whichare available in 16-pin DIL or SOIC packages.It uses the same CPU as the other devices in the68HC05 family and has the same instructions andregisters. Additionally, the device has a 15-stagemulti-function timer and 10 general purposebi-directional I/0 lines. A mask option is availablefor software programmable pull-downs on all ofthe I/O pins and four of the pins are capable ofgenerating interrupts.The device is ideally suited for remote-controlkeyboard applications because the pull-downs andthe interrupt drivers on the port pins allowkeyboards to be built without any externalcomponents except the keys themselves. There isno need for external pull-up or pull-down resistors,or diodes for wired-OR interrupts, as these featuresare already designed into the device.
上传时间: 2014-01-24
上传用户:zl5712176
7.1 并行接口概述并行接口和串行接口的结构示意图并行接口传输速率高,一般不要求固定格式,但不适合长距离数据传输7.2 可编程并行接口芯片82C55 7.2.1 8255的基本功能 8255具有2个独立的8位I/O口(A口和B口)和2个独立的4位I/O(C口上半部和C口下半部),提供TTL兼容的并行接口。作为输入时提供三态缓冲器功能,作为输出时提供数据锁存功能。其中,A口具有双向传输功能。8255有3种工作方式,方式0、方式1和方式2,能使用无条件、查询和中断等多种数据传送方式完成CPU与I/O设备之间的数据交换。B口和C口的引脚具有达林顿复合晶体管驱动能力,在1.5V时输出1mA电流,适于作输出端口。C口除用做数据口外,当8255工作在方式1和方式2时,C口的部分引脚作为固定的联络信号线。
标签: 并行接口
上传时间: 2013-10-25
上传用户:oooool
并行接口电路:微处理器与I/O设备进行数据传输时均需经过接口电路实现系统与设备互连的匹配。并行接口电路中每个信息位有自己的传输线,一个数据字节各位可并行传送,速度快,控制简单。由于电气特性的限制,传输距离不能太长。8255A是通用的可编程并行接口芯片,功能强,使用灵活。适合一些并行输入/输出设备的使用。8255A并行接口逻辑框图三个独立的8位I/O端口,口A、口B、口C。口A有输入、输出锁存器及输出缓冲器。口B与口C有输入、输出缓冲器及输出锁存器。在实现高级的传输协议时,口C的8条线分为两组,每组4条线,分别作为口A与口B在传输时的控制信号线。口C的8条线可独立进行置1/置0的操作。口A、口B、口C及控制字口共占4个设备号。8255A并行接口的控制字工作模式选择控制字:口A有三种工作模式,口B有二种工作模式。口C独立使用时只有一个工作模式,与口A、口B配合使用时,作为控制信号线。三种工作模式命名为:模式0、模式1及模式2。模式 0 为基本I/O端口,模式1为带选通的I/O端口,模式 2 为带选通的双向I/O端口。口A可工作在三种模式下,口B可工作在模式 0与模式 1下,口C可工作在模式0下或作为控制线配合口A、口B工作。
上传时间: 2013-11-07
上传用户:xitai
微机接口技术试题:《微机接口技术》模拟试题 一、 选择题:(每空1分,共20分)1. CPU与外设之间交换数据常采用 、 、 和 四种方式,PC机键盘接口采用 传送方式。 ⒉ 当进行DMA方式下的写操作时,数据是从 传送到 __中。 ⒊ PC总线、ISA总线和EISA总线的地址线分别为: 、 和 根。 ⒋ 8254定时/计数器内部有 个端口、共有 种工作方式。 ⒌8255的A1和A0引脚分别连接在地址总线的A1和A0,当命令端口的口地址为317H时,则A口、B口、C口的口地址分别为 、 、 。 ⒍ PC微机中最大的中断号是 、最小的中断号是 。 ⒎PC微机中键盘是从8255的 口得到按键数据。 ⒏ 串行通信中传输线上即传输_________,又传输_________。 二、选择题:(每题2分,共10分)⒈ 设串行异步通信每帧数据格式有8个数据位、无校验、一个停止位,若波特率为9600B/S,该方式每秒最多能传送( )个字符。 ① 1200 ② 150 ③ 960 ④ 120 2.输出指令在I/O接口总线上产生正确的命令顺序是( )。① 先发地址码,再发读命令,最后读数据。② 先发读命令、再发地址码,最后读数据。③ 先送地址码,再送数据,最后发写命令。④ 先送地址码,再发写命令、最后送数据。3 使用8254设计定时器,当输入频率为1MHZ并输出频率为100HZ时,该定时器的计数初值为( )。 ① 100 ② 1000 ③ 10000 ④ 其它 4 在PC机中5号中断,它的中断向地址是( )。 ① 0000H:0005H ② 0000H:0010H ③ 0000H:0014H ④ 0000H:0020H 5. 四片8259级联时可提供的中断请求总数为( )。 ① 29个 ② 30个 ③ 31个 ④ 32个 6. 下述总线中,组内都是外设串行总线为( )组。① RS-485、IDE、ISA。② RS-485、IEEE1394、USB。③ RS-485、PCI、IEEE1394。④ USB、SCSI、RS-232。 7. DMA在( )接管总线的控制权。① 申请阶段 ② 响应阶段 ③ 数据传送阶段 ④ 结束阶段 8. 中断服务程序入口地址是( )。 ① 中断向量表的指针 ② 中断向量 ③ 中断向量表 ④ 中断号
上传时间: 2013-11-16
上传用户:xiaoxiang
This application note describes a reference system which illustrates how to build an embeddedPowerPC® system using the Xilinx 1-Gigabit Ethernet Media Access Controller processor core.This system has the PLB_Gemac configured to use Scatter/Gather Direct Memory Access andthe Serializer/Deserializer (SerDes) interface. This application note describes how to set up thespecific clocking structure required for the SerDes interface and the constraints to be added tothe UCF file. This reference system is complete with a standalone software application to testsome of the main features of this core, including access to registers, DMA capabilities, transmitand receive in loopback mode. This reference system is targeted for the ML300 evaluationboard.
上传时间: 2013-11-01
上传用户:truth12
The field of microelectromechanical systems (MEMS), particularly micromachinedmechanical transducers, has been expanding over recent years, and the productioncosts of these devices continue to fall. Using materials, fabrication processes, anddesign tools originally developed for the microelectronic circuits industry, newtypes of microengineered device are evolving all the time—many offering numerousadvantages over their traditional counterparts. The electrical properties of siliconhave been well understood for many years, but it is the mechanical properties thathave been exploited in many examples of MEMS. This book may seem slightlyunusual in that it has four editors. However, since we all work together in this fieldwithin the School of Electronics and Computer Science at the University of Southampton,it seemed natural to work together on a project like this. MEMS are nowappearing as part of the syllabus for both undergraduate and postgraduate coursesat many universities, and we hope that this book will complement the teaching thatis taking place in this area.
上传时间: 2013-10-16
上传用户:朗朗乾坤