




已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
基于51单片机的电子数字钟设计的外文翻译 at89c51 family users guide1 features compatible with mcs-51 products 4k bytes of in-system reprogrammable flash memory endurance 1000 writeerase cycles fully static operation 0 hz to 24 mhz three-level program memory lock 128 x 8-bit internal ram 32 programmable io lines two 16-bit timercounters six interrupt sources programmable serial channel low-power idle and power-down modes2 descriptionthe at89c51 is a low-power high-performance cmos 8-bit microcomputer with 4k 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 mcs-51 instruction set and pin-out 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 flash on a monolithic chip the atmel at89c51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications3 pin configurations4 lock diagramthe at89c51 provides the following standard features 4k bytes of flash 128 bytes of ram 32 io lines two 16-bit timercounters a five vector two-level interrupt architecture a full duplex serial port on-chip oscillator and clock circuitry in addition the at89c51 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 timercounters 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 hardware reset5 pin descriptionvcc supply voltagegnd groundport 0port 0 is an 8-bit open-drain bi-directional io 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 inputsport 0 may also be configured to be the multiplexed low-order addressdata bus during accesses to external program and data memory in this mode p0 has internal pull-upsport 0 also receives the code bytes during flash programming and outputs the code bytes during program verification external pull-ups are required during program verificationport 1port 1 is an 8-bit bi-directional io port with internal pull-ups the port 1 output buffers can sinksource 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 iil because of the internal pull-ups port 1 also receives the low-order address bytes during flash programming and verificationport 2port 2 is an 8-bit bi-directional io port with internal pull-ups the port 2 output buffers can sinksource 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 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 memory that uses 16-bit addresses movx dptr in this application it uses strong internal pull-ups when emitting 1s during accesses to external data memory that uses 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 verificationport 3port 3 is an 8-bit bi-directional io port with internal pull-ups the port 3 output buffers can sinksource 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 iil because of the pull-ups port 3 also serves the functions of various special features of the at89c51 as listed belowport pinalternate functionsp30rxd serial input port p31txd serial output port p32int0 external interrupt 0 p33int1 external interrupt 1 p34t0 timer 0 external input p35t1 timer 1 external input p36wr external data memory write strobe p37rd external data memory read strobe port 3 also receives some control signals for flash programming and verificationrstreset input a high on this pin for two machine cycles while the oscillator is running resets the devicealeaddress latch enable 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 16 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 modeprogram store enable is the read strobe to external program memory when the at89c51 is executing code from external program memory is activated twice each machine cycle except that two activations are skipped during each access to external data memoryvppexternal access enable 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 will be internally latched on reset should be strapped to vc c for internal program executions this pin also receives the 12-volt programming enable voltage vpp during flash programming for parts that require 12-volt vppxtal1input to the inverting oscillator amplifier and input to the internal clock operating circuitxtal2output from the inverting oscillator amplifier6 oscillator characteristicsxtal1 and xtal2 are the input and output respectively of an inverting amplifier which can be configured for use as an on-chip oscillator as shown in figure 1 either a quartz crystal or ceramic resonator may be used to drive the device from an external clock source xtal2 should be left unconnected while xtal1 is driven as shown in figure 2 there are no requirements on the duty cycle of the external clock signal since the input to the internal clocking circuitry is through a divide-by-two flip-flop but minimum and imum voltage high and low time specifications must be observedoscillator connectionsnote c1 c2 30 pf10 pf for crystals 40 pf10 pf for ceramic resonatorsexternal clock drive configuration7 idle modein idle mode the cpu puts itself to 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 functions registers remain unchanged during this mode the idle mode can be terminated by any enabled interrupt or by a hardware reset it should be noted that when idle is terminated by a hard ware reset the device normally resumes program execution from where it left off up to two machine cycles before the internal reset algorithm takes control on-chip hardware inhibits access to internal ram in this event but access to the port pins is not inhibited to eliminate the possibility of an unexpected write to a port pin when idle is terminated by reset the instruction following the one that invokes idle should not be one that writes to a port pin or to external memory8 power-down modein the power-down mode the oscillator is stopped and the instruction that invokes power-down is the last instruction executed the on-chip ram and special function registers retain their values until the power-down mode is terminated the only exit from power-down is a hardware reset reset redefines the sfrs but does not change the on-chip ram the reset should not be activated before vcc is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize9 programming the flashthe at89c51 is normally shipped with the on-chip flash memory array in the erased state that is contents ffh and ready to be programmed the programming interface accepts either a high-voltage 12-volt or a low-voltage vcc program enable signal the low-voltage programming mode provides a convenient way to program the at89c51 inside the users system while the high-voltage programming mode is compatible with conventional third party flash or eprom programmers the at89c51 is shipped with either the high-voltage or low-voltage programming mode enabled the respective top-side marking and device signature codes are listed in the following tablethe at89c51 code memory array is programmed byte-by-byte in either programming mode to program any nonblank byte in the on-chip flash memory the entire memory must be erased using the chip erase mode10 flash programming and verification characteristicsta 0c to 70c vcc 5010note 1 only used in 12-volt programming mode11 dc characteristicsta -40c to 85c vcc 50v20 unless otherwise noted notes 1 under steady state non-transient conditions iol must be externally limited as followsimum iol per port pin 10 maimum iol per 8-bit port port 0 26 maports 1 2 3 15 maimum total iol for all output pins 71 maif iol exceeds the test condition vol may exceed the related specification pins are not guaranteed to sink current greater than the listed test conditions2minimum vcc for power-down is 2v12 external program and data memory characteristics13 external program memory read cycle14 external data memory read cycle15 external data memory write cycle16 external clock drive waveforms17 external clock drive18 serial port timing shift register mode test conditions vcc 50 v 20 load capacitance 80 pf 19 shift register mode timing waveforms20 ring information21 packaging informationat89c51系列用户指南1 主要性能参数mcs-51 产品指令系统完全兼容k 字节可重擦写 flash 闪速存储器1000次擦写全静态操作0hz24mhz三级加密程序存储器1288 字节内部 ram32个可编程 io 口线2个 16 位定时计数器6个中断源程串行uart 通道2 功能特性概述at89c51 是美国 atmel 公司生产的低电压高性能 cmos8 位单片机片内含 4k bytes 的可反复擦写的只读程序存储器perom和 128 bytes 的随机存取数据存储器ram器件采用 atmel 公司的高密度非易失性存储技术生产兼容标准 mcs-51 指令系统片内置通用 8 位中央处理器cpu和 flash 存储单元功能强大 at89c51 单片机可为您提供许多高性价比的应用场合可灵活应用于各种控制领域4 方框图at89c51 提供以下标准功能4k 字节 flash 闪速存储器128 字节内部 ram32个 io 口线两个 16 位定时计数器一个 5 向量两级中断结构一个全双工串行通信口片内振荡器及时钟电路同时at89c51 可降至 0hz 的静态逻辑操作并支持两种软件可选的节电工作模式空闲方式停止 cpu 的工作但允许 ram定时计数器串行通信口及中断系统继续工作掉电方式保存 ram 中的内容但振荡器停止工作并禁止其它所有部件工作直到下一个硬件复位引脚功能说明vcc电源电压gnd地p0 口p0 口是一组 8 位漏极开路型双向 io 口也即地址数据总线复用口作为输出口用时每位能吸收电流的方式驱动 8个 ttl 逻辑门电路对端口写1可作为高阻抗输入端用在访问外部数据存储器或程序存储器时这组口线分时转换地址低 8 位和数据总线复用在访问期间激活内部上拉电阻在flash编程时p0 口接收指令字节而在程序校验时输出指令字节校验时要求外接上拉电阻p1 口p1 是一个带内部上拉电阻的 8 位双向 io 口p1 的输出缓冲级可驱动吸收或输出电流4个 ttl 逻辑门电路对端口写1通过内部的上拉电阻把端口拉到高电平此时可作输入口作输入口使用时因为内部存在上拉电阻某个引脚被外部信号拉低时会输出一个电流iilflash编程和程序校验期间p1 接收低 8 位地址p2 口p2 是一个带有内部上拉电阻的 8 位双向 io 口p2 的输出缓冲级可驱动吸收或输出电流4个ttl 逻辑门电路对端口写1通过内部的上拉电阻把端口拉到高电平此时可作输入口作输入口使用时因为内部存在上拉电阻某个引脚被外部信号拉低时会输出一个电流iil在访问外部程序存储器或 16 位地址的外部数据存储器例如执行 movxdptr 指令时p2 口送出高 8 位地址数据在访问 8 位地址的外部数据存储器如执行 movxri 指令时p2 口线上的内容也即特殊功能寄存器sfr区中 r2 寄存器的内容在整个访问期间不改变flash 编程或校验时p2 亦接收高位地址和其它控制信号p3 口p3 口是一组带有内部上拉电阻的 8 位双向 io 口p3 口输出缓冲级可驱动吸收或输出电流4个ttl逻辑门电路对 p3 口写入1时它们被内部上拉电阻拉高并可作为输入端口作输入端时被外部拉低的 p3 口将用上拉电阻输出电流iilp3 口除了作为一般的 io 口线外更重要的用途是它的第二功能如下表所示端口引脚第二功能rxd串行输入口txd串行输出口外中断 0外中断 1t0定时计数器 0 外部输入t1定时计数器 1 外部输入外部数据存储器写选通外部数据存储器读选通p3 口还接收一些用于 flash 闪速存储器编程和程序校验的控制信号rst复位输入当振荡器工作时rst 引脚出现两个机器周期以上高电平将使单片机复位ale 当访问外部程序存储器或数据存储器时ale地址锁存允许输出脉冲用于锁存地址的低8位字节即使不访问外部存储器ale 仍以时钟振荡频率的 l6 输出固定的正脉冲信号因此它可对外输出时钟或用于定时目的要注意的是每当访问外部数据存储器时将跳过一个 ale 脉冲对 flash 存储器编程期间该引脚还用于输入编程脉冲prog如有必要可通过对特殊功能寄存器sfr区中的 8eh 单元的 do 位置位可禁止 ale 操作该位置位后只有一条 movx 和 movc 指令 ale 才会被激活此外该引脚会被微弱拉高单片机执行外部程序时应设置 ale 无效程序储存允许psen输出是外部程序存储器的读选通信号当 at89c51 由外部程序存储器取指令或数据时每个机器周期两次有效即输出两个脉冲在此期间当访问外部数据存储器这两次有效的信号不出现vpp外部访问允许欲使 cpu 仅访问外部程序存储器地址为 0000hffffh 端必须保持低电平接地需注意的是如果加密位 lb1 被编程复位时内部会锁存 端状态如 端为高电平接 vcc 端cpu 则执行内部程序存储器中的指令flash 存储器编程时该引脚加上12v 的编程允许电源 vpp当然这必须是该器件是使用 12v 编程电压 vppxtal1振荡器反相放大器的及内部时钟发生器的输入端xtal2振荡器反相放大器的输出端时钟振荡器at89c5l 中有一个用于构成内部振荡器的高增益反相放大器引脚 xtal1 和 xtal2 分别是该放大器的输入端和输出端这个放大器与作为反馈元件的片外石英晶体或陶瓷谐振器一起构成自激振荡器接石英晶体或陶瓷谐振器及电容 c1c2 接在放大器的反馈回路中构成并联振荡电路对外接电容 c1c2 虽然没有十分严格的要求但电容容量的大小会轻微影响振荡频率的高低振荡器工作的稳定性起振的难易程序及温度稳定性如果使用石英晶体我们推荐电容使用 30pf10pf而如使用陶瓷谐振器建议选择 40pf10f用户也可以采用外部时钟采用外部时钟的电路如图 5 右图所示这种情况下外部时钟脉冲接到 xtal1 端即内部时钟发生器的输入端xtal2 则悬空内部振荡电路石英晶体时c1c230pf10pf陶瓷滤波器c1c240pf10pf外部时钟驱动电路7 空闲节电模式at89c51有两种可用软件编程的省电模式它们是空闲模式和掉电工作模式这两种方式是控制专用寄存器pcon即电源控制寄存器中的 pdpcon1和 idlpcon0位来实现的pd 是
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 银行员工考试试题及答案
- 考研专业试题及答案
- 日语专业考研试题及答案
- 农学专业关于试题及答案
- 珠宝知识专业试题及答案
- 电影专业考试题目及答案
- 专业监理试题及答案
- 绿化护坡挂网施工方案
- 福建省漳州市平和县四校联考2024-2025学年高一上学期期中联考地理试题
- 聊城消音片施工方案报价
- 01SS105给排水常用仪表及特种阀门安装图集
- 重症肌无力教学护理查房
- 发动机大修12汇总
- 初中化学物质的分类
- 护士心理压力
- 小区广播系统设计方案
- 抗滑桩安全技术交底
- GB/T 5271.28-2001信息技术词汇第28部分:人工智能基本概念与专家系统
- GA/T 1678-2019法庭科学鞋底磨损特征检验技术规范
- 《数字媒体专业认知实习》课程教学大纲
- 中西方婚礼文化差异毕业论文Word版
评论
0/150
提交评论