最新消息:学生作文网,您身边的作文指导专家!

linux,51 51单片机教程

字数作文 zuowen 2浏览

【 – 字数作文】

篇一:《51单片机10-Linux技术丛书47-48》

Linux技术丛书 47

Linux技术丛书

Linux内核分析及编程

倪继利 著 2005年8月出版 ISBN 7-121-01518-8 88.00元 823页

本书作者在整理自己多年研发笔记的基础上,以精心挑选的典型开发实例,向读者详细讲述了Linux内核源代码的各部分结构、原理及组成框架,主要分析了Linux最新版本(2.6.11)的内核源代码,帮助读者深

入理解Linux内核,精通Linux内核编程。全书分为20章,内容包括进程管理、进程间通信、内存管理、文

件系统、I/O接口及资源管理、内核的编译及调试原理、网络通信、内核安全、USB驱动程序等。

对于想了解Linux开发,以及从事Linux内核编程的开发人员来说,本书是一本集大成之作,它既有讲

解透彻的原理,也有详细实用的示例,更有作者多年从事实际开发工作的心得。本书主要针对从事Linux内

核编程的中高级读者及软件工程师,也很合适作为大学教材和参考书。

网友

评论 倪继利先生能够把自己的经验心得体会加以总结并奉献出来,这在中国实属不易,而且著作能够涵盖这么广的范围,更是难能可贵。我相信很多人都会从中受益。

——转自china-pub,作者yangning

Qt及Linux操作系统窗口设计

倪继利 编著 2006年4月出版 ISBN 7-121-02434-9 68.00元 450页

如何在Linux内核上建立窗口系统,这是嵌入式设备软件开发工程师必须了解的。Qt/Embedded是高端

嵌入式设备PDA及手机的主流开发工具。作为一项成熟的技术,KDE桌面系统对于嵌入式窗口系统的设

计有很大参考价值;Qtopia给嵌入式窗口系统提供了很好的框架。本书不仅阐述了KDE及X Window的机

制,分析了Qt及Qt/Embedded开发工具的核心技术,而且还详细介绍了如何在嵌入式设备上建立Qtopia

窗口系统。掌握了本书中所介绍的技能,读者可以在Linux内核上建立窗口系统,开发应用程序并能够在

PC上模拟运行为嵌入式设备开发的应用程序。

本书主要针对从事开发Linux应用程序的软件工程师,也很适合作为大学教材和参考书。

48

IT专业开发类

Linux

安全体系分析与编程

倪继利 编著 2007年11月出版 ISBN 7-121-05019-0 98.00元 788页

本书选择经典的开放源代码,全面系统地分析了Linux安全机制。本书共有17章,前10章着重介绍

了Linux操作系统的安全机制及实现方法,阐述了公钥设施的基本概念和使用openSSL库接口进行编程的

方法。后7章介绍了可信平台模块框架规范和可信网络连接框架规范,并分析了可信平台模块的驱动程序

的实现机制。另外,作者还结合实际代码归纳了Linux系统编程的编程模式,介绍了Makefile生成方法和

ELF文件执行过程。

的安全;创建高度可配置的报文过滤防火墙以保护网络安全;使用Frees/WAN构建安全的VPN;使用端口

印服务的配置与管理、NFS服务的配置与管理、Samba服务的配置与管理、DHCP服务的配置与管理、电子{linux,51单片机}.

邮件服务的配置与管理、NAT服务的配置与管理、MySQL数据库的配置与管理、代理服务的配置与管理、

LDAP服务的配置与管理、VPN服务的配置与管理、Webmin管理工具,以及网络安全与病毒防护。本书内容丰富、语言通俗易懂、叙述深入浅出,非常适合于初、中级Linux用户,既可以作为各类院校相关专业的教材及Linux培训班的教材,也可以作为广大Linux爱好者的专业参考书。

Red Hat Linux 9编程开发与网络管理

冉林仓 编著 2006年6月出版 ISBN 7-121-02667-8 39.00元 372页

本书基于Red Hat Linux操作系统,从简单的命令入手,着重介绍它在网络服务器方面的应用。从远程

控制和远程文件共享着手,介绍了Linux系统引导、服务程序和各种命令、基本网络配置和应用。本书用

大量篇幅介绍Red Hat Linux环境下的各种服务,包括DNS、WWW、FTP、Samba、Sendmail、SSH、Proxy,

