电脑中英文对照单片机编译
⑴ 求有关单片机方面的中英文对照翻译,毕设用的,英文字符数5000字。
..
⑵ 单片机 中英文翻译
The AVR core combines a rich instruction set with 32 general purpose working registers.
All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing
two independent registers to be accessed in one single instruction executed in one clock
cycle. The resulting architecture is more code efficient while achieving throughputs up to
ten times faster than conventional CISC microcontrollers.
The ATmega8 provides the following features: 8K bytes of In-System Programmable
Flash with Read-While-Write capabilities, 512 bytes of EEPROM, 1K byte of SRAM, 23
general purpose I/O lines, 32 general purpose working registers, three flexible
Timer/Counters with compare modes, internal and external interrupts, a serial program-
mable USART, a byte oriented Two-wire Serial Interface, a 6-channel ADC (eight
channels in TQFP and MLF packages) where four (six) channels have 10-bit accuracy
and two channels have 8-bit accuracy, a programmable Watchdog Timer with Internal
Oscillator, an SPI serial port, and five software selectable power saving modes. The Idle
mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt
system to continue functioning. The Power-down mode saves the register contents but
freezes the Oscillator, disabling all other chip functions until the next Interrupt or Hard-
ware Reset. In Power-save mode, the asynchronous timer continues to run, allowing the
user to maintain a timer base while the rest of the device is sleeping. The ADC Noise
Rection mode stops the CPU and all I/O moles except asynchronous timer and
ADC, to minimize switching noise ring ADC conversions. In Standby mode, the crys-
tal/resonator Oscillator is running while the rest of the device is sleeping. This allows
very fast start-up combined with low-power consumption.
The device is manufactured using Atmel’s high density non-volatile memory technology.
The Flash Program memory can be reprogrammed In-System through an SPI serial
interface, by a conventional non-volatile memory programmer, or by an On-chip boot
program running on the AVR core. The boot program can use any interface to download
the application program in the Application Flash Memory. Software in the Boot Flash
Section will continue to run while the Application Flash Section is updated, providing
true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-
Programmable Flash on a monolithic chip, the Atmel ATmega8 is a powerful microcon-
troller that provides a highly-flexible and cost-effective solution to many embedded
control applications.
The ATmega8 AVR is supported with a full suite of program and system development
tools, including C compilers, macro assemblers, program debugger/simulators, In-Cir-
cuit Emulators, and evaluation kits.
AVR 内核具有丰富的指令集和 32 个通用工作寄存器。所有的寄存器都直接与算逻单元
(ALU) 相连接,使得一条指令可以在一个时钟周期内同时访问两个独立的寄存器。这种结
构大大提高了代码效率,并且具有比普通的 CISC微控制器最高至 10倍的数据吞吐率。
ATmega8 有如下特点 :8K 字节的系统内可编程 Flash( 具有同时读写的能力,即 RWW),
512 字节 EEPROM,1K 字节 SRAM,32 个通用 I/O 口线,32 个通用工作寄存器,三个
具有比较模式的灵活的定时器 / 计数器 (T/C), 片内 / 外中断,可编程串行 USART,面向
字节的两线串行接口, 10 位 6 路 (8 路为 TQFP 与 MLF 封装 )ADC,具有片内振荡器的
可编程看门狗定时器,一个 SPI 串行端口,以及五种可以通过软件进行选择的省电模式。
工作于空闲模式时 CPU 停止工作,而 SRAM、 T/C、 SPI 端口以及中断系统继续工作;
掉电模式时晶体振荡器停止振荡,所有功能除了中断和硬件复位之外都停止工作;在省
电模式下,异步定时器继续运行,允许用户保持一个时间基准,而其余功能模块处于休眠
状态; ADC 噪声抑制模式时终止 CPU 和除了异步定时器与 ADC 以外所有 I/O 模块的工
作,以降低 ADC 转换时的开关噪声; Standby 模式下只有晶体或谐振振荡器运行,其余
功能模块处于休眠状态,使得器件只消耗极少的电流,同时具有快速启动能力。
本芯片是以 Atmel 高密度非易失性存储器技术生产的。片内 ISP Flash 允许程序存储器通
过 ISP 串行接口,或者通用编程器进行编程,也可以通过运行于 AVR 内核之中的引导程
序进行编程。引导程序可以使用任意接口将应用程序下载到应用Flash存储区(Application
Flash Memory)。在更新应用Flash存储区时引导Flash区(Boot Flash Memory)的程序继续
运行,实现了 RWW 操作。 通过将 8 位 RISC CPU 与系统内可编程的 Flash 集成在一个
芯片内,ATmega8 成为一个功能强大的单片机,为许多嵌入式控制应用提供了灵活而低
成本的解决方案。
ATmega8 具有一整套的编程与系统开发工具,包括:C 语言编译器、宏汇编、 程序调试
器 / 软件仿真器、仿真器及评估板。
自己先选一个AVR单片机的型号,然后可以在网上找到其中文和英文datasheet,自己对照稍微改一下,增加几句自己的话就可以简单搞定了,如上面的内容一样
⑶ 本人现急需关于单片机的中英文翻译对照,英文是PDF格式的 .谢谢!!小弟不胜感激.
单片机接口
微机接口实现两种信息形式的交换。在计算机之外,由电子系统所处理的信息以一种物理信号形式存在,但在程序中,它是用数字表示的。任一接口的功能都可分为以某种形式进行数据库变换的一些操作,所以外部和内部形式的转换是由许多步骤完成的。
用图18.1所示的情况为例加以说明,图中展示了微计算机和产生连续变化模拟信号的传感器之间的接口。传感器产生的信号常很小,需要放大,或者产生的信号和形式被系统的其他部分处理之前需要再次转换。举例来说,许多传感器具有电阻变化,这必须由一专门电路转换成电压。这种将传感器输出转换成电压信号,并与系统的其他电路相连接的过程,称为信号调理。如图18.1所示例子中,信号调理部分将源自传感器的电压或电流信号范围转换成可用模拟-数字转换器变成数字形式的信号范围。
模拟-数字转换器(ADC)用来将连续变化信号变成相应的数字量,这数字量可是可能性的二进制数值中的一固定值。如果传感器输出不是连续变化的,就不需模拟-数字转换。这种情况下,信号调理单元必须将输入信号变换成为另一信号,也可直接与接口的下一部分,即微计算机本身的输入输出单元相连接。
输入/输出单元将数字“开/关”电压信号转换成能通过系统总线传送到计算机的信号形式。这里每一根线的状态,无论是“开”或是“关”,用相应的“1”或“0”表示。对于已经转换成数字形式的模拟输入量,内部表示中用1和0组成的排列形式与被转换量相对应的二进制数。
从接口得到的愿数值会受到接口电路设计的限制,而且常需要线性化和量程调整才能形成适合于在主程序中使用的数值。举例来说,接口可用于转换范围为0至255之间。显然,从程序员的观点,对温度进行直接的处理要比使用由ADC所产生的与一给定温度相一致的值要容易
Monolithic integrated circuit connection the microcomputer connection realizes two kind of information form exchange. Outside the computer, the information which processes by the electronic system by one physical signal form existence, but in the procere, it is with the digital presentation. Any connection's function may divide into by some form carries on the database transformation some operations, therefore exterior and internal form's transformation is completes by many steps. the situation which 18.1 with shown in Figure explained for the example, in the chart had demonstrated the micro computer and proces changes the simulated signal continuously between sensor's connection. The sensor proces the signal is very often small, needs to enlarge, or proces before signal and form by system's other parts of processing, needs to transform once more. For example, many sensors have the resistance change, this must by a special circuit switching voltage. This kind transforms the sensor output the voltage signal, and process which connects with system's other electric circuits, is called the signal recuperation. As shown in Figure 18.1 in the example, the signal recuperation part will come from sensor's voltage or the electric current signal scope transforms the available analog-to-digital converter to turn the digital form the signal scope. the analog-to-digital converter (ADC) will use for to change the signal to turn the corresponding digital quantity continuously, but this digital quantity in a possible binary value fixture. If the sensor outputs is not changes continuously, cannot simulate - the digital conversion. In this kind of situation, the signal recuperation unit must input inversion into another signal, may also with the connection next part, namely the micro computer's input output unit connect directly. the input/output unit “opens the digit/the pass” the voltage signal conversion to be able to transmit through the system bus to computer's signal form. Here each line condition, regardless of being “opens” perhaps “the pass”, with corresponding “1” or “0” expressed. Regarding already transformed the digital form the simulation input value, the interior expressed that with is transformed with 1 and 0 composition's arrangement form the binary number which the quantity corresponds. will obtain from the connection is willing the value to receive the interface circuit design the limit, moreover often needs to linearize with the range adjustment can form suits in the value which will use in the master routine. For example, the connection may use in transforming the scope is 0 to 255 between. Obviously, as soon as from programmer's viewpoint, carries on direct processing to the temperature to with assign the temperature consistent value which compared to the use proces by ADC to want easy
⑷ 单片机中英文互译
Based on single-chip processing slender axis error compensation system design
⑸ 计算机类中英文对照翻译
从计算机的类型、运行方式、构成器件、操作原理、应用状况等划分,计算机有多种分类。
从数据表示来说,计算机可分为数字计算机、模拟计算机以及混合计算机三类;
数字计算机按构成的器件划分,曾有机械计算机和机电计算机,现用的电子计算机,正在研究的光计算机、量子计算机、生物计算机、神经计算机等等。
电子计算机就其规模或系统功能而言,可分为巨型、大型、中型、小型、微型计算机和单片机。
综合起来说,计算机的分类是这样的:
(1)按照性能指标分类
① 巨型机: 高速度、大容量
② 大型机: 速度快、应用于军事技术科研领域
③ 小型机: 结构简单、造价低、性能价格比突出
④ 微型机: 体积小、重量轻、价格低
(2)按照用途分类
① 专用机: 针对性强、特定服务、专门设计
② 通用机: 科学计算、数据处理、过程控制解决各类问题
(3)按照原理分类
① 数字机: 速度快、精度高、自动化、通用性强
② 模拟机: 用模拟量作为运算量,速度快、精度差
③ 混合机: 集中前两者优点、避免其缺点,处于发展阶段
[编辑本段]构成
不论何种计算机,它们都是由硬件和软件所组成,两者是不可分割的。人们把没有安装任何软件的计算机称为裸机。
硬件
计算机系统中所使用的电子线路和物理设备,是看得见、摸得着的实体,如中央处理器( CPU )、存储器、外部设备(输入输出设备、I/O设备)及总线等。
①存储器。主要功能是存放程序和数据,程序是计算机操作的依据,数据是计算机操作的对象。存储器是由存储体、地址译码器 、读写控制电路、地址总线和数据总线组成。能由中央处理器直接随机存取指令和数据的存储器称为主存储器,磁盘、磁带、光盘等大容量存储器称为外存储器(或辅助存储器) 。由主存储器、外部存储器和相应的软件,组成计算机的存储系统。
②中央处理器的主要功能是根据存储器内的程序 ,逐条地执行程序所指定的操作。中央处理器的主要组成部分是:数据寄存器、指令寄存器、指令译码器、算术逻辑部件、操作控制器、程序计数器(指令地址计数器 )、地址寄存器等。
③外部设备是用户与机器之间的桥梁。输入设备的任务是把用户要求计算机处理的数据、字符、文字、图形和程序等各种形式的信息转换为计算机所能接受的编码形式存入到计算机内。输出设备的任务是把计算机的处理结果以用户需要的形式(如屏幕显示、文字打印、图形图表、语言音响等)输出。输入输出接口是外部设备与中央处理器之间的缓冲装置,负责电气性能的匹配和信息格式的转换。
软件
对能使计算机硬件系统顺利和有效工作的程序集合的总称。程序总是要通过某种物理介质来存储和表示的 ,它们是磁盘、磁带、程序纸、穿孔卡等,但软件并不是指这些物理介质,而是指那些看不见、摸不着的程序本身。可靠的计算机硬件如同一个人的强壮体魄,有效的软件如同一个人的聪颖思维。
计算机的软件系统可分为系统软件和应用软件两部分。系统软件是负责对整个计算机系统资源的管理、调度、监视和服务。应用软件是指各个不同领域的用户为各自的需要而开发的各种应用程序。计算机软件系统包括:
①操作系统 :系统软件的核心,它负责对计算机系统内各种软、硬资源的管理、控制和监视。
②数据库管理系统:负责对计算机系统内全部文件、资料和数据的管理和共享。
③编译系统:负责把用户用高级语言所编写的源程序编译成机器所能理解和执行的机器语言。
④网络系统:负责对计算机系统的网络资源进行组织和管理,使得在多台独立的计算机间能进行相互的资源共享和通信。
⑤标准程序库:按标准格式所编写的一些程序的集合,这些标准程序包括求解初等函数、线性方程组、常微分方程、数值积分等计算程序。
⑥服务性程序:也称实用程序。为增强计算机系统的服务功能而提供的各种程序 ,包括对用户程序的装置、连接、编辑、查错、纠错、诊断等功能。为了使计算机能算得快和准、记得多和牢,数十年来,对提高单机中的中央处理器的处理速度和精度,对提高存储器的存取速度和容量作了许多改进,如:增加运算器的基本字长和提高运算器的精度;增加新的数据类型,或对数据进行自定义,使数据带有标志符,用以区别指令和数,及说明数据类型;在 CPU 内增设通用寄存器、采用变址寄存器、增加间接寻址功能和增设高速缓冲存储器和采用堆栈技术;采用存储器交叉存取技术及虚拟存储器技术;采用指令流水线和运算流水线;采用多个功能部件和增设协处理器等。
⑹ 急需一份单片机方面的中英文翻译 3000字以上(最好是AT89C52)
本文介绍了基于单片机的智能温度计的设计方法。该温度计系统以AT89S52芯片作为控制核心,利用DS18B20芯片实现温度采集功能,采用OCM12864液晶显示芯片完成显示任务。硬件系统包括了AT89S52单片机模块、温度模块、液晶显示模块。通过控制编程与各芯片之间的协调合作,本系统主要实现了温度计的功能。
this paper introces a design way based on intelligent design thermometer. The thermometer system used AT89S52 single_chip as the core, implements the acquisition of temperature by DS18B20 chip and show datas by liquid crystal display chips OCM12864 .the hardware system includes a single-chip mole, mole temperature, liquid crystal display mole. By programming and the coordination and cooperation between the chip, the system implements the function of a thermometer
⑺ 能不能把你的单片机原理与应用的中英文对照发给我啊
· 单片机的介绍
又称单片微控制器,它不是完成某一个逻辑功能的芯片,而是把一个计算机系统集成到一个芯片上。概括的讲:一块芯片就成了一台计算机。它的体积小、质量轻、价格便宜、为学习、应用和开发提供了便利条件。同时,学习使用单片机了解计算机原理与结构的最佳选择。
可以说,二十世纪跨越了三个“电”的时代,即电气时代、电子时代和现已进入的电脑时代。不过,这种电脑,通常是指个人计算机,简称PC机。它由主机、键盘、显示器等组成(如图1所示)。还有一类计算机,大多数人却不怎么熟悉。这种计算机就是把智能赋予各种机械的单片机(亦称微控制器,如图2所示)。顾名思义,这种计算机的最小系统只用了一片集成电路,即可进行简单运算和控制。因为它体积小,通常都藏在被控机械的“肚子”里。它在整个装置中,起着有如人类头脑的作用,它出了毛病,整个装置就瘫痪了。现在,这种单片机的使用领域已十分广泛,如智能仪表、实时工控、通讯设备、导航系统、家用电器等。各种产品一旦用上了单片机,就能起到使产品升级换代的功效,常在
产品名称前冠以形容词——“智能型”,如智能型洗衣机等。现在有些工厂的技术人员或其它业余电子开发者搞出来的某些产品,不是电路太复杂,就是功能太简单且极易被仿制。究其原因,可能就卡在产品未使用单片机或其它可编程逻辑器件上。
目前单片机渗透到我们生活的各个领域,几乎很难找到哪个领域没有单片机的踪迹。导弹的导航装置,飞机上各种仪表的控制,计算机的网络通讯与数据传输,工业自动化过程的实时控制和数据处理,广泛使用的各种智能IC卡,民用豪华轿车的安全保障系统,录像机、摄像机、全自动洗衣机的控制,以及程控玩具、电子宠物等等,这些都离不开单片机。更不用说自动控制领域的机器人、智能仪表、医疗器械了。因此,单片机的学习、开发与应用将造就一批计算机应用与智能化控制的科学家、工程师
· 单片机的应用领域 :
1.单片机在智能仪器仪表中的应用;
2.单片机在工业测控中的应用;
3.单片机在计算机网络和通讯技术中的应用;
4.单片机在日常生活及家电中的应用;
5.单片机在办公自动化方面。
单片机广泛应用于仪器仪表、家用电器、医用设备、航空航天、专用设备的智能化管理及过程控制等领域,大致可分如下几个范畴:
1.在 智能仪器 仪表上的应用
单片机具有体积小、功耗低、 控制功能强、扩展灵活、微型化和使用方便等优点,广泛应用于仪器仪表中,结合不同类型的传感器,可实现诸如电压、功率、频率、湿度、温度、流量、速度、厚度、角度、长度、硬度、元素、压力等物理量的测量。采用单片机控制使得仪器仪表数字化、智能化、微型化,且功能比起采用电子或数字电路更加强大。例如精密的测量设备(功率计,示波器,各种分析仪)。
2.在工业控制中的应用
用单片机可以构成形式多样的控制系统、数据采集系统。
3.在家用电器中的应用
可以这样说,现在的家用电器基本上都采用了单片机控制,从电饭褒、洗衣机、电冰箱、空调机、彩电、其他音响视频器材、再到电子秤量设备,五花八门,无所不在。
4.在计算机网络和通信领域中的应用
现代的单片机普遍具备通信接口,可以很方便地与计算机进行数据通信,为在计算机网络和通信设备间的应用提供了极好的物质条件,现在的通信设备基本上都实现了单片机智能控制,从手机,电话机、小型程控交换机、楼宇自动通信呼叫系统、列车无线通信、再到日常工作中随处可见的移动电话,集群移动通信,无线电对讲机等。
5.单片机在医用设备领域中的应用
单片机在医用设备中的用途亦相当广泛,例如医用呼吸机,各种分析仪,监护仪,超声诊断设备及病床呼叫系统等等。
6.在各种大型电器中的模块化应用
某些专用单片机设计用于实现特定功能,从而在各种电路中进行模块化应用,而不要求使用人员了解其内部结构。如音乐集成单片机,看似简单的功能,微缩在纯电子芯片中(有别于磁带机的原理),就需要复杂的类似于计算机的原理。如:音乐信号以数字的形式存于存储器中(类似于ROM),由微控制器读出,转化为模拟音乐电信号(类似于声卡)。
在大型电路中,这种模块化应用极大地缩小了体积,简化了电路,降低了损坏、错误率,也方便于更换。
7.单片机在汽车设备领域中的应用
单片机在汽车电子中的应用非常广泛,例如汽车中的发动机控制器,基于CAN总线的汽车发动机智能电子控制器,GPS导航系统,abs防抱死系统,制动系统等等。
此外,单片机在工商,金融,科研、教育,国防航空航天等领域都有着十分广泛的用途。
⑻ 求一篇关于单片机的中英文翻译3000字
单片机也被称为微控制器(Microcontroler),是因为它最早被用在工业控制领域。单片机由芯片内仅有CPU的专用处理器发展而来。最早的设计理念是通过将大量外围设备和CPU集成在一个芯片中,使计算机系统更小,更容易集成进复杂的而对提及要求严格的控制设备当中。INTEL的Z80是最早按照这种思想设计出的处理器,从此以后,单片机和专用处理器的发展便分道扬镳。
早期的单片机都是8位或4位的。其中最成功的是INTEL的8031,因为简单可靠而性能不错获得了很大的好评。此后在8031上发展出了MCS51系列单片机系统。基于这一系统的单片机系统直到现在还在广泛使用。随着工业控制领域要求的提高,开始出现了16位单片机,但因为性价比不理想并未得到很广泛的应用。90年代后随着消费电子产品大发展,单片机技术得到了巨大的提高。随着INTEL i960系列特别是后来的ARM系列的广泛应用,32位单片机迅速取代16位单片机的高端地位,并且进入主流市场。而传统的8位单片机的性能也得到了飞速提高,处理能力比起80年代提高了数百倍。目前,高端的32位单片机主频已经超过300MHz,性能直追90年代中期的专用处理器,而普通的型号出厂价格跌落至1美元,最高端的型号也只有10美元。当代单片机系统已经不再只在裸机环境下开发和使用,大量专用的嵌入式操作系统被广泛应用在全系列的单片机上。而在作为掌上电脑和手机核心处理的高端单片机甚至可以直接使用专用的Windows和Linux操作系统。
单片机比专用处理器最适合应用于嵌入式系统,因此它得到了最多的应用。事实上单片机是世界上数量最多的计算机。现代人类生活中所用的几乎每件电子和机械产品中都会集成有单片机。手机、电话、计算器、家用电器、电子玩具、掌上电脑以及鼠标等电脑配件中都配有1-2部单片机。而个人电脑中也会有为数不少的单片机在工作。汽车上一般配备40多部单片机,复杂的工业控制系统上甚至可能有数百台单片机在同时工作!单片机的数量不仅远超过PC机和其他计算的综合,甚至比人类的数量还要多。
The single slice machine is also called tiny controller, is because it was used in the instry to control realm at the earliest stage.Single slice machine from inside chip have CPU appropriation processor to develop only since then.At the earliest stage of design the principle is to pass to integrate a great deal of peripherals and CPU in a chip, making calculator system smaller, integrating more easily into complicated of but to mention to request a strict control equipments in the middle.The INTEL Z80 is the processor which designed according to this kind of thought at the earliest stage, from now on, single slice the development of the machine and appropriation processor went by different roads then.
The single slice of the earlier period all of machines are 8 or 4.Among them, the INTEL is most successful of 8031, because of in brief dependable but the function was quite good to acquire very big good opinion.Henceforth at 8031 up developed MCS51 serieses a single slice machine system.According to the single slice of this system machine system is still in the extensive usage till now.Because the instry controls the exaltation of[with] realm request, starting appearing 16 single slice machine, but because sex price wanted to don't get a very extensive application than the disregard.Develop greatly along with the consumption electronics proct after 90's, the single slice machine technique got a huge exaltation.Along with the extensive application of INTEL i 960 serieses especially later ARM series, the 32 single slice machine replaces 16 single slice the high level position of the machine quickly, and gets into an essential market.And traditional of 8 single slice the function of the machine also got to fly to raise soon, handling an ability to compare with to raise few a hundredfolds in 80's.Currently, 32 single slice of the high level with main machine already over 300 MHzs, the function keeps appropriation processor of making track for the mid 90's, and the common model number factory price drop into to USD 1, tallest carry of model number also only USD 10.The contemporary and single slice machine system has already no longer developed and used just under the naked machine environment, the in great quantities appropriative built-in operate system is applied extensively in the whole serieseses of the single slice is on board.But Be ising the high level of handheld PC and cellular phone core processing single slice the machine even can use appropriative Windows and the Linux operate system directly.
Single slice the machine ratio appropriation processor is the most suitable to match to apply in the built-in system, so it got the most applications.In fact the single slice machine is an amount the most calculators are in the world.The modern mankind are living medium use of assemble in almost each electronics and machine proct have a single slice machine.All have 1-2 single slice machine in the computer accessorieses such as cellular phone, telephone, calculator, home appliances, electronics toy, handheld PC and mouse etc..And personal computer in would also capable number not a few single slice the machine be working.Provide with more than 40 departments a single slice machine generally on the car, complicated instry's controling the top of the system even may has single several hundred pedestalses slices machine to work in the meantime!Single slice the amount of the machine not only far above the PC machine and other calculations of comprehensive, even than the mankind's amount still want have another.
⑼ 单片机中英文对照~~~~~
用软件翻译的结果就是连自己都会骂“狗屁不通”,如果真的要翻译地的恰当,最好多看看关于单片机的英文资料。
⑽ 求关于单片机方面的5000字左右中英文对译(英译中)
单片机学习应中的六大重要部分
一、总线:我们知道,一个电路总是由元器件通过电线连接而成的,在模拟电路中,连线并不成为一个问题,因为各器件间一般是串行关系,各器件之间的连线并不很多,但计算机电路却不一样,它是以微处理器为核心,各器件都要与微处理器相连,各器件之间的工作必须相互协调,所以就需要的连线就很多了,如果仍如同模拟电路一样,在各微处理器和各器件间单独连线,则线的数量将多得惊人,所以在微处理机中引入了总线的概念,各个器件共同享用连线,所有器件的8根数据线全部接到8根公用的线上,即相当于各个器件并联起来,但仅这样还不行,如果有两个器件同时送出数据,一个为0,一个为1,那么,接收方接收到的究竟是什么呢?这种情况是不允许的,所以要通过控制线进行控制,使器件分时工作,任何时候只能有一个器件发送数据(可以有多个器件同时接收)。器件的数据线也就被称为数据总线,器件所有的控制线被称为控制总线。在单片机内部或者外部存储器及其它器件中有存储单元,这些存储单元要被分配地址,才能使用,分配地址当然也是以电信号的形式给出的,由于存储单元比较多,所以,用于地址分配的线也较多,这些线被称为地址总线。
二、数据、地址、指令:之所以将这三者放在一起,是因为这三者的本质都是一样的——数字,或者说都是一串‘0’和‘1’组成的序列。换言之,地址、指令也都是数据。指令:由单片机芯片的设计者规定的一种数字,它与我们常用的指令助记符有着严格的一一对应关系,不可以由单片机的开发者更改。地址:是寻找单片机内部、外部的存储单元、输入输出口的依据,内部单元的地址值已由芯片设计者规定好,不可更改,外部的单元可以由单片机开发者自行决定,但有一些地址单元是一定要有的(详见程序的执行过程)。数据:这是由微处理机处理的对象,在各种不同的应用电路中各不相同,一般而言,被处理的数据可能有这么几种情况:
1•地址(如MOV DPTR,#1000H),即地址1000H送入DPTR。
2•方式字或控制字(如MOV TMOD,#3),3即是控制字。
3•常数(如MOV TH0,#10H)10H即定时常数。
4•实际输出值(如P1口接彩灯,要灯全亮,则执行指令:MOV P1,#0FFH,要灯全暗,则执行指令:MOV P1,#00H)这里0FFH和00H都是实际输出值。又如用于LED的字形码,也是实际输出的值。
理解了地址、指令的本质,就不难理解程序运行过程中为什么会跑飞,会把数据当成指令来执行了。
三、P0口、P2口和P3的第二功能用法:初学时往往对P0口、P2口和P3口的第二功能用法迷惑不解,认为第二功能和原功能之间要有一个切换的过程,或者说要有一条指令,事实上,各端口的第二功能完全是自动的,不需要用指令来转换。如P3.6、P3.7分别是WR、RD信号,当微片理机外接RAM或有外部I/O口时,它们被用作第二功能,不能作为通用I/O口使用,只要一微处理机一执行到MOVX指令,就会有相应的信号从P3.6或P3.7送出,不需要事先用指令说明。事实上‘不能作为通用I/O口使用’也并不是‘不能’而是(使用者)‘不会’将其作为通用I/O口使用。你完全可以在指令中按排一条SETB P3.7的指令,并且当单片机执行到这条指令时,也会使P3.7变为高电平,但使用者不会这么去做,因为这通常这会导致系统的崩溃。
四、程序的执行过程: 单片机在通电复位后8051内的程序计数器(PC)中的值为‘0000’,所以程序总是从‘0000’单元开始执行,也就是说:在系统的ROM中一定要存在‘0000’这个单元,并且在‘0000’单元中存放的一定是一条指令。
五、堆栈: 堆栈是一个区域,是用来存放数据的,这个区域本身没有任何特殊之处,就是内部RAM的一部份,特殊的是它存放和取用数据的方式,即所谓的‘先进后出,后进先出’,并且堆栈有特殊的数据传输指令,即‘PUSH’和‘POP’,有一个特殊的专为其服务的单元,即堆栈指针SP,每当执一次PUSH指令时,SP就(在原来值的基础上)自动加1,每当执行一次POP指令,SP就(在原来值的基础上)自动减1。由于SP中的值可以用指令加以改变,所以只要在程序开始阶段更改了SP的值,就可以把堆栈设置在规定的内存单元中,如在程序开始时,用一条MOV SP,#5FH指令,就时把堆栈设置在从内存单元60H开始的单元中。一般程序的开头总有这么一条设置堆栈指针的指令,因为开机时,SP的初始值为07H,这样就使堆栈从08H单元开始往后,而08H到1FH这个区域正是8031的第二、三、四工作寄存器区,经常要被使用,这会造成数据的混乱。不同作者编写程序时,初始化堆栈指令也不完全相同,这是作者的习惯问题。当设置好堆栈区后,并不意味着该区域成为一种专用内存,它还是可以象普通内存区域一样使用,只是一般情况下编程者不会把它当成普通内存用了。
六、单片机的开发过程: 这里所说的开发过程并不是一般书中所说的从任务分析开始,我们假设已设计并制作好硬件,下面就是编写软件的工作。在编写软件之前,首先要确定一些常数、地址,事实上这些常数、地址在设计阶段已被直接或间接地确定下来了。如当某器件的连线设计好后,其地址也就被确定了,当器件的功能被确定下来后,其控制字也就被确定了。然后用文本编辑器(如EDIT、CCED等)编写软件,编写好后,用编译器对源程序文件编译,查错,直到没有语法错误,除了极简单的程序外,一般应用仿真机对软件进行调试,直到程序运行正确为止。运行正确后,就可以写片(将程序固化在EPROM中)。在源程序被编译后,生成了扩展名为HEX的目标文件,一般编程器能够识别这种格式的文件,只要将此文件调入即可写片
Singlechip study should be an important part in the six
First, the bus: we know that a circuit is always from the components through wires connected, and in analog circuits, the connection does not become a problem, because the devices are generally serial inter-relationship between the various devices connection is not much, but not the same as computer circuits, which is based on the microprocessor as the core, the device must be connected with the microprocessor, the device must be between the mutual coordination and so on need to connect on a lot of If still the same as analog circuits, in the microprocessor and a separate connection between the devices, the quantity line will be many alarmingly so in the microprocessor introced the concept of bus, all devices share the connection All devices of all eight data lines from eight public online, which is equivalent to all devices in parallel, but only this is not enough, if there is two devices send data simultaneously, a 0, a 1, then , the receiving party received what is it? This situation is not allowed, so to pass the line of control to control the device time job, any time there can be only one device to send data (which may have multiple devices simultaneously receiving). Device's data lines will be referred to as data bus, all the line of control devices known as control bus. Singlechip at internal or external memory and other devices have memory cells, these memory cells to be assigned addresses to use, the allocation of addresses is of course to give the form of electrical signals, and because memory cells are more so for address the allocation of more lines, these lines were known as the address bus.
Second, data, address, command: The reason why these three together, because these three are the essence is the same - figure, or are a string of'0 'and'1', composed of sequence . In other words, addresses, instructions are also data. Command: from single-chip chip designer provides a figure, it is consistent with our mnemonic commonly used commands have a strict one-to-one relationship, not by the developer to change the MCU. Address: Singlechip are looking for internal, external storage units, input and output port based on the value of the internal unit's address has been provided for the chip designers, and can not be changed, the external unit can be single-chip developers to decide, but Yes there is some address must be the unit (see proceres for the implementation process). Data: This is the object of treatment by the microprocessor, in a variety of different applications in different circuits, in general, the data may be processed so have several situations:
1 • address (such as MOV DPTR, # 1000H), that address 1000h into the DPTR.
2 • the way the words or control characters (such as MOV TMOD, # 3), 3 which controls the characters.
3 • constants (such as MOV TH0, # 10H) 10H that is constant from time to time.
4 • The actual output value (such as the mouth then P1 lantern light to light the whole, then the implementation of instruction: MOV P1, # 0FFH, to light the whole dark, then the implementation of instruction: MOV P1, # 00H) and 00H are here 0FFH actual output value. Another example is the font code for the LED, is the actual output value.
Understanding of the address, the nature of instructions, running is not difficult to understand why the process of running fly, the data will be implemented as instructions.
Three, P0 mouth, P2 and P3 the mouth of the second function Usage: often on P0 beginner I, P2 and P3 mouth I use the second function puzzled think the second function and the original features have a switch between the process, or that there have to be a directive, in fact, the port's second feature is completely automatic, no need to use command to convert. Such as P3.6, P3.7, respectively, are WR, RD signal, when the micro-chip RAM or external justifications machine has an external I / O port, they were used as the second function, can not be used as general-purpose I / O port to use, as long as one microprocessor implementation of the MOVX instruction 1, there will be a corresponding signal sent from the P3.6 or P3.7, no prior use instructions indicate. In fact 'can not be used as general-purpose I / O port use' is not 'should not' but (user) 'not' as a general-purpose I / O port to use. At command you can arrange a Medium of Instruction SETB P3.7, and when the single-chip implementation of this Article directions, P3.7 will also become high, but users will not do so, because This usually will lead to the collapse of the system.
Four, the program implementation process: single-chip power-on reset in 8051 after the program counter (PC) in the value of'0000 ', so the procere always'0000' unit begin implementation of, that is to say: the system's ROM must exist in the'0000 'in this unit, and'0000' in the storage unit must be a command.
Friday, the stack: the stack is a region, are used to store data, the region does not have any unique position, that is a part of internal RAM, special is its data storage and access methods, namely, the so-called 'advanced after that last-in first-out ', and the stack has a special data transmission command, ie' PUSH 'and' POP ', there is a special unit specifically for its services, that is, the stack pointer SP, when they first PUSH instruction, the SP on (at the original value of the foundation on) automatically add one, whenever the implementation of a POP instruction, SP on (at the original value basis) minus one automatically. Because of the value of SP can be used to change directions, so as long as the stage at the beginning of the proceedings to change the value of the SP, you can put the stack set up the required memory units, such as at the beginning of the proceedings, with a MOV SP, # 5FH instructions when put on the stack from the memory moles installed in the unit 60H start. The normal procere at the beginning of the total that there is a stack pointer of the instruction set, because at startup, SP initial value of 07H, thus the stack from the beginning the next unit 08h, and 08h to 1Fh in the region 8031 is the second, Three, four working registers area, often used, this will lead to data chaos. The author has prepared a different program, not exactly the same instructions to initialize the stack, which is the author's customary problem. When set up the stack area, does not mean that the region as a dedicated memory, it can be as common as the use of memory region, but under normal circumstances programming will not put it as an ordinary memory use
