已阅读5页,还剩3页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
AT89C2051AT89C2051 is made in the ATMEL Corporation, which is the low-voltage, high-performance CMOS8-bit microcontroller,Tablets containing repeated 2k bytes of program memory erasable read-only (PEROM) and random 128bytes data memory (RAM), device using ATMELs high density, non-volatile memory technology, Compatible with the standard of MCS-51 instruction set, built-chip 8-bit general-purpose central processing unit and repeatedly write the Flash memory, which can effectively reduce the development costs. AT89C2051 features a powerful single-chip can provide cost-effective in many Applications.Main features:Compatible the MCS51 command system;Contains the 2KB memory re-programming FLASH (1000);2.7 6V voltage range;the whole Static work: 0Hz 24KHz;Secrets 2 Program Memory Lock128 8-bit internal RAM15 programmable I / O linesTwo 16-bit timer / counter6 interrupt sources, two external interrupt sourcesProgrammable Serial ChannelHigh Precision Voltage Comparator (P1.0,P1.1,P3.6);Have the output port of the LED direct drive Low-power idle and power-down mode The pin Picture of AT89C2051Picture one the pin of AT89C20511 2 3 4 5 6ABCD654321DCBATitleNumber RevisionSizeBDate: 21-May-2009 Sheet of File: D:Program FilesDesign Explorer 99 SELibrarySchProtel DOS Schematic Libraries.ddbDrawn By:20191817161514131211GNDP3.5P3.4P3.3P3.2XTAL1XTAL2P3.1P3.0RSTP3.7P1.0P1.1P1.2P1.3P1.4P1.5P1.6P1.7VCC12345678910AT89C2051s functional description:VCC: Power Supply VoltageGND: landP1 port: P1 mouth is a group of 8-bit bi-directional I / O interface, P1.2 P1.7 provide internal pull-up resistor,P1.0 and P1.1 internal supreme pull-up resistor. P1 mouth output buffer can absorb the current 20mA and direct-drive LED.When Programming and calibration, P1 mouth as the eighth address receive.P3 mouth: P3 port P3.0 P3.5, P3.7 is the internal pull-up resistor with the seven bi-directional I / O interface. Did not bring out the P3.6,It as a generic I / O port, but can not visit. Can be used as a fixed-chip input comparator output signal. when P3 write 1, they were highed the internal pull-up resistor can be raised as an input port.P3 port special function as shown in table 1:Table 1 P3 mouths special features引脚 功能特性P3.0 RXD (串行输入口)P3.1 TXD (串行输出口)P3.2 (外中断 0)0INTP3.3 (外中断 1)1P3.4 T0 (定时/计数器 0外部输入)P3.5 T1 (定时/计数器 1外部输入)RST:Reset output. When the oscillator device reset, RST pin to maintain the high level of two machine cycle time.XTAL1: the RP-oscillator amplifier and internal clock generator input.XTAL2: RP-oscillator output amplifier.TimerOverview of the Timer 89C2051 single-chip-chip has two 16-bit timer / counter, That is the timer 0 (T0) and Timer 1 (T1). They all have from time to time and event count function, Can be used for timing control, delay of external events, such as counting and testing occasions. Timers T0 and T1 two 16-bit timers in fact is 16-bit counter plus 1. Among them, T0 compositioned by the two 8-bit special function registers TH0 and TL0; T1 posed by the TH1 and TL1. These functions were controled by the special function registers TMOD and TCON When set to the work in the timing, Through the pin count of the external pulse signal. When the input pulse signal generated by the falling edge of 1-0, The value of timer plus 1. At of every machine cycle during the S5P2 sampling pin T0 and T1 the input level, if a machine cycle before sample value of 1, The next machine cycle sampling value is 0, The counter plus 1. Since then during S3P1 of the machine cycle, New value will into the counter.so Detection of a 1-0 transition of the two machine cycles,So The maximum count frequency of oscillation frequency of 1 / 24. In addition to the option of work from time to time or count,Each timer / counter have four kinds of work mode, That is, each of timer circuit kinds of four constitute a structural modelTwo low-power modeIdle modeIn idle mode, CPU to maintain sleep and all-chip peripherals remain active, this way generated in Software, At this point, Chip RAM and all the contents of special function registers remain unchanged. Idle mode was terminated by any interrupt request permission to or hardware reset.P1.0 and P1.1 ,in the non-use of external pull-up resistor on the case should be set to 0, Or in the use of pull-up resistor is set to 1.It should be noted that: when uses of hardware reset Termination idle mode, AT89C2051 is usually stopped from the program until the internal reset control of the two machine cycles before the restore procedure Service. In this case the hardware within the prohibition of the reading and writing of internal RAM, However, to allow access to ports, To eliminate the Hardware reset in the idle mode of port accidents may write, In principle, to enter the idle mode of instruction should not be under the command of a pin or an external memory port for a visit.Power-down modeIn power-down mode, the oscillator to stop working, enter the power-down mode ,Instructions, who was the last one, the implementation of the Directive, Chip RAM and all the contents of special function registers the termination of the previous power-down mode be frozen. To withdraw from power-down mode is the only way to reset the hardware, Reset will redefine all the Special Function Registers but Does not change the contents of RAM before the the Vcc work returned to normal levels Shall be null and void and must be reset to maintain a certain period of time in order to restart and oscillator stabilityP1.0 and P1.1 in the non-use of external pull-up resistor on the case should be set to 0, Or in the use of pull-up resistor is set to 1.OscillatorOscillator connected clientXTAL1: RP-oscillator amplifier and internal clock generator inputXTAL2: RP-oscillator amplifier outputCharacteristics of Oscillator XTAL1, XTAL2 ware the RP-chip oscillator amplifier inputs and outputs, Quartz crystal can be composed of the clock oscillator or ceramic oscillator, For more information from the external input clock driver AT89C2051, XTAL1 input clock signal from, XTAL2 should be left vacant.As the input to the internal circuit is a 2-flip-flop, Therefore, the external clock signal input without special requirements, However, it must comply with the maximum level and minimum norms and timingAT89C2051AT89C2051 是美国 ATMEL 公司生产的低电压、高性能 CMOS8 位单片机,片内含 2k bytes 的可反复擦写的只读程序存储器(PEROM)和 128bytes 的随机数据存储器(RAM ),器件采用 ATMEL 公司的高密度、非易失性存储技术生产,兼容标准 MCS-51 指令系统 ,片内置通用 8 位中央处 理器和可反复擦写的 Flash 存储器,可有效地降低开发成本。功能强大 AT89C2051 单片机可提供许多高性价比的应用场合。3.2 主要功能特性:*兼容 MCS51 指令系统;*2KB 可重编程 FLASH 存储器(1000 次);*2.76V 电压范围;*全静态工作:0Hz 24KHz;*2 级程序存储器保密锁定;* 1288 位内部 RAM;*15 条可编程 I/O 线; *两个 16 位定时器/计数器;*6 个中断源,两个外部中断源;*可编程串行通道;*高精度电压比较器(P1.0, P1.1,P3.6); *直接驱动 LED 的输出端口;*低功耗空闲和掉电模式AT89C2051 的管脚引脚图如图 2 所示。1 2 3 4 5 6ABCD654321DCBATitleNumber R ev isio nS izeBDate: 2 1-May -2 00 9 S heet o f F ile: D:P rog ram FilesDesig n Ex plo rer 9 9 S ELib rarySchP ro tel DOS Schematic Libraries.d dbDrawn By :2 01 91 81 71 61 51 41 31 21 1GNDP 3.5P 3.4P 3.3P 3.2XTAL1XTAL2P 3.1P 3.0R STP 3.7P 1.0P 1.1P 1.2P 1.3P 1.4P 1.5P 1.6P 1.7VCC1234567891 0图1 AT89C2051封装管脚引脚图AT89C2051 引脚功能说明:VCC:电源电压GND:地P1 口:P1 口是一组 8 位双向 I/O 接口, P1.2P1.7 提供内部上拉电阻,P1.0和 P1.1 内部无上拉 电阻。P1 口输出缓冲器可吸收 20mA 的电流并可直接驱动LED。编 程和校验时, P1 口作为第八位地址接收。P3 口:P3 口的 P3.0P3.5、P3.7 是带有内部上拉电阻的 7 个双向 I/O 接口。P3.6 没有引出,它作 为一个通用的 I/O 口,但是不可访问。可作为固定输入的片内比较器的输出信号。当 P3 口写入 1 时,它们被内部的上拉电阻拉高并可作为输入端口。P3 口的特殊功能如表 1 所示:RST:复位输 出。当振 荡器复位器件 时,要保持 RST 脚两个机器周期的高电平时间。XTAL1:振荡 器的反相放大器及内部时钟发生器的输入端。XTAL2:振荡 器反相放大器的输出端。表 1 P3 口的特殊功能引脚 功能特性P3.0 RXD (串行输入口)P3.1 TXD (串行输出口)P3.2 (外中断0)0INTP3.3 (外中断1)1P3.4 T0 (定时/计数器0外部输入)P3.5 T1 (定时/计数器1外部输入)定时器定时器概述89C2051 单片机片内有两个 16 位定时器/计数器,即定时器 0(T0)和定时器1(T1)。它们都有定 时和事件 计数功能,可用于定时控制、延时、对外部事件计数和检测等场合。定时器 T0 和 T1 两个 16 位定时器实际上都是 16 位加 1 计数器。其中,T0由两个 8 位特殊功能寄存器 TH0 和 TL0 构成;T1 由 TH1 和 TL1 构成。这些功能都由特殊功能寄存器 TMOD 和 TCON 所控制。 设置为定时工作方式时,定时器计数 AT89C2051 片内振荡器输出的经 12分频后的脉冲,即每个机器周期使定时器的数值加 1 直至计满溢出。当AT89C205 采用 12MHz 晶振时,一个机器周期 为 1s,计数频率为 1MHz。设置为计数工作方式时,通过引脚对外部脉冲信号计数。当输入脉冲信号产生由 1 至 0 的下降沿时,定 时器的值加 1。在每个机器周期的 S5P2 期间采样 T0和 T1 引脚的输入电平,若前一个机器周期采 样值为 1,下一个机器周期采样值为 0,则计 数器加 1。此后的机器周期 S3P
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 第七单元21 古诗词三首山居秋暝说课稿-2024-2025学年五年级上册语文统编版
- 别墅保洁合同
- 北京市非居民其他垃圾清运合同
- 肝胆管癌外科治疗方案
- 旅游活动的分类依据
- 广东省茂名市信宜市2024-2025学年五年级上册期中考试语文试卷(无答案)
- 17 A光的折射 基础版2025新课改-高中物理-选修第1册(21讲)
- 河南省郑州市新密市2024-2025学年一年级(上)期中语文试卷(含答案)
- 激光比长仪相关行业投资规划报告范本
- 社交电商相关行业投资方案2
- 4.2+酶催化细胞的化学反应(教学课件)-【知识精讲精研】高一生物 (沪科版2020必修1)
- 小学生汽车发展史新能源课件
- 森林资源概况课件
- 王贵启-玉米田杂草发生发展及除草剂优解-合肥0728
- 幼儿园幼小衔接实施方案(修改)
- 2023北京海淀区八上初二期末数学试卷及答案
- 浙江重症医学专科护士理论考核试卷与答案
- 沟槽土方开挖工程专项施工方案范文
- 胰腺癌的影像学表现课件
- 电梯维保报价单【模板】
- 2023年四川凉山州木里重点国有林保护局招聘18人笔试备考试题及答案解析
评论
0/150
提交评论