以及数据库、防火墙的安装、配置和管理维护。最后两章介绍如何使用Shell脚本和GNU C开发环境开发

满足用户需要的应用系统。本书力求全面,讲究实用,尽量做到学用结合,言简意赅,通过实例深化理解。

本书可以作为Linux短期培训、大中专院校相关专业的培训教材,也可以作为广大Linux爱好者的

实用指南。

{linux,51单片机}.

Linux技术丛书 49

航院徐博整理上传

篇二:《(详细比较)AVR和51单片机的区别以及编程的区别》

编程与移植常见问题:

51单片机的程序移植到avr单片机应该怎样移植 注意什么问题 ? 答:如果是C语言的话,有限关键字会有改变,头文件要重新写,函数的一些写法会有所改变,AVR的编译器很多,每种编译器都有自己的独特写法,要先了解编译器后在做移植,成功率会更高。

另外,先要选择好编译器,C编译器如GCC,ICC,CVAVR,IAR等,看你选哪种编译器,汇编编译器如AVR Studio。

头文件不需要自己写,每种编译器有自带的头文件,你只要#include就可以了。不过要include对。

51程序(针对keil编译器)和AVR程序(上述的一些编译器,如GCC)最主要的不同:

1,因为51的io口为准双向io,所以对io口的操作不用设置io的方向,而AVR是双向io,每次对io操作,如输出输入都要对io的方向进行设置。 2,关键字不同,code是keil c51的非标准写法,如果AVR要使用常量,可以用const关键字取代。还有data关键字取消,也就是说什么data,

idata,xdata,pdata都不可以使用。相对来说avr的编译器比较接近标准c。 3,51可以位操作,但是avr基本不使用位操作,因为avr可以位操作的区域比较少,所以sbit,bit什么的只有在51出现,avr不可以使用,除非你自己定义一个结构体。

4,中断的写法,这个每个编译器基本都不一样,呵呵,比如iar会使用#pragma关键字,gcc有固定的函数入口ISR(中断向量)。

avr比51强大很多,比如移植spi的程序,你可以自己写个avr的spi程序来取代,而不用像51一样io模拟。以上是我暂时能想到的比较大的区别,移植起来首先要注意的地方,如果还有疑问,你可以追问的。

2)单片机AT89S51和AT89C51的区别

89S51相对于89C51增加的新功能包括:

— 新增加很多功能,性能有了较大提升,价格却基本不变,甚至比89C51更低! — ISP在线编程功能,这个功能的优势在于改写单片机存储器内的程序不需要把芯片从工作环境中剥离。是一个强大易用的功能。

— 工作频率为33MHz,大家都知道89C51的极限工作频率只有24M,就是说S51具有更高工作频率,从而具有了更快的计算速度。

— 具有双工UART串行通道。

— 内部集成看门狗计时器,不再需要像89C51那样外接看门狗计时器单元电路。 — 双数据指示器。

— 电源关闭标识。

— 全新的加密算法,这使得对于89S51的解密变为不可能,程序的保密性大大加强,这样就可以有效的保护知识产权不被侵犯。

— 兼容性方面:向下完全兼容51全部字系列产品。比如8051、89C51等等早期MCS-51兼容产品。也就是说所有教科书、网络教程上的程序(不论教科书上采用的单片机是8051还是89C51还是MCS-51等等),在89S51上一样可以照常运行,这就是所谓的向下兼容。

比较结果:就如同INTEL的P3向P4升级一样,虽然都可以跑Windows98,不过速度是不同的。

从AT89C51升级到AT89S51 ,也是同理。和S51比起来,C51就要逊色多了,实际应用市场方面技术的进步是永远向前的。

AT89S51内含flash支持并口isp(在系统编程),用isp线在线路板上即可编程,不用专门的编程器。AT89C51只带EEPROM,只能在编程器编程,编程次数寿命不如AT89S51。

主要是程序写放方式不同,AT89C51要放在编程器上写入程序,AT89S51还可以在电路的低电压、高性能CMOS 8位微处理器,俗称单片机。AT89C2051是一种带2K字节 。

从编程的角度来讲,这两个是没区别的,编程语言语法等都是一样的。

从烧录的角度来讲,AT89S51支持在线可编程,也就是说可以通过电脑的串口直接烧录(当然,需要电平匹配,要加一块232芯片),而AT89C51需要用专门的烧录器烧录。

单片机之间的比较 AT89S51系列单片机

