1. 急求关于AT89C51单片机的中英对照问下翻译,5000字左右
整个PEROM阵列和三个锁定位的电擦除可通过正确的控制信号组合,并保持ALE管脚处于低电平10ms 来完成。在芯片擦操作中,代码阵列全被写“1”且在任何非空存储字节被重复编程以前,该操作必须被执行。
此外,AT89C51设有稳态逻辑,可以在低到零频率的条件下静态逻辑,支持两种软件可选的掉电模式。在闲置模式下,CPU停止工作。但RAM,定时器,计数器,串口和中断系统仍在工作。在掉电模式下,保存RAM的内容并且冻结振荡器,禁止所用其他芯片功能,直到下一个硬件复位为止。
串口通讯
单片机的结构和特殊寄存器,这是你编写软件的关键。至于串口通信需要用到那些特殊功能寄存器呢,它们是SCON,TCON,TMOD,SCON等,各代表什么含义呢?
SBUF 数据缓冲寄存器这是一个可以直接寻址的串行口专用寄存器。有朋友这样问起过“为何在串行口收发中,都只是使用到同一个寄存器SBUF?而不是收发各用一个寄存器。”实际上SBUF 包含了两个独立的寄存器,一个是发送寄存,另一个是接收寄存器,但它们都共同使用同一个寻址地址-99H。CPU 在读SBUF 时会指到接收寄存器,在写时会指到发送寄存器,而且接收寄存器是双缓冲寄存器,这样可以避免接收中断没有及时的被响应,数据没有被取走,下一帧数据已到来,而造成的数据重叠问题。发送器则不需要用到双缓冲,一般情况下我们在写发送程序时也不必用到发送中断去外理发送数据。操作SBUF寄存器的方法则很简单,只要把这个99H 地址用关键字sfr定义为一个变量就可以对其进行读写操作了,如sfr SBUF = 0x99;当然你也可以用其它的名称。通常在标准的reg51.h 或at89x51.h 等头文件中已对其做了定义,只要用#include 引用就可以了。
SCON 串行口控制寄存器通常在芯片或设备中为了监视或控制接口状态,都会引用到接口控制寄存器。SCON 就是51 芯片的串行口控制寄存器。它的寻址地址是98H,是一个可以位寻址的寄存器,作用就是监视和控制51 芯片串行口的工作状态。51 芯片的串口可以工作在几个不同的工作模式下,其工作模式的设置就是使用SCON 寄存器。它的各个位的具体定义如下:
SM0 SM1 SM2 REN TB8 RB8 TI RI
SM0、SM1 为串行口工作模式设置位,这样两位可以对应进行四种模式的设置。串行口工作模式设置。
SM0 SM1 模式 功能 波特率
0 0 0 同步移位寄存器 fosc/12
0 1 1 8位UART 可变
1 0 2 9位UART fosc/32 或fosc/64
1 1 3 9位UART 可变
在这里只说明最常用的模式1,其它的模式也就一一略过,有兴趣的朋友可以找相关的硬件资料查看。表中的fosc 代表振荡器的频率,也就是晶振的频率。UART 为(Universal Asynchronous Receiver)的英文缩写。
SM2 在模式2、模式3 中为多处理机通信使能位。在模式0 中要求该位为0。
REM 为允许接收位,REM 置1 时串口允许接收,置0 时禁止接收。REM 是由软件置位或清零。如果在一个电路中接收和发送引脚P3.0,P3.1 都和上位机相连,在软件上有串口中断处理程序,当要求在处理某个子程序时不允许串口被上位机来的控制字符产生中断,那么可以在这个子程序的开始处加入REM=0 来禁止接收,在子程序结束处加入REM=1 再次打开串口接收。大家也可以用上面的实际源码加入REM=0 来进行实验。
TB8 发送数据位8,在模式2 和3 是要发送的第9 位。该位可以用软件根据需要置位或清除,通常这位在通信协议中做奇偶位,在多处理机通信中这一位则用于表示是地址帧还是数据帧。
RB8 接收数据位8,在模式2 和3 是已接收数据的第9 位。该位可能是奇偶位,地址/数据标识位。在模式0 中,RB8 为保留位没有被使用。在模式1 中,当SM2=0,RB8 是已接收数据的停止位。
TI 发送中断标识位。在模式0,发送完第8 位数据时,由硬件置位。其它模式中则是在发送停止位之初,由硬件置位。TI 置位后,申请中断,CPU 响应中断后,发送下一帧数据。在任何模式下,TI 都必须由软件来清除,也就是说在数据写入到SBUF 后,硬件发送数据,中断响应(如中断打开),这时TI=1,表明发送已完成,TI 不会由硬件清除,所以这时必须用软件对其清零。
RI 接收中断标识位。在模式0,接收第8 位结束时,由硬件置位。其它模式中则是在接收停止位的半中间,由硬件置位。RI=1,申请中断,要求CPU 取走数据。但在模式1 中,SM2=1时,当未收到有效的停止位,则不会对RI 置位。同样RI 也必须要靠软件清除。常用的串口模式1 是传输10 个位的,1 位起始位为0,8 位数据位,低位在先,1 位停止位为1。它的波特率是可变的,其速率是取决于定时器1 或定时器2 的定时值(溢出速率)。AT89C51 和AT89C2051 等51 系列芯片只有两个定时器,定时器0 和定时器1,而定时器2是89C52 系列芯片才有的。
波特率在使用串口做通讯时,一个很重要的参数就是波特率,只有上下位机的波特率一样时才可以进行正常通讯。波特率是指串行端口每秒内可以传输的波特位数。有一些初学的朋友认为波特率是指每秒传输的字节数,如标准9600 会被误认为每秒种可以传送9600个字节,而实际上它是指每秒可以传送9600 个二进位,而一个字节要8 个二进位,如用串口模式1 来传输那么加上起始位和停止位,每个数据字节就要占用10 个二进位,9600 波特率用模式1 传输时,每秒传输的字节数是9600÷10=960 字节。51 芯片的串口工作模式0的波特率是固定的,为fosc/12,以一个12M 的晶振来计算,那么它的波特率可以达到1M。模式2 的波特率是固定在fosc/64 或fosc/32,具体用那一种就取决于PCON 寄存器中的SMOD位,如SMOD 为0,波特率为focs/64,SMOD 为1,波特率为focs/32。模式1 和模式3 的波特率是可变的,取决于定时器1 或2(52 芯片)的溢出速率。那么我们怎么去计算这两个模
式的波特率设置时相关的寄存器的值呢?可以用以下的公式去计算。
波特率=(2SMOD÷32)×定时器1 溢出速率
上式中如设置了PCON 寄存器中的SMOD 位为1 时就可以把波特率提升2 倍。通常会使用定时器1 工作在定时器工作模式2 下,这时定时值中的TL1 做为计数,TH1 做为自动重装值 ,这个定时模式下,定时器溢出后,TH1 的值会自动装载到TL1,再次开始计数,这样可以不用软件去干预,使得定时更准确。在这个定时模式2 下定时器1 溢出速率的计算公式如下:
溢出速率=(计数速率)/(256-TH1)
上式中的“计数速率”与所使用的晶体振荡器频率有关,在51 芯片中定时器启动后会在每一个机器周期使定时寄存器TH 的值增加一,一个机器周期等于十二个振荡周期,所以可以得知51 芯片的计数速率为晶体振荡器频率的1/12,一个12M 的晶振用在51 芯片上,那么51 的计数速率就为1M。通常用11.0592M 晶体是为了得到标准的无误差的波特率,那么为何呢?计算一下就知道了。如我们要得到9600 的波特率,晶振为11.0592M 和12M,定时器1 为模式2,SMOD 设为1,分别看看那所要求的TH1 为何值。代入公式:
11.0592M
9600=(2÷32)×((11.0592M/12)/(256-TH1))
TH1=250
12M
9600=(2÷32)×((12M/12)/(256-TH1))
TH1≈249.49
上面的计算可以看出使用12M 晶体的时候计算出来的TH1 不为整数,而TH1 的值只能取整数,这样它就会有一定的误差存在不能产生精确的9600 波特率。当然一定的误差是可以在使用中被接受的,就算使用11.0592M 的晶体振荡器也会因晶体本身所存在的误差使波特率产生误差,但晶体本身的误差对波特率的影响是十分之小的,可以忽略不计。
The whole PEROM array with three electricities which target wipe in addition to combining through a correct control signal, and keep an ALE pin to be placed in low to give or get an electric shock an even 10 mses to complete.Wipe in the chip in operation, the all of code array are write"1" and at any not- empty saving word stanza drive repeated plait distance before, that operation had to be carry out.
In addition, the AT89 C51 establishes steady state logic, can at low get to the condition of zero frequencies under the static state logic, support two kinds of softwares can choose of drop an electricity mode.Under the idle mode, the CPU stop work.But RAM, in fixed time machine, count a machine, string and break off system still at the work.While drop the electricity mode, contents and congelation which keep RAM flap to concuss a machine, forbid other chip functions use, until the next hardware reset.
String communication
Single slice the structure of the machine with special deposit a machine, this be the key that you write software.As for does the string correspondence need to use to those special functions to deposit a machine, they are a SCON, TCON, TMOD, SCON etc., each representative what meaning?
SBUF data buffer's depositting a machine this is a string that can directly look for an address line's appropriation to deposit a machine.Had a friend to once start to ask so"why in the string the line receive and dispatch, all just use to same to deposit machine SBUF?But not is receive and dispatch each deposit a machine with 1."Actually the SBUF included deposit of two independence machine, 1 sends out to deposit, the another receives to deposit a machine, but they all together use same to look for an address address - 99 Hs.The CPU will point to receive to deposit a machine while read SBUF, while write will point to send out to deposit a machine, and receive to deposit a machine is a pair of buffer to deposit a machine, so can avoid receive to break off have no in time of is respond to, the data took away, next data already arrival, but result in of data layer after layer problem.Send out the machine then doesn't need to use a double a buffer and under the general circumstance we need not use to send out to break off, either to send a data to the outside haircut while writing to send out procere.Operate then the method that the SBUF deposits a machine is easy, as long as use the key word sfr to this 99 H address the definition change to measure for 1 as to it's can carry on to read and write to operate, like sfr SBUF=0 xes 99;Certainly you can also use other names.As to it's usually have already done definition in head documents such as the reg 51. hs or the at 89 xes 51. h etc. of standard, as long as use#include quote from all right.
The SCON string line control deposits a machine usually to connect a people's appearance for the sake of the surveillance or the control in the chip or the equipments, will quote from to connect a people's control to deposit a machine.SCON be the string of 51 chips line the control deposit a machine.Its looking for an address address is a 98 Hs, is a can look for an address by of deposit a machine, function be surveillance and control 51 in line of work appearance.The string of 51 chips can work under a few different work modes and the constitution of its work mode is to use SCON to deposit a machine.It of the concrete definition of each as follows:
SM0 SM1 SM2 REN TB8 RB8 TI RI
The SM0, SM1 is the work mode of in a string of line constitution, so 2 can be to the constitution that should carry on four kinds of modes.String the line work mode establish.
The SM0 SM1 mode function wave especially rate
000 synchronously move to deposit the machine fosc/12
0 one one 8 UARTs are variable
One 029 UART fosc/32s or fosc/64
One one 39 UARTs are variable
At my mode with the most in common use elucidation 1, other modes also skip one by one and the friend who has interest can seek related hardware data to look into.The fosc representative in the form flaps frequency of concuss the machine, be also crystal flap of frequency.UART is(the Receiver of the Universal Asynchronous) of English abbreviation.
The SM2 is in the mode 2, the mode 3 for handle machine correspondence more to make an ability.Request that to 0 in the mode 0.
In order to allow to receive REM, the REM places 1:00 string to allow to receive and place to forbid to receive at 0:00.The REM is placed by the software or pure zero.If receive and send out to lead the feet P3.0 in an electric circuit, the P3.1s all connect with each other with place of honor machine, there is a string of on the software breaking off processing procere, be request disallowing a string of while being handle some statures procere was come by the place of honor machine of control character list to proce interruption, so can join REM in the beginning of this statures procere=0 to forbid to receive, join REM at the sub- procere be over=1 again open a string of to receive.Everyone can also join REM with the actual source code of top=0 to start experiment.
The TB8 sends out a data 8, in the mode 2 with 3 want to send out of the 9th.That can use software according to need to place or clearance, usually this is located on to do in the correspondence agreement strange accidentally, this is then used for mean in handle machine correspondence more is the address still a data.
The RB8 receives a data 8, in the mode 2 with 3 is the 9th which has already received a data.That may be strange accidentally, the address/data marking.In the mode 0, the RB8 wasn't use for the reservation.Be SM 2= in the mode 10, the RB8 is the stop which has already received a data.
The TI sends out to break off a marking.In the mode 0, finish send out the 8th data, is placed by the hardware.Then being send out the beginning of stop in other modes is placed by the hardware.After TI places, the application break off and the CPU after respond to the interruption sends out next data.Under any mode, the TIs all have to be come to clearance by the software, be also say after the data write in to the SBUF, the hardware sends out a data, the interruption respond to(if the interruption open), at this time TI=1, express to send out to have already complete, TI can't from hardware clearance, so have to use software at this time as to it's pure zero.
The RI receives to break off a marking.In the mode 0, receive the 8th be over, is placed by the hardware.Then being receive the midway of stop in other modes is placed by the hardware.RI=1, the application break off and request CPU to take away a data.But in the mode 1, SM 2=1:00, be receive valid of stop, then will not place to the RI.The same RI has to also want to depend software clearance.In common use string mode 1 deliver 10, a start is 0,8 data, low Be located on first, a stop is 1.It of wave especially the rate be variable, its velocity is to be decided by in fixed time a machine 1 or in fixed time machine 2 of in fixed time be worth.(overflow velocity)51 series chips such as the AT89 C51 and the AT89 C2051 etc. only have 2 in fixed time a machine, in fixed time machine 0 with in fixed time machine 1, but in fixed time machine 2 is what the 89 C52 series chip just has.
Wave especially rate at usage string do communication, a very important parameter be wave especially rate, only up and down the wave of the machine especially the similar hour of rate just can carry on normal communication.Wave especially the rate is the wave that can deliver inside port in a string line each one number especially.The friend who has some beginners think wave especially the rate mean the word stanza that each one deliver number, is mistaken for each one to grow and can deliver 9600 word stanzas such as standard 9600 meetings, but actually it means each one can deliver 9600 binary systems, but a word stanza want 8 binary systems, if use a string of mode 1 to deliver to so plus a start and stop, the piece will take up 10 binary systems according to the word stanza each time, 9600 especially the rate use mode 1 deliver, each one deliver of word stanza number is 9600 ÷s 10= be 960 word stanzas.The string of 51 chips work mode 0 waves especially the rate be fixed, is a fosc/12, with a 12 Ms of crystal flap to compute, so it of wave especially the rate can attain 1 M.Mode 2 waves especially the rate be fixed in the fosc/64 or the fosc/32 and concretely use that kind of be decided by PCON to deposit the SMOD in the machine, such as SMOD is 0, wave especially rate is focs/64, SMOD is 1, wave especially rate is focs/32.Mode 1 with mode 3 waves especially the rate be variable and be decided by in fixed time a machine is 1 or 2(52 chips) spillage velocities.So how do we go to compute these two molds
The wave of type especially the rate establish relatedly deposit the value of machine?Can compute with the following formula.
Wave especially rate=(2 SMOD ÷ 32)× in fixed time machine 1 overflow velocity
Last type in if established PCON to deposit the SMOD in the machine as 1:00 can wave especially the rate promote 200%.Usually use in fixed time a machine one work at in fixed time the machine work mode be a 2 times, in fixed time be worth medium TL1 to be used as to count at this time, the TH1 be used as automatically rebind a value, this in fixed time under the mode, in fixed time machine overflow after, the value of TH1 will automatically load TL1, again start count, so can need not software interfere and make in fixed time more accurate.At this in fixed time mode 2 times in fixed time machine 1 overflow the calculation formula of velocity as follows:
Overflow velocity=(count velocity)/(256 - TH1s)
Last"count velocity" within type flap with the crystal use to concuss machine frequency relevant, in 51 chips in fixed time machine start the future reunion make the value of deposit the machine TH in fixed time increase in each machine period a, a machine period equals 12 to flap to concuss a period, so can know 51 count of chipses the velocity flaps to concuss machine frequency for the crystal of 1/12, a 12 Ms of crystal flap to use on 51 chips, so 51 of count velocity is 1 M.Usually using a 11.0592 M crystal is for getting standard without any error bad of wave especially rate, why so?The calculation knew all of a sudden.Such as we good arrive 9600 waves a rate especially, crystal flap for the 11.0592 Ms and the 12 Ms, in fixed time machine 1 is mode 2, the SMOD establishes to 1 and see respectively why the TH1 that that request be worth.The generation goes into formula:
11.0592M
9600=(2 ÷s 32) ×(11.0592 Ms/12)(/(256-TH1))
TH 1=250
12M
9600=(2 ÷s 32) ×(12 Ms/12)(/(256-TH1))
TH1 ≈ 249.49
Top of the calculation can see go abroad as ambassador come out with 12 M's time calculation of the crystal of the TH1 isn't an integral, but value of TH1 can take integral, so it would the existence certain error margin can't proce 9600 of precision rate especially.The certainly certain error margin can be accept in the usage, using the crystal with 11.0592 Ms to flap to concuss a machine on the whole will also make because of the error margin exist by crystal wave especially rate creation error margin, but the error margin of crystal to wave especially the influence of the rate be very of small, can neglect not to account.
2. 单片机英文文献及翻译,5000字左右
其实,还是算了,自己弄吧,这么多,没有那么多的好心人给你弄的,自己网上弄吧,太多了,5000多字,高考一个作文才1000多就要写好久。给你推荐Google翻译,还算可以,比大多数好用,比什么狗屎金山词霸好多了,至少大部分通顺,然后自己修改下就可以了,
3. 单片机英文文献及翻译,5000字左右 邮箱[email protected]
Single-Chip Microcomputer
有的时候,也可以用SingleChip来代替
下面链接的第六章有讲单片机Single Chip Microcmputer 第148页开始
http://books.google.co.nz/books?id=AUtTx3TgO7IC&pg=PT41&lpg=PT41&dq=what+is+Single+Chip+Microcomputer&source=web&ots=QQqVentmyy&sig=ZPBVtVXwiQakAtCIXJqzRw_BobE&hl=en&sa=X&oi=book_result&resnum=8&ct=result#PPT41,M1
这是一段中汉对照的。
中文:
单片机是把主要计算机功能部件都集成在一块芯片上的微型计算机。它是一种集计数和多中接口于一体的微控制器,被广泛应用在智能产品和工业自动化上,而51单片机是个单片机中最为典型和最有代表性的一种。
本课题选择89S51为核心控制元件,设计了一个日常生活中用到的电子音乐门铃系统。当功能按键按下,音乐响起,发光二极管随着音乐的节拍进行闪烁,LED显示相应的定时器初值。音乐演奏过程中再次按下按键无效,只有当音乐段结束再次按下才有效。如果是电子音乐门铃在响,按下复位按键就终止,显示初始状态。经过实践证明,本系统运行稳定,具有一定的实用价值。
-------------
翻译:
SCM is a major piece of computer components are integrated into the chip micro-computer. It is a multi-interface and counting on the micro-controller integration, and intelligence procts are widely used in instrial automation. and MCS-51 microcontroller is a typical and representative.
The topics chosen for the 89S51 control of the core components used in the design of a daily electronic music doorbell system. When the function button is pressed, the music sounded and the music beats with light emitting diodes for flickered. Initial corresponding LED timer. Musical process again pressed the button ineffective, and only when pressed again before the end of the music effectively. If the doorbell ring for electronic music, press the button on the rection and termination, showed initial state. Practice has proved that the system is stable and has some practical value.
本设计是以凌阳16位单片机为重心,介绍语音控制在机械手中的应用,实现微型舵机的运作,完成所指定的动作。其中通过凌阳16位单片机输出的脉冲信号来准确的控制机械手的摆动角度,机械手的捏拿动作由电磁铁完成,电磁铁的通断由凌阳16位单片机的I/O口控制,硬件和软件都在具体的实验中证明了其可行性
This design is take insults the positive 16 monolithic integrated circuits as a center of gravity, introced the pronunciation control in manipulator's application, the realization miniature servo operation, completes the movement which assigns. Through insults the pulse signal which the positive 16 monolithic integrated circuits outputs to come the accurate control manipulator to swing the angle, the manipulator pinches takes the movement to complete by the electro-magnet, the electro-magnet passes the legal reason for judgment to insult the positive 16 monolithic integrated circuits I/O control, the hardware and the software all have proven its feasibility in the concrete experiment
4. 求一个51单片机5000字左右的中英文翻译 毕业设计用 谢谢
Design of the Temperature Control System Based on AT89S51
Huang Wentian, Li Jinping
College of Information, Beijing Union University, Beijing 100101, China
[email protected], [email protected]
ABSTRACT: The principle and functions of the temperature control system based on microcontroller AT89S51 are studied, and the temperature measurement unit consists of the 1-Wire bus digital temperature sensor DS18B20. The system can be expected to detect the preset temperature, display time and save monitoring data. An alarm will be given by system if the temperature exceeds the upper and lower limit value of the temperature which can be set discretionarily and then automatic control is achieved, thus the temperature is achieved monitoring intelligently within a certain range. Basing on principle of the system, it is easy to make a variety of other non-linear control systems so long as the software design is reasonably changed. The system has been proved to be accurate, reliable and satisfied through field practice.
KEYWORDS: AT89S51; microcontroller; DS18B20; temperature
中文译文
基于单片机AT89S51设计的温度控制系统
黄温甜,李金平
信息学院,北京联合大学,北京100101,中国
[email protected], [email protected]
摘要:原理和单片机AT89S51单片机温度控制系统功能的基础研究,温度测量单位的1- Wire总线数字温度传感器DS18B20组成。该系统可将检测到设定温度,显示时间和保存监测数据。报警系统会给予如果温度超过了可动任意设置,然后实现自动化控制,从而达到监控的温度在一定范围内智能温度上限和下限值。在系统原则的基础上,很容易使其他非非线性控制系统,以便在合理长改变了软件设计等。该系统已被证明是准确,可靠,并通过野外实习至满意。
关键词:AT89S51单片机,微控制器,传感器DS18B20,温度。
5. 急求一片基于单片机的电子钟 或者万年历的英文文献5000字左右的!!!! 急求!!
Design of the digital Perpetual Calendar based on
real-time clock chip
Abstract:This Electronic calendar uses the AT89S52 microcontroller as the core for the control. Time Circuit which is constituted by Dallas's DS1302 real-time clock chip achieved a time and date display, it increased functionality for the temperature display and the whole point timekeeping. This paper discusses the hardware circuit of the system, principle in detail,and gives the flow chart of the software design and the major source code. keywords:microcontroller; real-time clock; Temperature measurement
1 Introction
E-calendar-bedroom at home,schools,stations and more and more extensive use of plaza for people's lives,study,work great convenience. Electronics calendar for the past need to re-adjust after power-off time and date,and time is a big error. Designed the system using real-time clock chip (DS1302) as a timer parts,the chip comes with an internal crystal oscillator,so that effectively guarantee the accuracy of the time and hang own internal battery power makes the situation will continue to update the time information . This design uses AT89S52 as the main controller,in order to improve the practicality of the circuit add temperature measurement circuit,timekeeping and alarm functions.
2 System hardware design
Schematic circuit shown in Figure 2:
System architecture diagram
2.1 Power Supply Circuit
In order to rece circuit costs,the system power supply circuit by the transformer transformer,three-terminal integrated regulator (L7805> circuit 5V, has a simple,reliable, inexpensive and so on.
2.2 Host Controller
Host controller using ATMEL's latest MCU Procts AT89S52. Apart from the single-chip microcomputer has a MCS-51 series single-chip all the benefits of things,also has 8KB of internal in-system programmable FLASH memory,free and low-power brown-out mode, greatly recing the power circuit . In addition,also has a watchdog circuit,a reliable job for the circuit provides greater assurance.
2.3 digital tube display circuit
Show circuit with a high brightness,long life,low cost features such as the LED digital tube. Throughout the show circuit by the digital control and display LED drive circuit and decoding circuit. Because of the system to display the contents of more,a total of 16 digital tube, respectively,with eight shows year,month,day,four show time,show that 22 weeks,2 show the temperature. Controller in order to save resources,between the controller and displays add a decoding circuit 16 so that would have required the line of control into the circuit only 4 control lines,a great save system resources. The decoder by the decoder constitute both 3-8.
2.4 Real-time clock chip
This design uses the United States Dallas company DS1302, the chip can automatically generate century,year,month,day,hour,minute,second,such as time information. Century the use of internal registers with the software will be able to resolve the 'Millennium', the problem. The chip has its own internal battery-keng,external brown-out,the internal time information also be able to maintain for 10 years. Time for a single day record of 12 hours and there is a 24-hour mode. Time Table
Ways that also has two kinds of binary numbers,and the other with BCD code express. The chip with 128 bytes of internal RAM,one of 11 bytes used to store time information,4 bytes of memory chips used to control information,known as the control register,113-byte general-purpose RAM for users to store temporary information. In addition,users can also program the chip to control a variety of square-wave output,and its internal three-way through the software interrupt shielding.
2.5 Buttons and temperature measurements and circuit
The system in order to make the circuit more easy,button circuit design only three keys, which are 'set','+','-', three keys to adjust the calendar and clock. The system in order to improve the practicality of the circuit,an increase of a temperature display. The system temperature measurement circuit using Dallas's DS18B20. The device because of its low price,easy circuits,measurement precision,etc..
2.6 audio signal generator and driver circuit
The circuit's function is to receive control circuit to send to the entire point of time and timing signal,according to system settings proce different frequencies of audio signals,amplification by the drive circuit to drive speakers to voice their opinions in order to realize the whole point timekeeping and alarm functions.
中文译文:
基于实时钟芯片的电子万年历的设计
摘要:电子万年历以AT89S52单片机为控制核心,采用Dallas公司的DS1302实时钟芯片构成计时电路,实现了时间和日期的显示,还增加了温度显示和整点报时的功能。文章对该系统的硬件电路、工作原理做了详细介绍,同时给出了软件设计的流程图及主要程序源代码。
关键词:单片机,实时钟.温度测量
1引言
电子万年历在家庭居室、学校、车站和广场使用越来越广泛,给人们的生活、学习、工作带来极大的方便。针对以往的电子万年历断电后需重新调整时间与日期,且计时误差大的现象。本系统设计采用实时钟芯片(DS1302)作为计时器件,该芯片内部自带晶体振荡器,这样就有效的保证了计时的精确性,并且内部自带铿电池使得在断电情况能继续更新时间信息。本设计采用AT89S52作为主控制器,为了提高电路的实用性加入温度测量电路、报时和闹钟功能。
2系统硬件的设计
电路原理图如图所示:
该系统的结构框图
系统的工作原理是:主控制器每隔一段时间(小于一秒钟)读一次时钟芯片的内部寄存器的值,将读出的日历、时间信息实时的显示在LED数码显示器一上。同时,主控制器不断的扫描按键电路和温度测量电路,当有键按下时,识别出按键的值并调整相应的时间或日历的值再写入时钟芯片内部。温度数据由测量电路(DS18B20)获得的温度值送入显示电路显示。
2. 1电源电路
为了减少电路成本,本系统电源电路由变压器变压、三端集成稳压(L7805>电路产生5V,具有简单、可靠、价格低廉等特点。
2. 2主控制器
主控制器采用ATMEL公司的最新系列单片机产品AT89S52。该单片机除了拥有MCS-51系列单片机的所有优点外,内部还具有8KB的在系统可编程FLASH存储器,低功耗的空闲和掉电模式,极大的降低了电路的功耗。另外,还具有一个看门狗电路,为电路的可靠工作提供了更大的保证。
2. 3数码管显示电路
显示电路采用具有高亮度、使用寿命长、价格低廉等特点的LED数码管。整个显示电路由LED数码管和显示驱动电路和译码电路构成。由于本系统中显示的内容较多,共需要16个数码管,分别用八位显示年、月、日,四位显示时间,二二位显示星期,二位显示温度。为了节省控制器的资源,在控制器和显示器之间加入一个译码电路使本来需要16根控制线的电路变成只需四根控制线,极大的节省了系统资源。该译码器由两个3-8译码器构成。
2. 4实时钟芯片
本设计采用美国Dallas公司的DS12C887A,该芯片能够自动产生世纪、年、月、日、时、分、秒等时间信息。利用内部的世纪寄存器,配合软件就能解决’千年’,的问题。该芯片内部自带有铿电池,外部掉电时,其内部的时间信息还能够保持10年之久。对于一天内的时间记录有 12小时制和24小时制两种模式。时间的表示方法也有两种,一种用二进制数表示,另一种用BCD码表示。该芯片内部带有128字节的RAM,其中11字节用来存储时间信息,4字节用来存储芯片的控制信息,称为控制寄存器,113字节通用RAM可供用户存储临时信息。此外,用户还可以对芯片进行编程控制输出各种方波,并可对其内部的三路中断通过软件进行屏蔽。
2. 5按键与温度测且电路
本系统为了使电路更简单,按键电路只设计了三个按键,分别是’设置’、’+’、’-’,三个键用来调整日历以及时钟。本系统为了提高电路的实用性,增加了一个温度显示功能。该系统的温度测量电路采用Dallas公司的DS1280。该器件由于其具有价格低廉、电路简单、测量精确等优点。
2. 6音频信号产生及驱动电路
本电路的功能是接收控制电路发送来的整点报时及定时信号,根据系统设定产生不同频率的音频信号,由驱动电路加以放大驱动扬声器发出声音,从而实现整点报时及闹钟的功能。
希望可以帮到你!!!
6. 单片机英文文献及翻译,5000字左右 急需 谢谢 [email protected]
Introction of Programmable controllers
From a simple heritage, these remarkable systems have evolved to not only replace electromechanical devices, but to solve an ever-increasing array of control problems in both process and nonprocess instries. By all indications, these microprocessor powered giants will continue to break new ground in the automated factory into the 1990s.
HISTORY
In the 1960s, electromechanical devices were the order of the day ass far as control was concerned. These devices, commonly known as relays, were being used by the thousands to control many sequential-type manufacturing processes and stand-along machines. Many of these relays were in use in the transportation instry, more specifically, the automotive instry. These relays used hundreds of wires and their interconnections to effect a control solution. The performance of a relay was basically reliable - at least as a single device. But the common applications for relay panels called for 300 to 500 or more relays, and the reliability and maintenance issues associated with supporting these panels became a very great challenge. Cost became another issue, for in spite of the low cost of the relay itself, the installed cost of the panel could be quite high. The total cost including purchased parts, wiring, and installation labor, could range from $30~$50 per relay. To make matters worse, the constantly changing needs of a process called for recurring modifications of a control panel. With relays, this was a costly prospect, as it was accomplished by a major rewiring effort on the panel. In addition these changes were sometimes poorly documented, causing a second-shift maintenance nightmare months later. In light of this, it was not uncommon to discard an entire control panel in favor of a new one with the appropriate components wired in a manner suited for the new process. Add to this the unpredictable, and potentially high, cost of maintaining these systems as on high-volume motor vehicle proction lines, and it became clear that something was needed to improve the control process – to make it more reliable, easier to troubleshoot, and more adaptable to changing control needs.
That something, in the late 1960s, was the first programmable controller. This first ‘revolutionary’ system wan developed as a specific response to the needs of the major automotive manufacturers in the United States. These early controllers, or programmable logic controllers (PLC), represented the first systems that 1 could be used on the factory floor, 2 could have there ‘logic’ changed without extensive rewiring or component changes, and 3 were easy to diagnose and repair when problems occurred.
It is interesting to observe the progress that has been made in the past 15 years in the programmable controller area. The pioneer procts of the late 1960s must have been confusing and frightening to a great number of people. For example, what happened to the hardwired and electromechanical devices that maintenance personnel were used to repairing with hand tools? They were replaced with ‘computers’ disguised as electronics designed to replace relays. Even the programming tools were designed to appear as relay equivalent presentations. We have the opportunity now to examine the promise, in retrospect, that the programmable controller brought to manufacturing.
All programmable controllers consist of the basic functional blocks shown in Fig. 10. 1. We’ll examine each block to understand the relationship to the control system. First we look at the center, as it is the heart ( or at least the brain ) of the system. It consists of a microprocessor, logic memory for the storage of the actual control logic, storage or variable memory for use with data that will ordinarily change as a function power for the processor and memory. Next comes the I/O block. This function takes the control level signals for the CPU and converts them to voltage and current levels suitable for connection with factory grade sensors and actuators. The I/O type can range from digital (discrete or on / off), analog (continuously variable), or a variety of special purpose ‘smart’ I/O which are dedicated to a certain application task. The programmer is shown here, but it is normally used only to initially configure and program a system and is not required for the system to operate. It is also used in troubleshooting a system, and can prove to be a valuable tool in pinpointing the exact cause of a problem. The field devices shown here represent the various sensors and actuators connected to the I/O. These are the arms, legs, eyes, and ears of the system, including push buttons, limit switches, proximity switches, photosensors, thermocouples, RTDS, position sensing devices, and bar code reader as input; and pilot lights, display devices, motor starters, DC and AC drives, solenoids, and printers as outputs.
No single attempt could cover its rapidly changing scope, but three basic characteristics can be examined to give classify an instrial control device as a programmable controller.
(1) Its basic internal operation is to solve logic from the beginning of memory to some specified point, such as end of memory or end of program. Once the end is reached, the operation begins again at the beginning of memory. This scanning process continues from the time power is supplied to the time it it removed.
(2) The programming logic is a form of a relay ladder diagram. Normally open, normally closed contacts, and relay coils are used within a format utilizing a left and a right vertical rail. Power flow (symbolic positive electron flow) is used to determine which coil or outputs are energized or deenergized.
(3) The machine is designed for the instrial environment from its basic concept; this protection is not added at a later date. The instrial environment includes unreliable AC power, high temperatures (0 to 60 degree Celsius), extremes of humidity, vibrations, RF noise, and other similar parameters.
General application areas
The programmable controller is used in a wide variety of control applications today, many of which were not economically possible just a few years ago. This is true for two general reasons: 1 there cost effectiveness (that is, the cost per I/O point) has improved dramatically with the falling prices of microprocessors and related components, and 2 the ability of the controller to solve complex computation and communication tasks has made it possible to use it where a dedicated computer was previously used.
Applications for programmable controllers can be categorized in a number of different ways, including general and instrial application categories. But it is important to understand the framework in which controllers are presently understood and used so that the full scope of present and future evolution can be examined. It is through the power of applications that controllers can be seen in their full light. Instrial applications include many in both discrete manufacturing and process instries. Automotive instry applications, the genesis of the programmable controller, continue to provide the largest base of opportunity. Other instries, such as food processing and utilities, provide current development opportunities.
There are five general application areas in which programmable controllers are used. A typical installation will use one or more of these integrated to the control system problem. The five general areas are explained briefly below.
Description
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the instry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.
Function characteristic
The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full plex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
Pin Description
VCC:Supply voltage.
GND:Ground.
Port 0:
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus ring accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes ring Flash programming,and outputs the code bytes ring programverification. External pullups are required ring programverification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups.Port 1 also receives the low-order address bytes ring Flash programming and verification.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2 output buffers can sink/source four TTL inputs.When 1s are written to Port 2 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-order address byte ring fetches from external program memory and ring accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, Port 2 emits the contents of the P2 Special Function Register.Port 2 also receives the high-order address bits and some control signals ring Flash programming and verification.
Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:
Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address ring accesses to external memory. This pin is also the program pulse input (PROG) ring Flash programming.In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped ring each access to external Data Memory.
If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only ring a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN
Program Store Enable is the read strobe to external program memory.When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped ring each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to VCC for internal program executions.This pin also receives the 12-volt programming enable voltage(VPP) ring Flash programming, for parts that require12-volt VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the ty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.
Figure 1. Oscillator Connections Figure 2. External Clock Drive Configuration
Idle Mode
In idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged ring this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution,from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.
Power-down Mode
In the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit from power-down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.
Program Memory Lock Bits
On the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.
When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched ring reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly
7. 求,一篇“单片机直流电机调速系统设计”的5000字毕业论文。
毕业论文是要根据你做的产品才写的论文。不过调速系统挺简单的,用PWM改变占空比来实现电流电压的改变-。-
8. 单片机英文文献及翻译 5000字左右
注意查收
9. 求关于单片机方面的5000字左右中英文对译(英译中)
单片机学习应中的六大重要部分
一、总线:我们知道,一个电路总是由元器件通过电线连接而成的,在模拟电路中,连线并不成为一个问题,因为各器件间一般是串行关系,各器件之间的连线并不很多,但计算机电路却不一样,它是以微处理器为核心,各器件都要与微处理器相连,各器件之间的工作必须相互协调,所以就需要的连线就很多了,如果仍如同模拟电路一样,在各微处理器和各器件间单独连线,则线的数量将多得惊人,所以在微处理机中引入了总线的概念,各个器件共同享用连线,所有器件的8根数据线全部接到8根公用的线上,即相当于各个器件并联起来,但仅这样还不行,如果有两个器件同时送出数据,一个为0,一个为1,那么,接收方接收到的究竟是什么呢?这种情况是不允许的,所以要通过控制线进行控制,使器件分时工作,任何时候只能有一个器件发送数据(可以有多个器件同时接收)。器件的数据线也就被称为数据总线,器件所有的控制线被称为控制总线。在单片机内部或者外部存储器及其它器件中有存储单元,这些存储单元要被分配地址,才能使用,分配地址当然也是以电信号的形式给出的,由于存储单元比较多,所以,用于地址分配的线也较多,这些线被称为地址总线。
二、数据、地址、指令:之所以将这三者放在一起,是因为这三者的本质都是一样的——数字,或者说都是一串‘0’和‘1’组成的序列。换言之,地址、指令也都是数据。指令:由单片机芯片的设计者规定的一种数字,它与我们常用的指令助记符有着严格的一一对应关系,不可以由单片机的开发者更改。地址:是寻找单片机内部、外部的存储单元、输入输出口的依据,内部单元的地址值已由芯片设计者规定好,不可更改,外部的单元可以由单片机开发者自行决定,但有一些地址单元是一定要有的(详见程序的执行过程)。数据:这是由微处理机处理的对象,在各种不同的应用电路中各不相同,一般而言,被处理的数据可能有这么几种情况:
1•地址(如MOV DPTR,#1000H),即地址1000H送入DPTR。
2•方式字或控制字(如MOV TMOD,#3),3即是控制字。
3•常数(如MOV TH0,#10H)10H即定时常数。
4•实际输出值(如P1口接彩灯,要灯全亮,则执行指令:MOV P1,#0FFH,要灯全暗,则执行指令:MOV P1,#00H)这里0FFH和00H都是实际输出值。又如用于LED的字形码,也是实际输出的值。
理解了地址、指令的本质,就不难理解程序运行过程中为什么会跑飞,会把数据当成指令来执行了。
三、P0口、P2口和P3的第二功能用法:初学时往往对P0口、P2口和P3口的第二功能用法迷惑不解,认为第二功能和原功能之间要有一个切换的过程,或者说要有一条指令,事实上,各端口的第二功能完全是自动的,不需要用指令来转换。如P3.6、P3.7分别是WR、RD信号,当微片理机外接RAM或有外部I/O口时,它们被用作第二功能,不能作为通用I/O口使用,只要一微处理机一执行到MOVX指令,就会有相应的信号从P3.6或P3.7送出,不需要事先用指令说明。事实上‘不能作为通用I/O口使用’也并不是‘不能’而是(使用者)‘不会’将其作为通用I/O口使用。你完全可以在指令中按排一条SETB P3.7的指令,并且当单片机执行到这条指令时,也会使P3.7变为高电平,但使用者不会这么去做,因为这通常这会导致系统的崩溃。
四、程序的执行过程: 单片机在通电复位后8051内的程序计数器(PC)中的值为‘0000’,所以程序总是从‘0000’单元开始执行,也就是说:在系统的ROM中一定要存在‘0000’这个单元,并且在‘0000’单元中存放的一定是一条指令。
五、堆栈: 堆栈是一个区域,是用来存放数据的,这个区域本身没有任何特殊之处,就是内部RAM的一部份,特殊的是它存放和取用数据的方式,即所谓的‘先进后出,后进先出’,并且堆栈有特殊的数据传输指令,即‘PUSH’和‘POP’,有一个特殊的专为其服务的单元,即堆栈指针SP,每当执一次PUSH指令时,SP就(在原来值的基础上)自动加1,每当执行一次POP指令,SP就(在原来值的基础上)自动减1。由于SP中的值可以用指令加以改变,所以只要在程序开始阶段更改了SP的值,就可以把堆栈设置在规定的内存单元中,如在程序开始时,用一条MOV SP,#5FH指令,就时把堆栈设置在从内存单元60H开始的单元中。一般程序的开头总有这么一条设置堆栈指针的指令,因为开机时,SP的初始值为07H,这样就使堆栈从08H单元开始往后,而08H到1FH这个区域正是8031的第二、三、四工作寄存器区,经常要被使用,这会造成数据的混乱。不同作者编写程序时,初始化堆栈指令也不完全相同,这是作者的习惯问题。当设置好堆栈区后,并不意味着该区域成为一种专用内存,它还是可以象普通内存区域一样使用,只是一般情况下编程者不会把它当成普通内存用了。
六、单片机的开发过程: 这里所说的开发过程并不是一般书中所说的从任务分析开始,我们假设已设计并制作好硬件,下面就是编写软件的工作。在编写软件之前,首先要确定一些常数、地址,事实上这些常数、地址在设计阶段已被直接或间接地确定下来了。如当某器件的连线设计好后,其地址也就被确定了,当器件的功能被确定下来后,其控制字也就被确定了。然后用文本编辑器(如EDIT、CCED等)编写软件,编写好后,用编译器对源程序文件编译,查错,直到没有语法错误,除了极简单的程序外,一般应用仿真机对软件进行调试,直到程序运行正确为止。运行正确后,就可以写片(将程序固化在EPROM中)。在源程序被编译后,生成了扩展名为HEX的目标文件,一般编程器能够识别这种格式的文件,只要将此文件调入即可写片
Singlechip study should be an important part in the six
First, the bus: we know that a circuit is always from the components through wires connected, and in analog circuits, the connection does not become a problem, because the devices are generally serial inter-relationship between the various devices connection is not much, but not the same as computer circuits, which is based on the microprocessor as the core, the device must be connected with the microprocessor, the device must be between the mutual coordination and so on need to connect on a lot of If still the same as analog circuits, in the microprocessor and a separate connection between the devices, the quantity line will be many alarmingly so in the microprocessor introced the concept of bus, all devices share the connection All devices of all eight data lines from eight public online, which is equivalent to all devices in parallel, but only this is not enough, if there is two devices send data simultaneously, a 0, a 1, then , the receiving party received what is it? This situation is not allowed, so to pass the line of control to control the device time job, any time there can be only one device to send data (which may have multiple devices simultaneously receiving). Device's data lines will be referred to as data bus, all the line of control devices known as control bus. Singlechip at internal or external memory and other devices have memory cells, these memory cells to be assigned addresses to use, the allocation of addresses is of course to give the form of electrical signals, and because memory cells are more so for address the allocation of more lines, these lines were known as the address bus.
Second, data, address, command: The reason why these three together, because these three are the essence is the same - figure, or are a string of'0 'and'1', composed of sequence . In other words, addresses, instructions are also data. Command: from single-chip chip designer provides a figure, it is consistent with our mnemonic commonly used commands have a strict one-to-one relationship, not by the developer to change the MCU. Address: Singlechip are looking for internal, external storage units, input and output port based on the value of the internal unit's address has been provided for the chip designers, and can not be changed, the external unit can be single-chip developers to decide, but Yes there is some address must be the unit (see proceres for the implementation process). Data: This is the object of treatment by the microprocessor, in a variety of different applications in different circuits, in general, the data may be processed so have several situations:
1 • address (such as MOV DPTR, # 1000H), that address 1000h into the DPTR.
2 • the way the words or control characters (such as MOV TMOD, # 3), 3 which controls the characters.
3 • constants (such as MOV TH0, # 10H) 10H that is constant from time to time.
4 • The actual output value (such as the mouth then P1 lantern light to light the whole, then the implementation of instruction: MOV P1, # 0FFH, to light the whole dark, then the implementation of instruction: MOV P1, # 00H) and 00H are here 0FFH actual output value. Another example is the font code for the LED, is the actual output value.
Understanding of the address, the nature of instructions, running is not difficult to understand why the process of running fly, the data will be implemented as instructions.
Three, P0 mouth, P2 and P3 the mouth of the second function Usage: often on P0 beginner I, P2 and P3 mouth I use the second function puzzled think the second function and the original features have a switch between the process, or that there have to be a directive, in fact, the port's second feature is completely automatic, no need to use command to convert. Such as P3.6, P3.7, respectively, are WR, RD signal, when the micro-chip RAM or external justifications machine has an external I / O port, they were used as the second function, can not be used as general-purpose I / O port to use, as long as one microprocessor implementation of the MOVX instruction 1, there will be a corresponding signal sent from the P3.6 or P3.7, no prior use instructions indicate. In fact 'can not be used as general-purpose I / O port use' is not 'should not' but (user) 'not' as a general-purpose I / O port to use. At command you can arrange a Medium of Instruction SETB P3.7, and when the single-chip implementation of this Article directions, P3.7 will also become high, but users will not do so, because This usually will lead to the collapse of the system.
Four, the program implementation process: single-chip power-on reset in 8051 after the program counter (PC) in the value of'0000 ', so the procere always'0000' unit begin implementation of, that is to say: the system's ROM must exist in the'0000 'in this unit, and'0000' in the storage unit must be a command.
Friday, the stack: the stack is a region, are used to store data, the region does not have any unique position, that is a part of internal RAM, special is its data storage and access methods, namely, the so-called 'advanced after that last-in first-out ', and the stack has a special data transmission command, ie' PUSH 'and' POP ', there is a special unit specifically for its services, that is, the stack pointer SP, when they first PUSH instruction, the SP on (at the original value of the foundation on) automatically add one, whenever the implementation of a POP instruction, SP on (at the original value basis) minus one automatically. Because of the value of SP can be used to change directions, so as long as the stage at the beginning of the proceedings to change the value of the SP, you can put the stack set up the required memory units, such as at the beginning of the proceedings, with a MOV SP, # 5FH instructions when put on the stack from the memory moles installed in the unit 60H start. The normal procere at the beginning of the total that there is a stack pointer of the instruction set, because at startup, SP initial value of 07H, thus the stack from the beginning the next unit 08h, and 08h to 1Fh in the region 8031 is the second, Three, four working registers area, often used, this will lead to data chaos. The author has prepared a different program, not exactly the same instructions to initialize the stack, which is the author's customary problem. When set up the stack area, does not mean that the region as a dedicated memory, it can be as common as the use of memory region, but under normal circumstances programming will not put it as an ordinary memory use
10. 单片机中英文翻译,5000字左右,十分感谢(花钱做毕业设计的不要回答了)
Getting Started with µVision2
The Keil Software 8051 development tools listed below are programs you use to compile your C code, assemble your assembly source files, link and locate object moles and libraries, create HEX files, and debug your target program.
µVision2 for Windows™ is an Integrated Development Environment that combines project management, source code editing, and program debugging in one single, powerful environment.
The C51 ANSI Optimizing C Cross Compiler creates relocatable object moles from your C source code.
The A51 Macro Assembler creates relocatable object moles from your 8051 assembly source code.
The BL51 Linker/Locator combines relocatable object moles created by the C51 Compiler and the A51 Assembler into absolute object moles.
The LIB51 Library Manager combines object moles into libraries that may be used by the linker.
The OH51 Object-HEX Converter creates Intel HEX files from absolute object moles.
The RTX-51 Real-time Operating System simplifies the design of complex, time-critical software projects.
Software Development Cycle
When you use the Keil Software tools, the project development cycle is roughly the same as it is for any other software development project.
1. Create a project, select the target chip from the device database, and configure the tool settings.
2. Create source files in C or assembly.
3. Build your application with the project manager.
4. Correct errors in source files.
5. Test the linked application.
µVision2 IDE
The µVision2 IDE combines project management, a rich-featured editor with interactive error correction, option setup, make facility, and on-line help. Use µVision2 to create your source files and organize them into a project that defines your target application. µVision2 automatically compiles, assembles, and links your embedded application and provides a single focal point for your development efforts.
LIB51 Library Manager
The LIB51 library manager allows you to create object library from the object files created by the compiler and assembler. Libraries are specially formatted, ordered program collections of object moles that may be used by the linker at a later time. When the linker processes a library, only those object moles in the library that are necessary to create the program are used.
BL51 Linker/Locator
The BL51 linker creates an absolute object mole using the object moles extracted from libraries and those created by the compiler and assembler. An absolute object file or mole contains no relocatable code or data. All code and data reside at fixed memory locations. The absolute object file may be used:
To program an EPROM or other memory devices,
With the µVision2 Debugger for simulation and target debugging,
With an in-circuit emulator for the program testing.
µVision2 Debugger
The µVision2 symbolic, source-level debugger is ideally suited for fast, reliable program debugging. The debugger includes a high-speed simulator that let you simulate an entire 8051 system including on-chip peripherals and external hardware. The attributes of the chip you use are automatically configured when you select the device from the Device Database.
The µVision2 Debugger provides several ways for you to test your programs on
real target hardware:
Install the MON51 Target Monitor on your target system and download your program using the Monitor-51 interface built-in to the µVision2 Debugger.
Use the Advanced GDI interface to attach use the µVision2 Debugger front end with your target system.
Monitor-51
The µVision2 Debugger supports target debugging using Monitor-51. The monitor program resides in the memory of your target hardware and communicates with the µVision2 Debugger using the serial port of the 8051 and a COM port of your PC. With Monitor-51, µVision2 lets you perform source-level, symbolic debugging on your target hardware.
RTX51 Real-Time Operating System
The RTX51 real-time operating system is a multitasking kernel for the 8051 microcontroller family. The RTX51 real-time kernel simplifies the system design, programming, and debugging of complex applications where fast reaction to time critical events is essential. The kernel is fully integrated into the C51 Compiler and is easy to use. Task description tables and operating system consistency are automatically controlled by the BL51 linker/locator.
C51 Optimizing C Cross Compiler
The Keil C51 Cross Compiler is an ANSI C Compiler that was written
specifically to generate fast, compact code for the 8051 microcontroller family.
The C51 Compiler generates object code that matches the efficiency and speed
of assembly programming.
Using a high-level language like C has many advantages over assembly language
programming:
Knowledge of the processor instruction set is not required. Rudimentary knowledge of the memory structure of the 8051 CPU is desirable (but not necessary).
Details like register allocation and addressing of the various memory types and data types is managed by the compiler.
Programs get a formal structure (which is imposed by the C programming language) and can be divided into separate functions. This contributes to source code reusability as well as better overall application structure.
The ability to combine variable selection with specific operations improves program readability.
Keywords and operational functions that more nearly resemble the human thought process may be used.
Programming and program test time is drastically reced.
The C run-time library contains many standard routines such as: formatted output, numeric conversions, and floating-point arithmetic.
Existing program parts can be more easily included into new programs because of molar program construction techniques.
The language C is a very portable language (based on the ANSI standard) that enjoys wide popular support and is easily obtained for most systems.
Existing program investments can be quickly adapted to other processors as needed.
Code Optimizations
The C51 Compiler is an aggressive optimizing compiler that takes numerous steps to ensure that the code generated and output to the object file is the most efficient (smallest and/or fastest) code possible. The compiler analyzes the generated code to proce the most efficient instruction sequences. This ensures that your C program runs as quickly and effectively as possible in the least amount of code space.
The C51 Compiler provides nine different levels of optimizing. Each increasing level includes the optimizations of levels below it. The following is a list of all optimizations currently performed by the C51 Compiler.
General Optimizations
Constant Folding: Constant values occurring in an expression or address calculation are combined as a single constant.
Jump Optimizing: Jumps are inverted or extended to the final target address when the program efficiency is thereby increased.
Dead Code Elimination: Code that cannot be reached (dead code) is removed from the program.
Register Variables: Automatic variables and function arguments are located in registers whenever possible. No data memory space is reserved for these variables.
Parameter Passing Via Registers: A maximum of three function arguments
may be passed in registers.
Global Common Subexpression Elimination: Identical subexpressions or address calculations that occur multiple times in a function are recognized and calculated only once whenever possible.
Common Tail Merging: Common instruction blocks are merged together using jump instructions.
Re-use Common Entry Code: Common instruction sequences are moved in front of a function to rece code size.
Common Block Subroutines: Multiple instruction sequences are packed into subroutines. Instructions are rearranged to maximize the block size.
中文译文
Keil C 简介
Keil Software 的8051开发工具提供以下程序,你可以用它们来编译你的C源码,汇编你的汇编源程序,连接和重定位你的目标文件和库文件,创建HEX文件,调试你的目标程序。
Windows应用程序uVision2是一个集成开发环境,它把项目管理,源代码编辑,程序调试等集成到一个功能强大的环境中。
C51美国标准优化C交叉编译器从你的C源代码产生可重定位的目标文件。
A51宏汇编器从你的8051汇编源代码产生可重定位的目标文件。
BL51连接/重定位器组合你的由C51和A51产生的可重定位的目标文件,生成绝对目标文件。
LIB51库管理器组合你的目标文件,生成可以被连接器使用的库文件。
OH51目标文件到HEX格式的转换器从绝对目标文件创建Intel HEX 格式的文件。
RTX-51实时操作系统简化了复杂和对时间要求敏感的软件项目。
软件开发流程
当你使用Keil Software工具时,你的项目开发流程和其它软件开发项目的流程极其相似。
1. 创建一个项目,从器件库中选择目标器件,配置工具设置。
2. 用C语言或汇编语言创建源程序。
3. 用项目管理器实现你的应用。
4. 修改源程序中的错误。
5. 测试,连接应用。
uVision2 IDE
uVision2 集成开发环境集成了一个项目管理器,一个功能丰富、有错误提示的编辑器,以及设置选项,生成工具,在线帮助。利用uVision2创建你的源代码并把它们组织到一个能确定你的目标应用的项目中去。uVision2自动编译,汇编,连接你的嵌入式应用,并为你的开发提供一个单一的焦点。
C51编译器和A51汇编器
源代码由uVision2 IDE创建,并被C51编译或A51汇编。编译器和汇编器从源代码生成可重定位的目标文件。Keil C51编译器完全遵照ANSI C语言标准,支持C语言的所有标准特性。另外,直接支持8051结构的几个特性被添加到里面。Keil A51宏汇编器支持8051及其派生系列的全部指令集。
LIB51 库管理器
LIB51库管理器允许你从由编译器或汇编器生成的目标文件创建目标库。库是一种被特别地组织过并在以后可以被连接重用的对象模块。当连接器处理一个库时,仅仅那些被使用的目标模块才被真正使用。
BL51 连接器/定位器
BL51 连接器/定位器利用从库中提取的目标模块和由编译器或汇编器生成的目标模块创建一个绝对地址的目标模块。一个绝对地址目标模块或文件包含不可重定位的代码和数据。所有的代码和数据被安置在固定的存储器单元中。此绝对地址目标文件可以用来:
写入EPROM或其它存储器件。
由uVision2调试器使用来模拟和调试。
由仿真器用来测试程序。
uVision2 调试器
uVision2源代码级调试器是一个理想地快速,可靠的程序调试器。此调试器包含一个高速模拟器,能够让你模拟整个8051系统,包括片上外围器件和外部硬件。当你从器件库中选择器件时,这个器件的特性将自动配置。
uVision2调试器为你在实际目标板上测试你的程序提供了几种方法:
安装MON51目标监控器到你的目标系统并且通过Monitor-51接口下载你的程序。
利用高级的GDI(AGDI)接口,把uVision2调试器绑定到你的目标系统。
Monitor-51
uVision2调试器支持用Monitor-51进行目标板调试。此监控程序驻留在你的目标板的 存储器里,它利用串口和uVision2调试器进行通信。利用Monitor-51,uVision2调试器 可以对你的目标硬件实行源代码级的调试。
RTX51实时操作系统
RTX51实时操作系统是一个针对8051系列的多任务核。RTX51实时内核从本质上简化了对实时事件反应速度要求高的复杂应用系统的设计,编程和调试。RTX51实时内核是完全集成到C51编译器中的,从而方便使用。任务描述表和操作系统的连接由BL51连接器/定位器自动控制。
C51优化的C语言交叉编译器
Keil C51交叉编译器是一个基于ANSI C标准的针对8051系列MCU的C编译器,生成的可执行代码快速、紧凑,在运行效率和速度上可以和汇编程序得到的代码相媲美。
和汇编语言相比,用C语言这样的高级语言有很多优势,比如:
对处理器的指令集不必了解,8051 CPU的基本结构可以了解,但不是必须的。
寄存器的分配以及各种变量和数据的寻址都由编译器完成。
程序拥有了正式的结构(由C语言带来的),并且能被分成多个单独的子函数。这使整个应用系统的结构变得清晰,同时让源代码变得可重复使用。
选择特定的操作符来操作变量的能力提高了源代码的可读性。
可以运用和人的思维很接近的词汇和算法表达式。
编写程序和调试程序的时间得到很大程度的缩短。
C运行连接库包含一些标准的子程序,如:格式化输出,数字转换,浮点运算。
由于程序的模块结构技术,使得现有的程序段可以很容易的包含到新的程序中去。
ANSI 标准的C语言是一种丰常方便的,获得广泛应用的,在绝大部分系统中都能够很容易得到的语言。
因此,如果需要,现有的程序可以很快地移植到其他的处理器上,节省投资。
代码优化
C51是一个杰出的优化编译器,它通过很多步骤以确保产生的代码是最有效率的(最小和/或最快)。编译器通过分析初步的代码 产生最终的最有效率的代码序列,以此来保证你的C语言程序占用最少空间的同时运行的快而有效。
C51编译器提供9个优化级别。每个高一级的优化级别都包括比它低的所有优化级别的优化内容。以下列出的是目前C51编译器提供的所有优化级别的内容:
常量折叠:在表达式及寻址过程中出现的常量被综合为一个单个的常量。
跳转优化:采用反转跳转或直接指向最终目的的跳转,从而提升了程序的效率。
哑码消除:永远不可能执行到的代码将自动从程序中剔除。
寄存器变量:只要可能,局部变量和函数参数被放在CPU寄存器中,不需要为这些变量再分配存储器空间。
通过寄存器传递参数:最多三个参数通过寄存器传递。
消除全局公用的子表达式:只要可能,程序中多次出现的相同的子表达式或地址计算表达式将只计算一次。
合并相同代码:利用跳转指令,相同的代码块被合并。
重复使用入口代码:需要多次使用的共同代码被移到子程序的前面以缩减代码长度。
公共块子程序:需要重复使用的多条指令被提取组成子程序。指令被重新安排以最大化一个共用子程序的长度。
上面是搜来的建议去中国知网,那里的很多也很权威