版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、外文原文及中文翻译外文原文at89s51the at89s51 is a low-power, high-performance cmos 8-bit microcontroller with 4k bytes of in-system programmable flash memory. the device is manufactured using atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80c51 instruction set and
2、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 in-system programmable flash on a monolithic chip, the atmel at89s51 is a powerful microcontroller which provides a highly-flex
3、ible and cost-effective solution to many embedded control applications. 1. features: compatible with mcs.-51 products 4k bytes of in-system programmable (isp) flash memory endurance: 1000 write/erase cycles 4.0v to 5.5v operating range fully static operation: 0 hz to 33 mhz three-level program memor
4、y lock 128 x 8-bit internal ram 32 programmable i/o lines two 16-bit timer/counters six interrupt sources full duplex uart serial channel low-power idle and power-down modes interrupt recovery from power-down mode watchdog timer dual data pointer power-off flag fast programming time flexible isp pro
5、gramming (byte and page mode) green (pb/halide-free) packaging option2.dscriptionthe at89s51 provides the following standard features:4k bytes of flash, 128 bytes of ram, 32 i/o lines, watchdog timer, two data pointers, two 16-bit timer/counters, a five-vector two level interrupt architecture, a ful
6、l duplex serial port, on-chip oscillator, and clock circuitry. in addition, the at89s51 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 int
7、errupt system to continue functioning. the power-down mode saves the ram contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset. 3.pin description: vcc:supply voltage (all packages except 42-pdip). gnd:ground (all packages except 4
8、2一pdip; for 42-pdip gnd connects only the logic core and the embedded program memory). vdd:supply voltage for the 42-pdip which connects only the logic core and the embedded program memory. pwrvdd:supply voltage for the 42-pdip which connects only the i/o pad drivers. the application board must conn
9、ect both vdd and pwrvdd to the board supply voltage. pwrgnd:ground for the 42一pdip which connects only the i/o pad drivers. pwrgnd and gnd are weakly connected through the common silicon substrate, but not through any metal link. the application board must connect both gnd and pwrgnd to the board gr
10、ound. 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 high一impedance inputs.port 0 can also be configured to be the multiplexed low-order address/data bus during accesses
11、to external program and data memory. in this mode, po 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 program verification. port 1:port 1 is an 8一bit bi-directional i/o po
12、rt 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 being pulled low will source current (lip) because of the inte
13、rnal pull一ups. port 2:port 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 as inputs. as inputs, port 2 pins that are externally
14、being pulled low will source current (lip) 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 memory that use 16-bit addresses. in this application, port 2 uses strong internal pull一ups when emitt
15、ing 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 during flash programming and verification. port 3:port 3 is an 8一bit bi-directional i/o po
16、rt 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 that are externally being pulled low will source current (lip) because of the pull
17、-ups.port 3 receives some control signals for flash programming and verification.port 3 also serves the functions of various special features of the at89s51,as shown in the following table. rst:reset input. a high on this pin for two machine cycles while the oscillator is running resets the device.
18、this pin drives high for 98 oscillator periods after the watchdog times out. the disrto bit in sfr auxr (address 8eh) can be used to disable this feature. in the default state of bit disrto, the reset high out feature is enabled. ale/prog:address latch enable (ale) is an output pulse for latching th
19、e 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 beused for external timing or clocking purposes. note, however, that
20、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 eff
21、ect if the microcontroller is in external execution mode. psen:program store enable (psen) is the read strobe to external program memory.when the at89s51 is executing code from external program memory, psen is activated twice each machine cycle, except that two psen activations are skipped during ea
22、ch 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 ooooh up to ffffh. note, however, that if lock bit 1 is programmed, ea will be internally latched on reset.ea sh
23、ould be strapped to vcc for internal program executions.this pin also receives the 12-volt programming enable voltage (vpp) during flash programming. xtal1:input to the inverting oscillator amplifier and input to the internal clock operating circuit. xtal2:output from the inverting oscillator amplif
24、ier 4.special function registers: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 1 s
25、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. interrupt registers:the individual interrupt enable bits are in the ie register. two priorities can be set for each of the five
26、interrupt sources in the ip register. dual data pointer registers:to facilitate accessing both internal and external data memory, two banks of 16-bit data pointer registers are provided: dpo at sfr address locations 82h-83h and dp1 at 84h-85h.bit dps=0 in sfr auxr1 selects dpo and dps=1 selects dp1.
27、 the user should always initialize the dps bit to the appropriate value before accessing the respective data pointer register. power off flag:the power off flag (pof) is located at bit 4 (pcon.4) in the pcon sfr. pof is set to 1”during power up. it can be set and rest under software control and is n
28、ot affected by reset. 5.memory organization:mcs-51 devices have a separate address space for program and data memory. up to 64k bytes each of external program and data memory can be addressed. program memory:if the ea pin is connected to gnd, all program fetches are directed to external memory. on t
29、he at89s51,if ea is connected to vcc, program fetches to addresses ooooh through fffh are directed to internal memory and fetches to addresses 1000h through ffffh are directed to external memory. data memory:the at89s51 implements 128 bytes of on-chip ram. the 128 bytes are accessible via direct and
30、 indirect addressing modes. stack operations are examples of indirect addressing, so the 128 bytes of data ram are available as stack space. 6.watchdog timer (one-time enabled with reset-out):the wdt is intended as a recovery method in situations where the cpu may be subjected to software upsets. th
31、e wdt consists of a 14一bit counter and the watchdog timer reset (wdtrst) sfr. the wdt is defaulted to disable from exiting reset. to enable the wdt, a user must write 01 eh and oe1 h in sequence to the wdtrst register (sfr location oa6h). when the wdt is enabled, it will increment every machine cycl
32、e while the oscillator is running. the wdt timeout period is dependent on the external clock frequency. there is no way to disable the wdt except through reset (either hardware reset or wdt overflow reset). when wdt overflows, it will drive an output reset high pulse at the rst pin. 7.timer 0 and 1:
33、timer 0 and timer 1 is a 16-bit timer/counter.8.interrupts:the at89s51 has a total of five interrupt vectors:two external interrupts,two timer interrupts,and the serial port interrupt.these interrupts are all shown in figure 8.1.each of these interrupt sources can be individually enabled or disabled
34、 by setting or chearing a bit in special function register ie.ie also contains a global disable bit,ea,which disables all interrupts at once.note that table 8.1 shows that bit positions ie.6 and ie.5 are unimplemented.user software should not write 1s to these bit positions,since they may be used in
35、 future at89 products.the timer 0 and timer 1 flags, tf0 and tf1,are set at s5p2 of the cycle in which the timers overflow.the values are then polled by the circuitry in the next cycle.table 8.1:interrupt enable(ie) registerfigure 8.1:interrupt sources9.idle mode:in idle mode ,the cpu puts itself to
36、 sleep while all the on-chip peripherals remain active.the mode is invoked by software.the content of the on-chip ram and all the special function registers remain unchanged during this mode.the idle can be terminated by any enabled interrupt or by a hardware reset.中文翻译at89s51 at89s51是美国atmel公司生产的低功
37、耗,高性能cmos 8位单片机,片内含4k bytes的可系统编程的flash只读程序存储器,器件采用atmel公司的高密度、非易失性存储技术生产,兼容标准8051指令系统及引脚。它集flash程序存储器既可在线编程(isp)也可用传统方法进行编程及通用8位微处理器于单片芯片中,atmel公司的功能强大,低价位at89s51单片机可为您提供许多高性价比的应用场介,可灵活应用于各种控制领域。 1.主要性能参数: 与mcs-51 产品指令系统完全兼:容 4k字节在线系统编程(isp) flash闪速存储器 1000次擦写周期 4. 0-5. 5v的工作电压范围 全静态工作模式:0hz-33mhz
38、三级程序加密锁 1288字节内部ram 32个可编程i/o口线 2个16位定时/计数器 6个中断源 全双工串行uart通道 低功耗空闲和掉电模式 中断可从空闲模式唤醒系统 看门狗(wdt)及双数据指针 掉电标识和快速编程特性 灵活的在线系统编程(isp一字节或页写模式) 2.功能特性概述: at89s51提供以下标准功能:4k字节flash闪速存储器,128字节内部ram, 32个i/o口线,看门狗(wdt),两个数据指针,两个16位定时/计数器,一个5向量两级中断结构,一个全双工串行通信口,片内振荡器及时钟电路。同时,at89s51可降至0hz的静态逻辑操作,并支持两种软件可选的节电工作模式
39、。空闲方式停止cpu的工作,但允许ram,定时/计数器,串行通信口及中断系统继续工作。掉电方式保存ram中的内容,但振荡器停止工作并禁止其它所有部件工作直到下一个硬件复位。引脚功能说明:3.引脚功能 vcc: 电源电压 gnd:地 p0口:p0口是一组8位漏极开路型双向i/o口,也即地址/数据总线复用口。作为输出口用时,每位能驱动8个ttl逻辑门电路,对端口写1可作为高阻抗输入端用。 在访问外部数据存储器或程序存储器时,这组口线分时转换地址(低8位)和数据总线复用,在访问期间激活内部上拉电阻。 在flash编程时,p0 口接收指令字节,而在程序校验时,输出指令字节,校验时,要求外接上拉电阻。
40、p1口:p1是一个带内部上拉电阻的8位双向i/o口,p1的输出缓冲级可驱动(吸收或输出电流)4个ttl逻辑门电路。对端口写1,通过内部的上拉电阻把端口拉到高电平,此时可作输入口。作输入口使用时,囚为内部存在上拉电阻,某个引脚被外部信号拉低时会输出一个电流(in)。 flash编程和程序校验期间 p 1接收低8位地址。 p2口:p2是一个带有内部上拉电阻的8位双向i/o口,p2的输出缓冲级可驱动(吸收或输出电流)4个ttl逻辑门电路。对端口写1,通过内部的上拉电阻把端口拉到高电平,此时可作输入口,作输入口使用时,囚为内部存在上拉电阻,某个引脚被外部信号拉低时会输出一个电流(in)。在访问外部程序
41、存储器或16位地址的外部数据存储器(例如执行movx dptr指令)时,p2口送出高 8位地址数据。在访问8位地址的外部数据存储器(如执行movx ri指令)时,p2口线卜的内容(也即特殊功能寄存器(sfr)区中p2寄存器的内容),在整个访问期间不改变。 flash编程或校验时,p2亦接收高位地址和其它控制信号。 p3口:p3口是一组带有内部上拉电阻的8位双向i/o口。p3口输出缓冲级可驱动(吸收或输出电流)4个ttl逻辑门电路。对p3 口写入“1”时,它们被内部上拉电阻拉高并可作为输入端口。作输入端时,被外部拉低的p3 口将用上拉电阻输出电流(in)。p3口除了作为一般的i/o口线外,更重要
42、的用途是它的第二功能。p3 口还接收一些用于flash闪速存储器编程和程序校验的控制信号。第二功能如下表:p3口引脚第二功能p3.0rxd(串行输入)p3.1txd(串行输出)p3.2/into(外部中断0输入)p3.3/int1(外部中断1输入)p3.4t0(定时/计数器0外部输入)p3.5t1(定时/计数器1外部输入)p3.6/wr(外部数据存储器写信号)p3.7/rd(外部数据存储器读信号)rst:复位输入。当振荡器工作时,rst引脚出现两个机器周期以上高电平将使单片机复位。wdt溢出将使该引脚输出高电平,设置sfr auxr 的disrto位(地址8eh)可打开或关闭该功能。disrt
43、o位缺省为reset输出高电平打开状态。 ale/prog:当访问外部程序存储器或数据存储器时,ale(地址锁存允许)输出脉冲用于锁存地址的低8位字节。即使不访问外部存储器,ale仍以时钟振荡频率的1/6输出固定的正脉冲信号,囚此它可对外输出时钟或用于定时目的。要注意的是:每当访问外部数据存储器时将跳过一个ale脉冲。对flash存储器编程期间,该引脚还用于输入编程脉冲(prog)。如有必要,可通过对特殊功能寄存器(sfr)区中的8eh单元的d0位置位,可禁正ale操作。该位置位后,只有一条movx和movc指令ale才会被激活。此外,该引脚会被微弱拉高,单片机执行外部程序时,应设置ale无效。 psen:程序储存允许(psen)输出是外部程序存储器的读选通信号,当at89s51由外部程序存储器取指令(或数据)时,每个机器周期两次psen有效,即输出两个脉冲。当访问外部数据存储器,没有两次有效的psen信号。 ea/vpp:外部访问允许。欲使cpu仅访问外部程序存储器(地址为0000h-ffffh), ea端必须保持低电平(接地)。需注意的是:如果加密位lb
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 职高旅游服务类课程设计
- 自制蛋挞原液课程设计
- 餐饮管理系统课程设计java
- 河道桥梁课程设计思路
- 防碰撞系统课程设计理念
- 机械原理课程设计方案
- 酸化工艺课程设计
- 长江是我家课程设计
- 雨水探究课程设计思路
- 车辆保安课程设计思路
- 托福阅读讲义
- 输电线路基础知识输电线路组成与型式
- 三年级数字加减法巧算
- GB/T 9755-2001合成树脂乳液外墙涂料
- GB/T 10609.3-1989技术制图复制图的折叠方法
- GB 4053.2-2009固定式钢梯及平台安全要求第2部分:钢斜梯
- 通力电梯培训教材:《LCE控制系统课程》
- 佛山市内户口迁移申请表
- 品管圈PDCA持续质量改进提高静脉血栓栓塞症规范预防率
- 一次函数单元测试卷(含答案)
- 陕西省榆林市各县区乡镇行政村村庄村名居民村民委员会明细
评论
0/150
提交评论