1 简介

1980,英特尔公司开发出一种简易的8031CPU,在当时该CPU性能不比8086差很多,但价格较便宜,因此被很多低端应用选中。由于市场看好,ATMEL公司购买了8031的内核,把Flash存储器和加强型IO口融入进去开发出了AT89系列单片机。所有兼容8031指令和内核相似的单片机统称为51单片机,它是目前应用最广泛的8位单片机之一。因51单片机结构简单,指令易学,应用广泛,因此是初学单片机首选机型。如果有人想不学51,直接学AVR,那么此人一定会遇到很多难题,困惑和郁闷将伴随着学习过程。如果学了51再学AVR和其他单片机,人们会发现“所谓单片机都不过如此”。

2

性能

根据任务具体需要选择最合适的单片机,使单片机资源充分利用,使系统性价比达到最高,同时兼顾未来扩展需要,不一味追求高性能单片机,这就是选单片机的原则。

AT89S51有4K的Flash程序存储器,128字节的RAM,32条IO口,中断系统具有6个中断源、5个终端矢量、2个中断优先级的中断结构;串行口是一个全双工的串行通信口;AT89S51的电源电压为4.0-

5.5V,AT89LS51的电源电压为2.7-4.0V;振荡器频率0-33MHz(AT89S51),0-16MHz(AT89LS51); 有ISP 在线编程功能,这个功能的优势在于改写单片机存储器内的程序不需要把芯片从工作环境中剥离。是一个强大易用的功能。

AT89S52程序储存器容量为8KB,还有AT89S55,ROM容量更大。

有很多公司生产了很多扩展型51系列单片机,有的带有AD转换器,有的带有比较器,有的带有PWM,读者可以根据自身需要选择合适的51单片机,但要注意他们的管脚定义和编程方式。

3 使用方法

AT89S51 适于做单片机学习板、电子时钟、超声波测距仪等不需要采集模拟量和控制大功率外部元件的电路。S51与过去的C51的区别在于S51支持ISP在线编程,即C51需要几百元的编程器编程,而S51仅需一条25针并口线和非常简单的转换电路即可接在台式电脑打印机接口烧程序,下载烧程序小软件即实现可对S51单片机编程。对51单片机编程一般选用Keil软件,可采用C语言或者汇编语言,编完程后选择输出HEX文件,然后用烧程序小软件读取HEX文件,再烧写到单片机中。

4 实践经验

A 刚开始看书时,按照书上的电路图连线然后通电调试,但总不成功,将自己的电路和书上的电路仔细对照发现不了问题。原因在于很多书上的电路图都是“简化图”,即省略了一些电路,而这些被省略的电路却关乎系统的运行。比如,当单片机书讲到AD转换电路,给出的电路图多省略了晶振和复位电路,按照AD转换电路图搭出来的系统自然不能运行。

B 51单片机P0口输出信号时需要上拉电阻,我经常忘记加电阻,导致电路不好使。

C 51单片机31引脚需要接正极,以选择采用内部程序存储器。如果忘记给这个引脚以正确的电压,你的单片机可能不能执行程序。

4 应用举例{linux,51单片机}.

欢迎光临理工科学,发帖得花花?? 2010-9-2 21:21 tT #2

四 爱好者制作机器人首选 AVR系列单片机

云淡~风轻

龙鱼

一个人的远行 1 简介 AVR单片机是1997年由ATMEL公司研发出的增强型内置Flash的RISC(Reduced Instruction Set CPU) 精简指令集高速8位单片机。

高可靠性、功能强、高速度、低功耗和低价位一直是衡量单片机性能的重要指标,而AVR单片机是典型高性能单片机。

早期单片机,比如51单片机为了提高可靠性(防止数据误读或跑飞)采用较高的分频系数对时钟分频,使得指令周期长,执行速度慢。例

如51单片机需要12个晶振周期才能组成1个机器周期,而且很多指令需要2个机器周期才能执行。AVR单片机的推出,彻底打破这种旧

经 验 值 1019

美 味 虾 189

注册日期 2007-10-15

最近登陆 2012-1-11 设计格局,废除了机器周期,采用精简指令集,取指周期短,又可预取指令,实现流水作业,故可高速执行指令。AVR单片机在12个晶振

周期中能执行12条指令,从这个角度看,如果晶振频率相同,AVR的速度是51的12倍到24倍。

AVR有32个通用寄存器,在进行大量复杂运算时,AVR的32个寄存器可相当于51的32个累加器,克服了51系列单片机只有单一累加器数据处理造成的瓶颈现象,在复杂运算时速度比51快5倍以上。由此可状态

篇三:《从51单片机到嵌入式》

学习嵌入式基本的知识你已经学习了,但是仅仅是知道或者是有一点基础还是远远不够的,毕竟嵌入式技术是IT行业的一个新兴的技术方向,它是具有一定的技术难度的,要想很好的掌握是不容易的,所以一定要把基础打好。嵌入式技术从开发环境、开发平台还有开发语言来说,目前分为三个方向,就市场占有率而言以linux+ARM主打。所以你可以选择这个方向。

嵌入式技术是软硬件结合的,所以理所当然要具备一定的硬件方面的基础。你之前有学过51单片机,那么只要把硬件强化一下即可。重点是软件方面。

嵌入式linux+ARM方向,主要是在linux环境下C语言编程,C语言在开发过程中具有十分重要的地位,所以要很熟练的掌握。如果,上述已经掌握的很好了,那么接下来既可以进入到学习linux、ARM的阶段了。可以先从linux开始。{linux,51单片机}.

, 我就从最简单的C语言视频教程学起,话说简单,其实我还是很多不懂的,我只好请教他们,他们还是很热心的,都帮我解决了。C语言我差不多学了一个礼拜,接下来我就学了linux的基本命令,我在他们提供linux虚拟机上都有做练习,敲linux的基本命令,写简单的C语言代码,差不多也就三个礼拜。我每天都在不停的写一些简单的代码,这样一月后我基本掌握了C和linux的基本操作。

接下来我就去学习了人家的视频的培训教程,是整套的,和去参加培训没有多大的区别,这一看就是两个月,学习了ARM的基本原理,学习嵌入式系统的概念,也掌握了嵌入式的环境的一些搭建,对linux也有更深层次的理解了,明白了嵌入式应用到底是怎么做的,但是驱动我只是有一点点的了解,这个相对难一点,我想以后再慢慢啃。

这两个月,除了吃饭睡觉,我几乎都在学习。因为我知道几乎没有基础,比别人差劲,我只能坚持努力着,我不能放弃,我必要要靠自己来养活自己,必须学好这门技术,同时我不懂的就问,这里真的很感谢他们的技术客服对我的任何问题都是耐心的解答,每天都我几乎都有好几个问题问他们,然后我就把不懂的问题总结记下来,这样慢慢积累了一段时间,我发现自己真的有点入门了。

最后的一个月,我就去看关于实践部分的内容,了解嵌入式项目具体的开发流程,需要什么样的知识,我就开始准备这方面的知识,也就是学习这方面的视频,同时他们建议我去找了找一些嵌入式面试的题目,为自己以后找工作做准备。我就到网上找了很多嵌入式的题目,把他们理解的记下来,这样差不多准备了20天左右

我觉得自己差不多入门了,会做一些简单的东西了。我就想去找工作看看,于是我就到51job疯狂的投简历,因为我学历的问题,专科没有毕业,说真的,大公司没有人会要我,所以我投的都是民营的小公司,我希望自己的努力有所回报。没有想过几天过后,就有面试了,但是第一次面试我失败了,虽然我自认为笔试很好,因为我之前做了准备,但是他们的要求比较严格,需要有一年的项目经验,所以我没有被选中。

后来陆续面试了几家公司,终于功夫不负有心人。我终于面试上的,是在闵行的一家民营的企业,公司规模比较小,我的职务是嵌入式linux应用开发,做安防产品的应用的。我想我也比较幸运,经理很看重我的努力,就决定录用我,开的工资是3500一个月,虽然我知道在上海3500只能过温饱的生活,但是我想我足够了。我至少不用每天都要靠父母养,

我自己也能养活自己的。我想只要我继续努力,我工资一定会翻倍的。

把本文写出来,希望能让和我一样的没有基础的朋友有信心,其实我们没有必要自卑,我们不比别人笨,只要我们肯努力,我们一样会成功

篇四:《51单片机英文及其翻译》

英文翻译

原文:

51 Microcontroller Introduction

{linux,51单片机}.

Microcontrollers basic component is a central processing unit (CPU in the computing device and controller), read-only memory (usually expressed as a ROM), read-write memory (also known as Random Access Memory MRAM is usually expressed as a RAM) , input / output port (also divided into parallel port and serial port, expressed as I / O port), and so composed. In fact there is also a clock circuit microcontroller, so that during operation and control of the microcontroller, can rhythmic manner. In addition, there are so-called "break system", the system is a "janitor" role, when the microcontroller control object parameters that need to be intervention to reach a particular state, can after this "janitor" communicated to the CPU, so that CPU priorities of the external events to take appropriate counter-measures.

Microcontrollers are used in a multitude of commercial applications such as modems, motor-control systems, automotive engine and among others. The high processing speed and enhanced peripheral set of these microcontrollers make them suitable for such high-speed event-based applications. However, these critical application domains also require that these microcontrollers are highly reliable. The high reliability and low market risks can be ensured by a robust testing process and a proper tools environment for the validation of these microcontrollers both at the component and at the system level. Intel Platform Engineering department developed an object-oriented multi-threaded test environment for the validation of its AT89C51 automotive microcontrollers. The goals of this environment was not only to provide a robust testing environment for the AT89C51 automotive microcontrollers, but to develop an environment which can be easily extended and reused for the validation of several other future microcontrollers. The environment was developed in conjunction with Microsoft Foundation Classes (AT89C51). The paper describes the design and mechanism of this test environment, its interactions with various hardware/software environmental components, and how to use AT89C51.

Are 8-bit microcontroller early or 4 bits. One of the most successful is the INTEL 8031, for a simple, reliable and good performance was a lot of praise. Then developed in microcontroller, but not ideal because the cost has not been very widely used. After 90 years with the great development of consumer electronics, microcontroller technology has been a huge increase. With INTEL i960 series, especially the later series of widely used ARM, 32-bit microcontroller quickly replace high-end 16-bit MCU status and enter the mainstream market. The traditional 8-bit microcontroller performance have been the

rapid increase capacity increase compared to 80 the number of times. Currently, high-end 32-bit microcontroller clocked over 300MHz, the performance catching the mid-90s dedicated processor, while the average model prices fall to one U.S. dollar, the most high-end model is only 10 dollars. Modern SCM systems are no longer only in the development and use of bare metal environment, a large number of proprietary embedded operating system is widely used in the full range of SCM. The handheld computers and cell phones as the core processing of high-end microcontroller can even use a dedicated Windows and Linux operating systems.

achieve different functions, in particular special unique features, this is another device much effort needs to be done, some are great efforts are very difficult to achieve. A not very complex functions if the 50's with the United States developed 74 series, or the 60's CD4000 series of these pure hardware buttoned, then the circuit must be a large PCB board! But if the United States if the 70's with a series of successful SCM market, the result will be a drastic change! Just because you are prepared by microcomputer programs can achieve high intelligence, high efficiency and high reliability!

Introduction

The 8-bit AT89C51 CHMOS microcontrollers are designed to handle high-speed calculations and fast input/output operations. MCS 51 microcontrollers are typically used for high-speed event control systems. Commercial applications include modems, motor-control systems, printers, photocopiers, air conditioner control systems, disk drives, and medical instruments. The automotive industry use MCS 51 microcontrollers in engine-control systems, airbags, suspension systems, and antilock braking systems (ABS). The AT89C51 is especially well suited to applications that benefit from its processing speed and enhanced on-chip peripheral functions set, such as automotive power-train control, vehicle dynamic suspension, antilock braking, and stability control applications. Because of these critical applications, the market requires a reliable cost-effective controller with a low interrupt latency response, ability to service the high number of time and event driven integrated peripherals needed in real time applications, and a CPU with above average processing power in a single package. The financial and legal risk of having devices that operate unpredictably is very high. Once in the market, particularly in mission critical applications such as an autopilot or anti-lock braking system, mistakes are financially

Prohibitive. Redesign costs can run as high as a $500K, much more if the fix means back annotating it across a product family that share the same core and/or peripheral design flaw. In addition, field replacements of components are extremely expensive, as the devices are typically sealed in modules with a total value several times that of the component. To mitigate these problems, it is essential that comprehensive testing of the controllers be carried out at both the component level and system level under worst case environmental and voltage conditions. This complete and thorough validation necessitates not only a well-defined process but also a proper environment and tools to facilitate and execute the mission successfully.

Intel Chandler Platform Engineering group provides post

Silicon system validation (SV) of various micro-controllers and processors. The system validation process can be broken into three major parts. The type of the device and its application requirements determine which types of testing are performed on the device.

