欢迎来到沃文网! | 帮助中心 分享知识,传播智慧!
沃文网
全部分类
  • 教学课件>
  • 医学资料>
  • 技术资料>
  • 学术论文>
  • 资格考试>
  • 建筑施工>
  • 实用文档>
  • 其他资料>
  • ImageVerifierCode 换一换
    首页 沃文网 > 资源分类 > DOC文档下载
    分享到微信 分享到微博 分享到QQ空间

    基于AT89C52单片机的交通灯控制系统的设计(外文翻译).doc

    • 资源ID:850580       资源大小:488KB        全文页数:19页
    • 资源格式: DOC        下载积分:10积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: QQ登录 微博登录
    二维码
    微信扫一扫登录
    下载资源需要10积分
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,下载更划算!
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    基于AT89C52单片机的交通灯控制系统的设计(外文翻译).doc

    1、电子与信息工程学院 本科毕业论文(设计)外 文 文 献 翻 译译文题目: 8-bit Microcontroller With 8K Bytes Flash AT89C52 学生姓名: 专 业: 电气工程及其自动化 指导教师: 2012年11月 外文资料8-bit Microcontroller With 8K Bytes Flash AT89C52FeaturesCompatible with MCS-51 Products8K Bytes of In-System Reprogrammable Flash MemoryEndurance: 1,000 Write/Erase CyclesF

    2、ully Static Operation: 0 Hz to 24 MHzThree-level Program Memory Lock256 x 8-bit Internal RAM32 Programmable I/O LinesThree 16-bit Timer/CountersEight Interrupt SourcesProgrammable Serial ChannelLow-power Idle and Power-down ModesDescriptionThe AT89C52 is a low-power, high-performance CMOS 8-bit micr

    3、ocomputer with 8K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 and 80C52 instruction set and pin out. The on-chip Flash allows the program memor

    4、y 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 AT89C52 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Pin

    5、ConfigurationsBlock DiagramPin DescriptionVCCSupply voltage.GNDGround.Port 0Port 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 high-impedance inputs. Port 0 can also be configured t

    6、o be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during prog

    7、ram verification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally

    8、 being pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives t

    9、he low-order address bytes during Flash programming and verification. Port 2Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. 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 pull-ups and can be used

    10、as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memories that use 16-bit addresses (MOVX DPTR).

    11、 In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memories 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 F

    12、lash programming and verification.Port 3Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. As inputs, Port 3 pins th

    13、at are externally being pulled low will source current (IIL) because of the pull-ups.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.RSTReset input. A high o

    14、n this pin for two machine cycles while the oscillator is running resets the device.ALE/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 () during Flash programming. In normal operation, ALE

    15、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 bi

    16、t 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.Program Store Enable is the read strobe to external program memory. When the AT89C52 is executing code

    17、 from external program memory, is activated twice each machine cycle, except that two activations are skipped during each access to external data memory./VPPExternal Access Enable. must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at

    18、0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, 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.XT

    19、AL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Special Function RegistersA map of the on-chip memory area called the Special Function Register (SFR) space is shown in the Table 1.Note that not all o

    20、f 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

    21、in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0.Timer 2 Registers Control and status bits are contained in registers T2CON and T2MOD for Timer 2. The register pair (RCAP2H, RCAP2L) are the Capture/Reload registers for Timer 2 in

    22、16-bit capture mode or 16-bit auto-reload mode.Interrupt Registers The individual interrupt enable bits are in the IE register. Two priorities can be set for each of the six interrupt sources in the IP register.Data MemoryThe AT89C52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a

    23、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

    24、 the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions that use direct addressing access SFR space. For example, the following direct addressing instruction accesses the SFR at location 0A0H .MOV 0A0H, #dataInstructions that use indirect addressing access the upper 128 bytes of

    25、RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H).MOV R0, #dataNote that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM are available as sta

    26、ck space.Timer 0 and 1Timer 0 and Timer 1 in the AT89C52 operate the same way as Timer 0 and Timer 1 in the AT89C51.Timer 2Timer 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.Timer 2 has three operat

    27、ing 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 consist

    28、s 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

    29、 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-

    30、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.Capture ModeIn the capture mode, two options are selected by bit EXEN2 in T2CON. If EXEN2 =

    31、0, Timer 2 is a 16-bit timer or counter which upon overflow sets bit TF2 in T2CON.This bit can then be used to generate an interrupt. If EXEN2 = 1, Timer 2 performs the same operation, but a 1-to-0 transition at external input T2EX also causes the current value in TH2 and TL2 to be captured into RCA

    32、P2H and RCAP2L, respectively. In addition, the transition at T2EX causes bit EXF2 in T2CON to be set. The EXF2 bit, like TF2 can generate an interrupt. The capture mode is illustrated in Figure 1.Auto-reload (Up or Down Counter)Timer 2 can be programmed to count up or down when configured in its 16-

    33、bit auto-reload mode. This feature is invoked by the DCEN (Down Counter Enable) bit located in the SFR T2MOD. Upon reset, the DCEN bit is set to 0 so that timer 2 will default to count up. When DCEN is set, Timer 2 can count up or down, depending on the value of the T2EX pin.Figure 2 shows Timer 2 a

    34、utomatically counting up when DCEN = 0. In this mode, two options are selected by bit EXEN2 in T2CON. If EXEN2 = 0, Timer 2 counts up to 0FFFFH and then sets the TF2 bit upon overflow. The overflow also causes the timer registers to be reloaded with the 16-bit value in RCAP2H and RCAP2L. The values

    35、in Timer in Capture ModeRCAP2H and RCAP2L are preset by software. If EXEN2 = 1, a 16-bit reload can be triggered either by an overflow or by a 1-to-0 transition at external input T2EX. This transition also sets the EXF2 bit. Both the TF2 and EXF2 bits can generate an interrupt if enabled. Setting th

    36、e DCEN bit enables Timer 2 to count up or down, as shown in Figure 3. In this mode, the T2EX pin controls the direction of the count. A logic 1 at T2EX makes Timer 2 count up. The timer will overflow at 0FFFFH and set the TF2 bit. This overflow also causes the 16-bit value in RCAP2H and RCAP2L to be

    37、 reloaded into the timer registers, TH2 and TL2, respectively. A logic 0 at T2EX makes Timer 2 count down. The timer underflows when TH2 and TL2 equal the values stored in RCAP2H and RCAP2L. The underflow sets the TF2 bit and causes 0FFFFH to be reloaded into the timer registers. The EXF2 bit toggle

    38、s whenever Timer 2 overflows or underflows and can be used as a 17th bit of resolution. In this operating mode, EXF2 does not flag an interrupt.外文资料译文:8位8字节闪存单片机AT89C52主要性能l 与MCS-51单片机产品兼容l 8K字节在系统可编程Flash存储器l 1000次擦写周期l 全静态操作:0Hz24Hzl 三级加密程序存储器l 2568位内部存储器l 32个可编程I/O口线l 三个16位定时器/计数器l 八个中断源l 可编程串行通道

    39、l 低功耗空闲和掉电模式功能特性描述AT89S52是一种低功耗、高性能CMOS8位微控制器,具有8K内置可编程闪存。产品使用了Atmel公司高密度非易失性存储器技术制造,与工业80C51和80C52产品指令和引脚完全兼容。片上Flash允许程序存储器在系统可编程,亦适于常规编程器。在单芯片上,拥有灵巧的8位CPU和在系统可编程Flash,使得AT89S52为众多嵌入式控制应用系统提供高灵活、超有效的解决方案。引脚结构方框图VCC : 电源GND : 地P0口:P0口是一个8位漏极开路的双向I/O口。作为输出口,每位能驱动8个TTL逻辑电平。对P0端口写“1”时,引脚用作高阻抗输入。当访问外部程

    40、序和数据存储器时,P0口也被作为低8位地址/数据复用。在这种模式下,P0具有内部上拉电阻。在flash编程时,P0口也用来接收指令字节;在程序校验时,输出指令字节。程序校验时,需要外部上拉电阻。P1口:P1 口是一个具有内部上拉电阻的8位双向I/O 口,P1 输出缓冲器能驱动4个TTL 逻辑电平。对P1端口写“1”时,内部上拉电阻把端口拉高,此时可以作为输入口使用。作为输入使用时,被外部拉低的引脚由于内部电阻的原因,将输出电流(IIL)。此外,P1.0和P1.2分别作定时器/计数器2的外部计数输入(P1.0/T2)和时器/计数器2的触发输入(P1.1/T2EX),具体如下表所示。在flash编

    41、程和校验时,P1口接收低8位地址字节。P2 口:P2 口是一个具有内部上拉电阻的8 位双向I/O 口,P2输出缓冲器能驱动4个TTL 逻辑电平。对P2端口写“1”时,内部上拉电阻把端口拉高,此时可以作为输入口使用。作为输入使用时,被外部拉低的引脚由于内部电阻的原因,将输出电流(IIL)。在访问外部程序存储器或用16位地址读取外部数据存储器(例如执行MOVX DPTR)时,P2口送出高八位地址。在这种应用中,P2口使用很强的内部上拉发送1。在使用8位地址(如MOVX RI)访问外部数据存储器时,P2口输出P2锁存器的内容。在flash编程和校验时,P2口也接收高8位地址字节和一些控制信号。P3

    42、口:P3口是一个具有内部上拉电阻的8 位双向I/O 口,p2输出缓冲器能驱动4个TTL 逻辑电平。对P3端口写“1”时,内部上拉电阻把端口拉高,此时可以作为输入口使用。作为输入使用时,被外部拉低的引脚由于内部电阻的原因,将输出电流(IIL)。P3口亦作为AT89S52特殊功能(第二功能)使用,如下表所示。在flash编程和校验时,P3口也接收一些控制信号。RST: 复位输入。晶振工作时,RST脚持续2个机器周期高电平将使单片机复位。看门狗计时完成后,RST脚输出96个晶振周期的高电平。特殊寄存器AUXR(地址8EH)上的DISRTO位可以使此功能无效。DISRTO默认状态下,复位高电平有效。A

    43、LE/:地址锁存控制信号(ALE)是访问外部程序存储器时,锁存低8位地址的输出脉冲。在flash编程时,此引脚()也用作编程输入脉冲。在一般情况下,ALE 以晶振六分之一的固定频率输出脉冲,可用来作为外部定时器或时钟使用。然而,特别强调,在每次访问外部数据存储器时,ALE脉冲将会跳过。如果需要,通过将地址为8EH的SFR的第0位置“1”,ALE操作将无效。这一位置“1”,ALE 仅在执行MOVX 或MOVC指令时有效。否则,ALE 将被微弱拉高。这个ALE 使能标志位(地址为8EH的SFR的第0位)的设置对微控制器处于外部执行模式下无效。:外部程序存储器选通信号()是外部程序存储器选通信号。当

    44、 AT89S52从外部程序存储器执行外部代码时,在每个机器周期被激活两次,而在访问外部数据存储器时,将不被激活。/VPP:访问外部程序存储器控制信号。为使能从0000H 到FFFFH的外部程序存储器读取指令,必须接GND。为了执行内部程序指令,应该接VCC。在flash编程期间,也接收12伏VPP电压。XTAL1:振荡器反相放大器和内部时钟发生电路的输入端。XTAL2:振荡器反相放大器的输出端。特殊功能寄存器如图1中所示的存储器区域称为特殊功能寄存器。应该注意到,并不是所有的地址都会被定义,单片机中那些没有被定义的地址是无效的。读访问这些地址一般会返回随机数据,写访问这些地址则会产生一个不确定

    45、的影响。用户软件不应将那些没有被列举出来的地址置1。在这种情况下,复位后这些单元数值总是0。定时/计数器2定时/计数器2的控制和状态位位于T2CON和T2MOD。寄存器对(RCAO2H、RCAP2L)是定时器2在16位捕获方式或16位自动重装载方式下的捕获/自动重装载寄存器。中断寄存器所有单独的中断允许位都存在于中断允许寄存器IE中。中断优先级寄存器IP可以为六个中断源设置两个中断优先级。数据存储器AT89C52实现256字节片上RAM。高128个字节与特殊功能寄存器(SFR)地址是重叠的,也就是高128字节的RAM和特殊功能寄存器的地址是相同的,但物理上它们是分开的。当一条指令访问7FH 以

    46、上的内部地址单元时,指令中使用的寻址方式是不同的,也即寻址方式决定是访问高128 字节RAM 还是访问特殊功能寄存器。如果指令是直接寻址方式则为访问特殊功能寄存器。例如,下面的直接寻址指令访问特殊功能寄存器0A0H(即P2 口)地址单元。 MOV 0A0H,#data 间接寻址指令访问高128 字节RAM,例如,下面的间接寻址指令中,R0 的内容为0A0H,则访问数据字节地址为0A0H,而不是P2 口(0A0H)。 MOV R0,#data 堆栈操作也是间接寻址方式,所以,高128 位数据RAM 亦可作为堆栈区使用。定时器0/定时器1AT89C52的定时器0和定时器1的工作方式与AT89C51

    47、相同。定时器2定时器2 是一个16位定时/计数器。它既可当定时器使用,也可作为外部事件计数器使用,其工作方式由特殊功能寄存器T2CON(如表3)的C/T2位选择。定时器2有三种工作方式:捕获方式,自动重装载(向上或向下计数)方式和波 特率发生器方式,工作方式由T2CON的控制位来选择。定时器2由两个8位寄存器TH2和TL2组成,在定时器工作方式中,每个机器周期TL2寄存器的值加1,由于一个机器周期由12个振荡时钟构成,因此,计数速率为振荡频率的1/12。RCLK +TCLKCP/RL2TR2MODE00116-bit Auto-reload01116-bit Capture1X1Baud Rate GeneratorXX0(Off)在计数工作方式时,当T2引脚上外部输入信号产生由1至0的下降沿时,寄存器的值加1,在这种工作方式下,每个机器周期的5SP2期间,对外部输入进行采样。若在第一个机器周期中采到的值为1,而在下一个机器周期中采到的值为0,则在紧跟着的下一个周期的S3P1期间寄存器加1。由于识别1至0的跳变需要2个机器周期(24个振荡周期),因此,最高计数速率为振荡频率的1/24。为确保采样的正确性,要求输入的电平在变化前至少保持一个完整周期的时间,以保证输入信号至少被采样一次。捕获方式: 在捕获方式下,通过T2CON控制位EXEN2来选择两种方式。如果E


    注意事项

    本文(基于AT89C52单片机的交通灯控制系统的设计(外文翻译).doc)为本站会员(管**)主动上传,沃文网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知沃文网(点击联系客服),我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服点击这里,给沃文网发消息,QQ:2622162128 - 联系我们

    版权声明:以上文章中所选用的图片及文字来源于网络以及用户投稿,由于未联系到知识产权人或未发现有关知识产权的登记,如有知识产权人并不愿意我们使用,如有侵权请立即联系:2622162128@qq.com ,我们立即下架或删除。

    Copyright© 2022-2024 www.wodocx.com ,All Rights Reserved |陕ICP备19002583号-1

    陕公网安备 61072602000132号     违法和不良信息举报:0916-4228922