at89c52单片机中英文资料对照外文翻译文献综述(2)

2019-03-04 13:03

as shown in the following table.

Port 1 also receives the low-order address bytes during 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 (IIL) because of the internal pullups.

Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pullups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register.

Port 2 also receives the high-order address bits and some control signals during 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 shown in the following table.

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 is an output pulse for latching the low byte of the address during accesses to external memory.This pin is also the program pulse input (PROG) during 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 during 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 during 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 AT89C52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during 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) during Flash programming when 12-volt programming is selected.

? XTAL1:Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

? XTAL2:Output from the inverting oscillator amplifier.

? Special Function Registers:A map of the on-chip memory area called the Special Function Register (SFR) space is shown in Table 1.

Note that not all of the addresses are occupied,and unoccupied addresses may not be implemented on the chip.Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect.

User software should not write 1s to these unlisted locations,since they may be used in future products to invoke new features. In that case, the reset or inactive

values of the new bits will always be 0.

? Data Memory:The AT89C52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. That means the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space.

When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions that use direct addressing access SFR space.

Timer 0 and 1:Timer 0 and Timer 1 in the AT89C52 operate the same way as Timer 0 and Timer 1 in the AT89C51.

Timer 2:Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter. The type of operation is selected by bit C/T2 in the SFR T2CON (shown in Table 2).Timer 2 has three operating modes: capture, auto-reload (up or down counting), and baud rate generator. The modes are selected by bits in T2CON, as shown in Table 3.

Timer 2 consists of two 8-bit registers, TH2 and TL2. In the Timer function, the TL2 register is incremented every machine cycle. Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the oscillator frequency.

In the Counter function, the register is incremented in response to a 1-to-0 transition at its corresponding external input pin, T2. In this function, the external input is sampled during S5P2 of every machine cycle. When the samples show a high in one cycle and a low in the next cycle, the count is incremented. The new count value appears in the register during S3P1 of the cycle following the one in which the transition was detected. Since two machine cycles (24 oscillator periods) are required to recognize a 1-to-0 transition,the maximum count rate is 1/24 of the oscillator frequency. To ensure that a given level is sampled at least once before it changes, the level should be held for at least one full machine cycle.

AT89C52单片机介绍

1. 单片机的发展

单片机因将其主要组成部分集中在一个芯片上得名,即中央处理器CPU。存储器RAM﹑只读存储器ROM﹑中断系统﹑定时器/计数器以及I/O口电路等主要微型机部分,集中在一个芯片上。虽然单片机只是一个芯片,但从组成和功能上看,它已具有了计算机系统的属性,为此称它为单片机微型计算机SCMS简称单片机。

1976年Inter公司推出了8位的MCS-48系列单片机,在以后20多年的时间里得到了不断的发展和广泛的应用。1980年该公司推出了高性能的MCS-51系列单片机。这类单片机的功能﹑寻址范围都比早期有所提高,目前应用也比较多。1982年该公司又推出了性能更高的16位单片机MCS-96系列的。单片机发展具有性能越来越完善﹑品种越来越多的特点。

2. 采用单片机的优点

? 硬件通用化,应用灵活化。

? 具有记忆﹑计算和查表功能。可制成常规无法制成的仪器仪表。 ? 指令系统适合实时控制。 ? 体积小,执行速度快。 ? 可靠性高,抗干扰能力强。 ? 温度使用范围广。 ? 断电保护完善。 ? 产品开发周期短。

? 同一系列和配套接口芯片种类多,功能全,便于挑选来实现最小系统。 ? 根据高科技要求,集成常用软件,硬件(如PL/M,BASIC,FORTH语言,DAM波形发生器,模拟开关等)应用灵活。

因此,本设计采用以单片机位核心的部件设计。

3. AT89C52单片机的结构

AT89C52单片机主要性能参数:

? 与MCS-51产品指令和引脚完全兼容

8K字节可编程/擦写Flash闪速存储器 1000次擦写周期

全静态操作:0Hz—24MHz 三级加密程序存储器 256×8字节内部RAM 32个可编程I/O口线 3个16位定时/计数器 8个中断源

可编程串行UART通道 ? 低功耗空闲和掉电模式 3.1 CPU结构

CPU是单片机的核心部件,它由运行算术和控制器等组成。 1. 运算器

运算器的功能是进行算术运算和逻辑运算,可以对半字节﹑单字节等数据进行操作。

2. 程序计数器PC

它用来存放下一条要执行的指令的地址。当一条指令按照PC所指的地址从存储器中取出后,PC会自动加1,即指向下一条指令。

(3)指令积寄存器

指令寄存器中存放指令代码。CPU执行指令时,由程序存储器中读取的指令代码送入指令寄存器,经译码器译码后,由定时与控制电路发出相应的控制信号。完成指令功能。

3.2 存储器 1. 程序存储器

用于存放程序及表格常数。对于8751,EA=1时,片内程序存储器占用0000H~0FFFH时,则从片外程序存储器取指令。 2. 数据存储器

8751单片机数据存储器无论在物理上和逻辑上都分为两地址空间,一个为内部数据存储器,访问内部数据存储器用MOV指令,另一个为外部数据存储器,访问外部数据存储器用MOVX指令,寻址方式间接寻址。

3.3 专用功能寄存器

MCS-51单片机内的锁存器、定时器、串行口数据缓冲器以及各种控制寄存器和状态寄存器都是以专用功能寄存器的形式出现的。它们分散的分布在内部TAM地址空间范围(80H~FDH)内。

8751内的特殊功能寄存器包括运算寄存器、地址寄存器、口锁存器及用于中断、计数/定时和串行口管理的寄存器。

运算寄存器包括累加器A﹑寄存器B及程序状态字寄存器PSW。

地址寄存器包括堆栈指示器SP和数据地址指示器DPTR。MCS-51单片机的SP为8位,堆栈在内部RAM中的位置比较灵活。数据指针DPTR是一个16位寄存器,其高位字节用DPh表示,地位用DPI表示,即可以作为一个16位寄存器DPTR来处

? ? ? ? ? ? ? ? ?


at89c52单片机中英文资料对照外文翻译文献综述(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:百家争鸣教学设计

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: