已阅读5页,还剩7页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
附录i参考文献及译文英文资料at89s51(8-bit micro controller with 4k bytes flash)the 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 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-flexible and cost-effective solution to many embedded control applications.features:compatible with mcs.-51 products4k bytes of in-system programmable (isp) flash memoryendurance: 1000 write/erase cycles4.0v to 5.5v operating rangefully static operation: 0 hz to 33 mhzthree-level program memory lock128 x 8-bit internal ram32 programmable i/o linestwo 16-bit timer/counterssix interrupt sourcesfull duplex uart serial channellow-power idle and power-down modesinterrupt recovery from power-down modewatchdog timerdual data pointerpower-off flagfast programming timeflexible isp programming (byte and page mode)green (pb/halide-free) packaging optionthe 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 full 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 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 external interrupt or hardware reset.vcc:supply voltage (all packages except 42-pdip).gnd:ground (all packages except 42-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 connect 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 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 high-impedance inputs.port 0 can also be configured to be the multiplexed low-order address/data bus during accesses 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 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 being pulled low will source current (lip) because of the internal 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 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 uses 16-bit addresses (movxdptr). in this application, port 2 uses strong internal pull-ups when emitting 1s. during accesses to external data memory that use 8-bit addresses (movxri), 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 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-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. 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 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 (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 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 ooooh 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.xtal1:input to the inverting oscillator amplifier and input to the internal clock operating circuit.xtal2:output from the inverting oscillator amplifierspecial 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 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 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. 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 not affected by reset.memory organization:mcs-51 devices have a separate address space for program and data memory. up to 64kbytes 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 the 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 indirect addressing modes. stack operations are examples of indirect addressing, so the 128 bytes of data ram are available as stack space.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. the 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 cycle 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.timer 0 and 1:timer 0 and timer 1 is a 16-bit timer/counter.中文翻译at89s51 (8位微控制单片机,片内含4k bytes可系统编程的存储器)at89s51是美国atmel公司生产的低功耗,高性能cmos 8位单片机,片内含4k bytes的可系统编程的flash只读程序存储器,器件采用atmel公司的高密度、非易失性存储技术生产,兼容标准8051指令系统及引脚。它集flash程序存储器既可在线编程(isp)也可用传统方法进行编程及通用8位微处理器于单片芯片中,atmel公司的功能强大,低价位at89s51单片机可为您提供许多高性价比的应用场介,可灵活应用于各种控制领域。 主要性能参数:与mcs-51 产品指令系统完全兼容4k字节在线系统编程(isp) flash闪速存储器1000次擦写周期4. 0-5. 5v的工作电压范围全静态工作模式:0hz-33mhz三级程序加密锁1288字节内部ram32个可编程i/o口线2个16位定时/计数器6个中断源全双工串行uart通道低功耗空闲和掉电模式中断可从空闲模式唤醒系统看门狗(wdt)及双数据指针掉电标识和快速编程特性灵活的在线系统编程(isp一字节或页写模式)功能特性概述:at89s51提供以下标准功能:4k字节flash闪速存储器,128字节内部ram, 32个i/o口线,看门狗(wdt),两个数据指针,两个16位定时/计数器,一个5向量两级中断结构,一个全双工串行通信口,片内振荡器及时钟电路。同时,at89s51可降至0hz的静态逻辑操作,并支持两种软件可选的节电工作模式。空闲方式停止cpu的工作,但允许ram,定时/计数器,串行通信口及中断系统继续工作。掉电方式保存ram中的内容,但振荡器停止工作并禁止其它所有部件工作直到下一个硬件复位。引脚功能说明:vcc:电源电压gnd:地p0口:p0口是一组8位漏极开路型双向i/o口,也即地址/数据总线复用口。作为输出口用时,每位能驱动8个ttl逻辑门电路,对端口写1可作为高阻抗输入端用。在访问外部数据存储器或程序存储器时,这组口线分时转换地址(低8位)和数据总线复用,在访问期间激活内部上拉电阻。在flash编程时,p0 口接收指令字节,而在程序校验时,输出指令字节,校验时,要求外接上拉电阻。p1口:p1是一个带内部上拉电阻的8位双向i/o口,p1的输出缓冲级可驱动(吸收或输出电流)4个ttl逻辑门电路。对端口写1,通过内部的上拉电阻把端口拉到高电平,此时可作输入口。作输入口使用时,囚为内部存在上拉电阻,某个引脚被外部信号拉低时会输出一个电流(in)。flash编程和程序校验期间 p 1接收低8位地址。p2口:p2是一个带有内部上拉电阻的8位双向i/o口,p2的输出缓冲级可驱动(吸收或输出电流)4个ttl逻辑门电路。对端口写1,通过内部的上拉电阻把端口拉到高电平,此时可作输入口,作输入口使用时,囚为内部存在上拉电阻,某个引脚被外部信号拉低时会输出一个电流(in)。在访问外部程序存储器或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口线外,更重要的用途是它的第二功能。p3 口还接收一些用于flash闪速存储器编程和程序校验的控制信号。rst:复位输入。当振荡器工作时,rst引脚出现两个机器周期以上高电平将使单片机复位。wdt溢出将使该引脚输出高电平,设置sfr auxr 的disrto位(地址8eh)可打开或关闭该功能。disrto位缺省为reset输出高电平打开状态。ale/prog:当访问外部程序存储器或数据存储器时,ale(地址锁存允许)输出脉冲用于锁存地址的低8位字节。即使不访问外部存储器,ale仍以时钟振荡频率的1/6输出固定的正脉冲信号,囚此它可对外输出时钟或用于定时目的。要注意的是:每当访问外部数据存
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 银行火灾事故应急演练方案
- 2025-2030物联网行业市场潜力与智能布局规划分析研究文献报告
- 2025-2030物流行业智能仓储系统建设与管理优化分析报告
- 2025-2030牛奶加工冷链设备技术参数行业标准分析
- 室内设计公司薪资结构与考核方案
- 电商平台数据分析策略与应用
- 拼音教学趣味口诀全集
- 北师版三年级数学讲故事教学反思
- 塔吊操作技术规程安全标准
- 医疗机构门诊质量管理指标体系
- 升降货梯买卖安装与使用说明书合同
- 河南豫能控股股份有限公司及所管企业2026届校园招聘127人考试备考题库及答案解析
- 房地产公司2025年度总结暨2026战略规划
- 2026浙江宁波市鄞州人民医院医共体云龙分院编外人员招聘1人笔试参考题库及答案解析
- (2025年)新疆公开遴选公务员笔试题及答案解析
- 物业管家客服培训课件
- 直销公司旅游奖励方案
- 中央空调多联机施工安全管理方案
- 2026年当兵军事理论训练测试题及答案解析
- 浙江省嘉兴市2024-2025学年高二上学期期末检测政治试题(含答案)
- 2026年湖南民族职业学院单招综合素质笔试备考试题附答案详解
评论
0/150
提交评论