中英文翻译 AT89C52 单片机.doc_第1页
中英文翻译 AT89C52 单片机.doc_第2页
中英文翻译 AT89C52 单片机.doc_第3页
中英文翻译 AT89C52 单片机.doc_第4页
中英文翻译 AT89C52 单片机.doc_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

AT89C2051AT89C2051 Reference ManualAT89C2051 is made in the ATMEL Corporation, which is the low-voltage, high-performance CMOS8-bit microcontroller.Tablets containing repeated 2k bytes of program memory erasable read-only (PEROM) and random 128bytes data memory (RAM), device using ATMELs high density, non-volatile memory technology, Compatible with the standard of MCS-51 instruction set, built-chip 8-bit general-purpose central processing unit and repeatedly write the Flash memory, which can effectively reduce the development costs. AT89C2051 features a powerful single-chip can provide cost-effective in many Applications.AT89C2051 MCU MCU is a series of 51 members, is the 8051 version of SCM. Internal comes with a programmable EPROM 2 k bytes of high-performance microcontrollers. With the industry standard MCS-51 orders and pin-compatible, so it is a powerful micro-controllers, many embedded control applications, it provides a highly flexible and effective solutions. AT89C2051 has the following characteristics: 2 k bytes EPROM, 128 bytes RAM, 15 I / O lines, two 16 regular / counter, two five vector interrupt structure, a full two-way serial port, and includes Precision analog comparator and on-chip oscillator, a 4.25 V to 5.5 V voltage scope of work and 12 MHz/24MHz frequency, and also offers the encryption array of two program memory locking, power-down and the clock circuit. In addition, AT89C2051 also supports two kinds of software-selectable power-saving mode power supply. During my free time, CPU stop and let RAM, timing / counter, serial port and interrupt system to continue to work. Power-down can preserve the contents of RAM, but will stop oscillator chip-to prohibit all the other functions until the next hardware reset. AT89C2051 have two 16 time / counter register Timer0t Timer1. As a timer, each machine cycle register an increase, such registers to counting machine cycle. Because a machine cycle is 12 oscillator cycles, the count rate is the frequency oscillator 1 / 12. As a counter, the register in the corresponding external input pin P3.4/T0 and P3.5/T1 emerged from the 1-0 when the changes by 1. Two machine cycle because of the need to identify a 1-0 change, the largest count rate is the frequency oscillator 1 / 24, the external input P3.2/INT0 and P3.3/INT1 programming, for Measuring the pulse width of the door. Therefore, AT89C2051 constitute the SCM system is a simple structure, the cost of the cheapest, most efficient micro-control system, eliminating the external RAM, ROM and interface devices, reducing hardware costs, cost savings, improved The cost-effective system. Clock circuit MCU clock signal used to provide various micro-chip microcontroller operation of the benchmark time, the clock signal is usually used by the form of two circuits: the internal and external shocks oscillation. MCS-51 has a microcontroller internal oscillator for a reverse of the high-gain amplifier, pin XTALl and XTAL2 are here to enlarge the electrical inputs and outputs, as in-house approach, a simple circuit, from the clock Signal relatively stable, and actually used often in this way, as shown in Figure 3-1 in its external crystal oscillator (crystal) or ceramic resonator constituted an internal oscillation, on-chip high-gain amplifier and a reverse Feedback components of the chip quartz crystal or ceramic resonator together to form a self oscillator and generate oscillation clock pulse. Figure 3-1 in the external crystal and capacitors C1 and C2 constitute a parallel resonant circuits, their stability from the oscillation frequency, rapid start-up role, and its value are about 33 PF, crystal frequency of elections 12 MHz. Reset Circuit In order to initialize the internal MCU some special function register to be reset by the way, will reset after the CPU and system components identified in the initial state, and from the initial state began work properly. MCU is reset on the circuit to achieve, in the normal operation of circumstances, as long as the RST-pin on a two machine cycle time over the high, can cause system reset, but if sustained for the RST-pin HIGH, in a circle on the MCU reset state. After the system will reset input / output (I / 0) home port register for the FFH, stack pointer SP home for 07 H, SBUF built-in value for the indefinite, all the rest of the register-0, the status of internal RAM from the impact of reduction, On the system, when the contents of RAM is volatile. Reset operation There are two situations in which a power-on reset and manual (switch) reduction. The system uses a power-on reset mode. Figure 3-1 in the R0 and C0 formed a power-on reset circuit, and its value for R for 8.2 K, C for the 10 uF.Main features:Compatible the MCS51 command system;Contains the 2KB memory re-programming FLASH (1000);2.7 6V voltage range;the whole Static work: 0Hz 24KHz;Secrets 2 Program Memory Lock128 8-bit internal RAM15 programmable I / O linesTwo 16-bit timer / counter6 interrupt sources, two external interrupt sourcesProgrammable Serial ChannelHigh Precision Voltage Comparator (P1.0,P1.1,P3.6);Have the output port of the LED direct drive Low-power idle and power-down mode The pin Picture of AT89C2051Picture one the pin of AT89C2051AT89C2051s functional description:VCC: Power Supply VoltageGND: landP1 port: P1 mouth is a group of 8-bit bi-directional I / O interface, P1.2 P1.7 provide internal pull-up resistor,P1.0 and P1.1 internal supreme pull-up resistor. P1 mouth output buffer can absorb the current 20mA and direct-drive LED.When Programming and calibration, P1 mouth as the eighth address receive.P3 mouth: P3 port P3.0 P3.5, P3.7 is the internal pull-up resistor with the seven bi-directional I / O interface. Did not bring out the P3.6,It as a generic I / O port, but can not visit. Can be used as a fixed-chip input comparator output signal. when P3 write 1, they were highed the internal pull-up resistor can be raised as an input port.P3 port special function as shown in table 1:Table 1 P3 mouths special featuresPINfunctional characteristicsP3.0RXDP3.1TXDP3.2P3.3P3.4T0P3.5T1RST:Reset output. When the oscillator device reset, RST pin to maintain the high level of two machine cycle time.XTAL1: the RP-oscillator amplifier and internal clock generator input.XTAL2: RP-oscillator output amplifier.TimerOverview of the Timer 89C2051 single-chip-chip has two 16-bit timer / counter, That is the timer 0 (T0) and Timer 1 (T1). They all have from time to time and event count function, Can be used for timing control, delay of external events, such as counting and testing occasions. Timers T0 and T1 two 16-bit timers in fact is 16-bit counter plus 1. Among them, T0 compositioned by the two 8-bit special function registers TH0 and TL0; T1 posed by the TH1 and TL1. These functions were controled by the special function registers TMOD and TCON When set to the work in the timing, Through the pin count of the external pulse signal. When the input pulse signal generated by the falling edge of 1-0, The value of timer plus 1. At of every machine cycle during the S5P2 sampling pin T0 and T1 the input level, if a machine cycle before sample value of 1, The next machine cycle sampling value is 0, The counter plus 1. Since then during S3P1 of the machine cycle, New value will into the counter.so Detection of a 1-0 transition of the two machine cycles,So The maximum count frequency of oscillation frequency of 1 / 24. In addition to the option of work from time to time or count,Each timer / counter have four kinds of work mode, That is, each of timer circuit kinds of four constitute a structural modelTwo low-power modeIdle modeIn idle mode, CPU to maintain sleep and all-chip peripherals remain active, this way generated in Software, At this point, Chip RAM and all the contents of special function registers remain unchanged. Idle mode was terminated by any interrupt request permission to or hardware reset.P1.0 and P1.1 ,in the non-use of external pull-up resistor on the case should be set to 0, Or in the use of pull-up resistor is set to 1.It should be noted that: when uses of hardware reset Termination idle mode, AT89C2051 is usually stopped from the program until the internal reset control of the two machine cycles before the restore procedure Service. In this case the hardware within the prohibition of the reading and writing of internal RAM, However, to allow access to ports, To eliminate the Hardware reset in the idle mode of port accidents may write, In principle, to enter the idle mode of instruction should not be under the command of a pin or an external memory port for a visit.Power-down modeIn power-down mode, the oscillator to stop working, enter the power-down mode ,Instructions, who was the last one, the implementation of the Directive, Chip RAM and all the contents of special function registers the termination of the previous power-down mode be frozen. To withdraw from power-down mode is the only way to reset the hardware, Reset will redefine all the Special Function Registers but Does not change the contents of RAM before the the Vcc work returned to normal levels Shall be null and void and must be reset to maintain a certain period of time in order to restart and oscillator stabilityP1.0 and P1.1 in the non-use of external pull-up resistor on the case should be set to 0, Or in the use of pull-up resistor is set to 1.OscillatorOscillator connected clientXTAL1: RP-oscillator amplifier and internal clock generator inputXTAL2: RP-oscillator amplifier outputCharacteristics of Oscillator XTAL1, XTAL2 ware the RP-chip oscillator amplifier inputs and outputs, Quartz crystal can be composed of the clock oscillator or ceramic oscillator, For more information from the external input clock driver AT89C2051, XTAL1 input clock signal from, XTAL2 should be left vacant.As the input to the internal circuit is a 2-flip-flop, Therefore, the external clock signal input without special requirements, However, it must comply with the maximum level and minimum norms and timing中文翻译:AT89C2051AT89C2051数据参考手册AT89C2051是美国ATMEL公司生产的低电压、高性能CMOS8位单片机,片内含2k bytes的可反复擦写的只读程序存储器(PEROM)和128bytes的随机数据存储器(RAM),器件采用ATMEL公司的高密度、非易失性存储技术生产,兼容标准MCS-51指令系统,片内置通用8位中央处理器和可反复擦写的Flash存储器,可有效地降低开发成本。功能强大AT89C2051单片机可提供许多高性价比的应用场合。AT89C2051单片机是51系列单片机的一个成员,是8051单片机的简化版。内部自带一个2k字节可编程EPROM的高性能微控制器。它与工业标准MCS-51的指令和引脚兼容,因而是一种功能强大的微控制器,它对很多嵌入式控制应用提供了一个高度灵活有效的解决方案。AT89C2051有以下特点:2k字节EPROM、128字节RAM、15根I/O线、2 个16位定时/计数器、5个向量二级中断结构、1个全双向的串行口、并且内含精密模拟比较器和片内振荡器,具有4.25V至5.5V的电压工作范围和12MHz/24MHz工作频率,同时还具有加密阵列的二级程序存储器加锁、掉电和时钟电路等。此外,AT89C2051还支持二种软件可选的电源节电方式。空闲时,CPU停止,而让RAM、定时/计数器、串行口和中断系统继续工作。可掉电保存RAM的内容,但可使振荡器停振以禁止芯片所有的其它功能直到下一次硬件复位。 T89C2051有2个16位计时/计数器寄存器Timer0t Timer1。作为一个定时器,每个机器周期寄存器增加1,这样寄存器即可计数机器周期。因为一个机器周期有12个振荡器周期,所以计数率是振荡器频率的1/12。作为一个计数器,该寄存器在相应的外部输入脚P3.4/T0和P3.5/T1上出现从1至0的变化时增1。由于需要二个机器周期来辨认一次1到0的变化,所以最大的计数率是振荡器频率的1/24,可以对外部的输入端P3.2/INT0和P3.3/INT1编程,便于测量脉冲宽度的门。因此,AT89C2051构成的单片机系统是具有结构最简单、造价最低廉、效率最高的微控制系统,省去了外部的RAM、ROM和接口器件,减少了硬件开销,节省了成本,提高了系统的性价比。时钟电路单片机的时钟信号用来提供单片机片内各种微操作的时间基准,时钟信号通常用两种电路形式得到:内部振荡和外部振荡。MCS-51单片机内部有一个用于构成振荡器的高增益反向放大器,引脚XTALl和XTAL2分别是此放大电器的输入端和输出端,由于采用内部方式时,电路简单,所得的时钟信号比较稳定,实际使用中常采用这种方式,如图3-1所示在其外接晶体振荡器(简称晶振)或陶瓷谐振器就构成了内部振荡方式,片内高增益反向放大器与作为反馈元件的片外石英晶体或陶瓷谐振器一起可构成一个自激振荡器并产生振荡时钟脉冲。图3-1中外接晶体以及电容C2和C1构成并联谐振电路,它们起稳定振荡频率、快速起振的作用,其值均为33PF左右,晶振频率选12MHz。复位电路:为了初始化单片机内部的某些特殊功能寄存器,必须采用复位的方式,复位后可使CPU及系统各部件处于确定的初始状态,并从初始状态开始正常工作。单片机的复位是靠外电路来实现的,在正常运行情况下,只要RST引脚上出现两个机器周期时间以上的高电平,即可引起系统复位,但如果RST引脚上持续为高电平,单片机就处于循环复位状态。复位后系统将输入/输出(I/0)端口寄存器置为FFH,堆栈指针SP置为07H, SBUF内置为不定值,其余的寄存器全部清0,内部RAM的状态不受复位的影响,在系统上电时RAM的内容是不定的。复位操作有两种情况,即上电复位和手动(开关)复位。本系统采用上电复位方式。图3-1中R0和C0组成上电复位电路,其值R取为8.2K, C取为10uF。3.2主要功能特性:*兼容MCS51指令系统;*2KB可重编程FLASH存储器(1000次);*2.76V电压范围;*全静态工作:0Hz24KHz;*2级程序存储器保密锁定;* 1288位内部RAM;*15条可编程I/O线; *两个16位定时器/计数器;*6个中断源,两个外部中断源;*可编程串行通道;*高精度电压比较器(P1.0,P1.1,P3.6); *直接驱动LED的输出端口;*低功耗空闲和掉电模式AT89C2051的管脚引脚图如图2所示。图1 AT89C2051封装管脚引脚图AT89C2051引脚功能说明:VCC:电源电压GND:地P1口:P1口是一组8位双向I/O接口,P1.2P1.7提供内部上拉电阻,P1.0和P1.1内部无上拉电阻。P1口输出缓冲器可吸收20mA的电流并可直接驱动LED。编程和校验时, P1口作为第八位地址接收。P3口:P3口的P3.0P3.5、P3.7是带有内部上拉电阻的7个双向I/O接口。P3.6没有引出,它作为一个通用的I/O口,但是不可访问。可作为固定输入的片内比较器的输出信号。当P3口写入1时,它们被内部的上拉电阻拉高并可作为输入端口。P3口的特殊功能如表1所示:RST:复位输出。当振荡器复位器件时,要保持RST脚两个机器周期的高电平时间。XTAL1:振荡器的反相放大器及内部时钟发生器的输入端。XTAL2:振荡器反相放大器的输出端。表1 P3口的特殊功能引脚功能特

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论