The AT89C51 provides the following standard features: 4Kbytes of flash, 128 bytes of RAM, 32 I/O lines, two 16-bittimer/counters, five vector two-level interrupt architecture, a full duple ser -ail 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, timer/counters, serial port and interrupt sys -tem to continue functioning. The Power-down Mode saves the RAM contents but freezes the social -labor disabling all other chip functions until the next hardware reset.

Pin Description

{linux,51单片机}.

VCC Supply voltage.

GND 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 may also be configured to be the multiplexed lowered 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 program verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/so -urge 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 verification.

Port 2

Port 2 is an 8-bit bi-directional I/O port with internal pullups.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 (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 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 verification.

Port 3

Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/soul -race 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.

RST

Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.

ALE/PROG

Address 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 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped dui -nag each access to external DataMemory.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 is the read strobe to external program memory. When the AT89C51 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.{linux,51单片机}.

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 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. A should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.

The 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 Mode.

Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum on PO.7. Once the write cycle has been completed, true data are valid on all outputs, and

The next cycle may begin. Data Polling may begin any time after a write cycle has been initiated.

Ready/Busy: The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY.

Program Verify: If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by{linux,51单片机}.

observing that their features are enabled.

A microcomputer interface converts information between two forms. Outside the microcomputer the information handled by an electronic system exists as a physical signal, but within the program, it is represented numerically. The function of any interface can be broken down into a number of operations which modify the data in some way, so that the process of conversion between the external and internal forms is carried out in a number of steps.

An analog-to-digital converter (ADC) is used to convert a continuously variable signal to a corresponding digital form which can take any one of a fixed number of possible binary values. If the output of the transducer does not vary continuously, no ADC is necessary. In this case the signal conditioning section must convert the incoming signal to a form which can be connected directly to the next part of the interface, the input/output section of the microcomputer itself.

Output interfaces take a similar form, the obvious difference being that here the flow of information is in the opposite direction; it is passed from the program to the outside world. In this case the program may call an output subroutine which supervises the operation of the interface and performs the scaling numbers which may be needed for a digital-to-analog converter (DAC). This subroutine passes information in turn to an output device which produces a corresponding electrical signal, which could be converted into analog form using a DAC. Finally the signal is conditioned (usually amplified) to a form suitable for operating an actuator.

The signals used within microcomputer circuits are almost always too small to be connected directly to the “outside world” and some kind of interface must be used to translate them to a more appropriate form. The design of section of interface circuits is one of the most important tasks facing the engineer wishing to apply microcomputers. We have seen that in microcomputers information is represented as discrete patterns of bits; this digital form is most useful when the microcomputer is to be connected to equipment which can only be switched on or off, where each bit might represent the state of a switch or actuator.

To solve real-world problems, a microcontroller must have more than just a CPU, a program, and a data memory. In addition, it must contain hardware allowing the CPU to access information from the outside world. Once the CPU gathers information and processes the data, it must also be able to effect change on some portion of the outside world. These hardware devices, called peripherals, are the CPU’s window to the outside.

The most basic form of peripheral available on microcontrollers is the general purpose I70 port. Each of the I/O pins can be used as either an input or an output. The function of each pin is determined by setting or clearing corresponding bits in a corresponding data direction register during the initialization stage of a program. Each output pin may be driven to either a logic one or a logic zero by using CPU instructions to pin may be viewed (or read.) by the CPU using program instructions.

Some type of serial unit is included on microcontrollers to allow the CPU to communicate bit-serially with external devices. Using a bit serial format instead of bit-parallel format requires fewer I/O pins to perform the communication function, which makes it less expensive, but slower. Serial transmissions are performed either synchronously or asynchronously.

Its applications

篇五:《AT89C51单片机简介》

4.1 AT89C51 简介:

AT89C51(如图2-10所示)是一种带4K字节闪烁可编程可擦除只读存储器(FPEROM—Falsh Programmable and Erasable Read Only Memory)的低电压,高性能CMOS8位微处理器,俗称单片机。该器件采用ATMEL高密度非易失存储器制造技术制造,与工业标准的MCS-51指令集和输出管脚相兼容。由于将多功能8位CPU和闪烁存储器组合在单个芯片中,ATMEL的AT89S

转载请注明:中小学优秀作文大全_作文模板_写作指导_范文大全 » linux,51 51单片机教程