8031单片机PPT课件
- 格式:ppt
- 大小:1.73 MB
- 文档页数:21
第二章 MCS-51单片机硬件结构(8031、8051、8751)§2-1 MCS-51机主要功能8位CPU20多个特殊功能寄存器 5个中断源(可屏蔽中断),2个优先级。
有较强的位处理功能 振荡器和时钟电路4K字节的程序存贮器(ROM 或EPROM) 128字节的RAM4个并行I/O口,32线。
(可控制) 2个16位定时/计数器(可编程控制) 另外:1个串行I/O口(2线)片外可寻址的存贮器空间 程序存贮器(ROM):64K. 数据存贮器(RAM):64K§2-2MCS-51机引脚P3~P0:四个并行I/O 口线,共32线XTAL1、XTAL2:芯片内部振荡电路输入/ 输出端 EA:存储器选择信号 ALE:地址锁存信号VCC、VSS:电源端§2-3 CPU一、算术逻辑运算部件ALU算术运算:加、减、乘、除功能:对8位无符号数进行 逻辑运算:与、或、异或、取反、清0、移位 位处理功能:与、或、置位、清0、取反、检测等二、专用寄存器MCS-51单片机中有0~255等256个内部存贮器(除内部程序存贮器之外)地址。
MCS -51有128个RAM单元。
有20多个特殊功能寄存器单元(都是8位)。
RAM占用00H~7FH地址。
余下的地址中部分提供给特殊功能寄存器。
1、累加器A(E0H)①使用频率高。
②算术运算和逻辑运算必用。
③存放指令中的操作数和运算中部结果。
2、寄存器B(F0H)①存放乘、除法指令中的被乘数和被除数。
②存放乘积的高位字节或除法的余数。
③作一般的寄存器。
3、程序状态字PSW(D0H)D7~D0(DOH)Cy Ac Fo RS1RS0OV -P①Cy ----- ALU 操作结果最高位(D7位)进位或错位标志。
位处理操作中作位累加器②Ac ----- ALU操作结果D4进位标志(半进位标志);CPU自用(用于BCD码操作)③Fo ----- 用户标志(由用户定义使用)④RS0、RS1 ----- 选择工作寄存器组。
第二章单片机系统部分组成2。
1 概述为了设计此系统,我们采用了8031单片机作为控制芯片,在前向通道中是一个非电信号的电量采集过程。
它由传感器采集非电信号,从传感器出来经过功率放大过程,使信号放大,再经过模/数转换成为计算机能识别的数字信号,再送入计算机系统的相应端口。
由于8031中无片内ROM,且数据存储器也不能满足要求,,经扩展2732和6264来达到存储器的要求,其结果通过显示器和微型打印机来进行显示输出,也可以通过上位机接口来上传PC机,对于实时检测系统我们还配备了键盘对单片机的各项工作进行管理和控制。
2。
2 8031的内部结构8031是有8个部件组成,即CPU,时钟电路,数据存储器,并行口(P0~P3)串行口,定时计数器和中断系统,它们均由单一总线连接并被集成在一块半导体芯片上.CPU中央处理器:中央处理器是8031的核心,它的功能是产生控制信号,把数据从存储器或输入口送到CPU 或CPU数据写入存储器或送到输出端口。
还可以对数据进行逻辑和算术的运算.内存:内部存储器可分做程序存储器和数据存储器,但在8031中无片内程序存储器。
定时/计数器:8031有两个16位的定时/计数器,每个定时器/计数器都可以设置成定时的方式和计数的方式,但只能用其中的一个功能,以定时或计数结果对计算机进行控制。
并行I/O口:MCS-51有四个8位的并行I/O口,P0,P1,P2,P3,以实现数据的并行输出。
串行口:它有一个全双工的串行口,它可以实现计算机间或单片机同其它外设之间的通信,该并行口功能较强,可以做为全双工异步通讯的收发器也可以作为同步移位器用。
中断控制系统:8031有五个中断源,既外部中断两个,定时计数中断两个,串行中断一个,全部的中断分为高和低的两个输出级。
8031的制作工艺为HMOS,采用40管脚双列直插DIP封装,引脚说明如下:VCC(40引脚)正常运行时提供电源。
VSS(20引脚)接地。
XTAL1(19引脚)在单片机内部,它是一个反向放大器的输入端,该放大器构成了片内的震荡器,可以提供单片机的时钟信号,该引脚也是可以接外部的晶振的一个引脚,如采用外部振荡器时,对于8031而言此引脚应该接地。
欢迎共阅第二章 单片机系统部分组成2.1 概述为了设计此系统,我们采用了8031单片机作为控制芯片,在前向通道中是一个非电信号的电量采集过程。
它由传感器采集非电信号,从传感器出来经过功率放大过程,使信号放大,再经过模/数转换成为计算机能识别的数字信号,再送入计算机系统的相应端口。
CPU 中央处理器:中央处理器是8031的核心,它的功能是产生控制信号,把数据从存储器或输入口送到CPU 或CPU 数据写入存储器或送到输出端口。
还可以对数据进行逻辑和算术的运算。
内存:内部存储器可分做程序存储器和数据存储器,但在8031中无片内程序存储器。
定时/计数器:8031有两个16位的定时/计数器,每个定时器/计数器都可以设置成定时的方式和计数的方式,但只能用其中的一个功能,以定时或计数结果对计算机进行控制。
并行I/O口:MCS-51有四个8位的并行I/O口,P0,P1,P2,P3,以实现数据8031的制作工艺为HMOS,采用40管脚双列直插DIP封装,引脚说明如下:VCC(40引脚)正常运行时提供电源。
VSS(20引脚)接地。
XTAL1(19引脚)在单片机内部,它是一个反向放大器的输入端,该放大器构成了片内的震荡器,可以提供单片机的时钟信号,该引脚也是可以接外部的晶振的一个引脚,如采用外部振荡器时,对于8031而言此引脚应该接地。
XTAL2(18引脚)在内部,接至上述振荡器的反向输入端,当采用外部振荡器时,对MCS51系列该引脚接收外部震荡信号,即把该信号直接接到内部时钟的输入端。
行口中,可以在任何一个输出数据,又可以从它们那得到数据,故它们都是双向的,每一个I/O口内部都有一个8位数据输出锁存器和一个8位数据输入缓冲器,各成为SFR中的一个,因此CPU数据从并行I/O口输出时可以得到锁存,数据输入时可以得到缓冲,但他们在功能和用途上的差异很大,P0和P2口内部均有个受控制器控制的二选一选择电路,故它们除可以用做通用I/O口以外还具有特殊的功能,P0口通常用做通用I/O口为CPU传送数据,P2口除了可以用做通用口以外,还具有第一功能,除P0口以外其余三个都是准双向口。
单片机8031生产厂家:Intel公司特性:8031单片机是Intel公司生产的MCS-51系列单片机中的一种,除无片内ROM外,其余特性与MCS-51单片机基本一样。
MCS-51单片机的引脚描述及片外总线结构一、芯片的引脚描述HMOS制造工艺的MCS-51单片机都采用40引脚的直插封装(DIP方式),制造工艺为CHMOS的80C51/80C31芯片除采用DIP封装方式外,还采用方型封装工艺,引脚排列如图。
其中方型封装的CHMOS芯片有44只引脚,但其中4只引脚(标有NC的引脚1、12、23、34)是不使用的。
在以后的讨论中,除有特殊说明以外,所述内容皆适用于CHMOS 芯片。
如图,是MCS-51的逻辑符号图。
在单片机的40条引脚中有2条专用于主电源的引脚,2条外接晶体的引脚,4条控制或与其它电源复用的引脚,32条输入/输出(I/O)引脚。
下面按其引脚功能分为四部分叙述这40条引脚的功能。
1、主电源引脚VCC和VSSVCC——(40脚)接+5V电压;VSS——(20脚)接地。
2、外接晶体引脚XTAL1和XTAL2XTAL1(19脚)接外部晶体的一个引脚。
在单片机内部,它是一个反相放大器的输入端,这个放大器构成了片内振荡器。
当采用外部振荡器时,对HMOS单片机,此引脚应接地;对CHMOS单片机,此引脚作为驱动端。
XTAL2(18脚)接外晶体的另一端。
在单片机内部,接至上述振荡器的反相放大器的输出端。
采用外部振荡器时,对HMOS单片机,该引脚接外部振荡器的信号,即把外部振荡器的信号直接接到内部时钟发生器的输入端;对XHMOS,此引脚应悬浮。
3、控制或与其它电源复用引脚RST/VPD、ALE/PROG、PSEN和EA/VPP①RST/VPD(9脚)当振荡器运行时,在此脚上出现两个机器周期的高电平将使单片机复位。
推荐在此引脚与VSS引脚之间连接一个约8.2k的下拉电阻,与VCC引脚之间连接一个约10μF的电容,以保证可靠地复位。
LASER ARGON-40–ARGON-39 AGE STUDIES OF DAR AL GANI 262 LUNAR METEORITE. V. A.Fernandes, R. Burgess, and G. Turner, Department of Earth Sciences, University of Manchester, Oxford Road,Manchester, M13 9PL, UK (vfernandes@)Introduction: The lunar meteorite Dar al Gani 262(DAG 262) was found in the Sahara desert in Libya on March 23, 1997. This was the first lunar meteorite found in a desert and is the thirteenth lunar meteorite discovered. DAG 262 is a polymict anorthositic lunar highland breccia [1, 2].The 40Ar-39Ar dating technique has been applied to DAG 262 in an attempt to determine the crystallization age and shock events experienced by this meteorite. Previous studies have indicated that this meteorite may have suffered up to 4 shock events [3]. Due to the brecciated nature of the rock and the likelihood of multiple shock events, a laser probe technique has been used to analyse individual components (minerals and clasts) of the meteorite.Sample Description: The sample supplied to us (~1.5g) shows two distinct clast types: (1) feldspathic and (2) basaltic; the latter not having been previously described [1–4]. Plagioclases show fractures and undulatory extinction as the result of shock events [1-3]. The feldspathic clast has small round low-Ca pyroxenes distributed within it.Electron microprobe analysis of feldspar and pyroxene are given in Table 1. The bulk composition as determined by [4] suggests that the source of this clast to be the ferroan-anorthositic suite.Figure 1: 36Ar/40Ar vs 39Ar/40Ar laser steppedheating results for DAG3. The numbers adjacent to the data points indicate the laser extraction step.TABLE 1. Electron-Microprobe analyses of low-Ca Pyroxene and plagioclase; and of a devitrified glass-spherule found within the matrix.Low-Ca PyroxenePlagioclase Devitrified glass SiO 238.3544.2335.19TiO 20.11730.01450.0671Al 2O 30.084035.32440.0000Cr 2O30.08450.00000.0338FeO 21.420.1936.47MnO 0.33210.00000.4154MgO 39.380.1927.73CaO 0.162519.62930.0623K 2O 0.00000.02360.0025Na 2O 0.02370.40240.0268NiO0.04900.00000.0000The basaltic clast shows a very fine intergranular texture with some larger plagioclase grains. The two clasts are separated by a melt-glass matrix that contains plagioclase with the same chemical composition as those plagioclases within the feldspathic clast. A devitrified mafic-glass spherule of ~150 µm-diameter was identified within the matrix as well as other small fragments of possible glass spheres. Some dendritic veins can be observed on the outer part of the section which formed after breccia lithification[1, 2].Experimental Methods: Two laser 40Ar-39Ar experiments are being carried-out: (1) IR laser stepped heating of feldspathic fragments which have been separated from the meteorite; and (2) UV laser spot fusion (50 µm) of a slice of meteorite (~1.0 ×0.5 cm) showing both clast types. Preliminary results from experiments (1) have been obtained so far.Three feldspathic fragments (DAG1-3 each weighing ~1mg) have been heated using between 20-30 steps, of increasing laser output power, each of 1minute duration.Argon-40–Argon-39 Age Constraints: Figure 1 is a plot of 36Ar/40Ar vs. 39Ar/40Ar for 20 extractions obtained from DAG3. Overall, the data show increasing 36Ar/40Ar and decreasing 39Ar/40Ar as heating proceeds. In detail the release is more complex; points 1-4 show a significant decrease in 39Ar/40Ar corresponding to an increase in apparent0.000.050.100.150.200.250.300.350.400.450.0000.0050.0100.0150.0200.02539Ar/40A r36A r t /40Arage from 1.3 to 5.1Ga. This variation may be attributed to the combined affects of terrestrial alteration that will result in loss of radiogenic 40Ar, and implantation of lunar 40Ar in grain boundaries that will lead to an increase in apparent age.Points 5–20 define a linear correlation interpreted to represent mixing between radiogenic 40Ar, released at intermediate temperature, andtrapped Ar that dominates the high temperature release (Fig. 1). The intercept of the correlation on the 39Ar/40Ar axis corresponds to an age of 1.95 Ga. This age is low compared with other lunar meteorites and is most likely related to a shock event. The trapped component released at high temperature has 36Ar/40Ar of ~2.8 which is close the value of ~2.5 reported previously for the bulk meteorite [2].The increasing proportion of trapped Ar released at high temperature is contrary to the usual release pattern obtained for lunar soils [5]. Two possible explanations are given: (1) Ar loss from grain boundaries occurred at depth within the lunar regolith, while preserving trapped Ar with higher 36Ar/40Ar in the centre of grains; or (2) release of trapped Ar from a low K-bearing mineral present in feldspathic fragments. Anomalously high apparent ages (>4.5 Ga) obtained at low temperature from steps 3 and 4 indicate that DAG3 contains implanted lunar atmosphere 40Ar presumably acquired near the surface of the lunar regolith. This is inconsistent with (1) that loss occurred at depth. Fine-grained pyroxene is a common component in the matrix of DAG 262 [2], has low K content and will retain Ar to a higher temperature than plagioclase making explanation (2) the most likely.Release of Ar from fragment DAG1 was similar to that of DAG3 giving an indistinguishable intercept age of 2.0Ga. However, DAG2 contained much lower levels of trapped Ar and 19% of the total 39Ar released at high temperature gave an age of 3.05 Ga. This age is slightly below previously inferred total gas ages for lunar meteorites and may be related to the crystallisation event.Cosmic Exposure Ages: These are based on plots of 37Ar/36Ar vs 38Ar/36Ar and give ages of 185Ma, 252Ma and 122Ma for DAG1, DAG2 and DAG3 respectively. The cosmic ray exposure ages indicate the components of DAG 262 had different exposure histories, an expected result given that this meteorite is a breccia.Chemistry: The K/Ca weight ratio calculated from 39Ar/37Ar of 3.6 × 10–3 is similar to bulk ratio obtained by [2] of 3.8 × 10–3. A much lower K/Ca of 0.6 × 10–3 obtained from feldspar by electron microprobe is evidence for the impurity of the feldspar separates analysed for the age study. The low K/Ca ratio of the feldspar compared to the bulk, indicates that there is an additional K-bearing phase in DAG 262 that remains to be identified.Current investigations are aimed at using the UV laser to determine 40Ar-39Ar ages from individual minerals within DAG 262. Acknowledgments: We wish to thank I. Franchi (Open University) for providing the sample of DAG 262. This work was supported by the European Commission via a TMR fellowship to VAF. References: [1] Bischoff A. and Weber D. (1997) MAPS, 32, A13–A14. [2] Bischoff A. et al. (1998) MAPS, 33, 921–935. [3] Nishiizumi K. et al. (1998) LPS XXIX, Abstract #1957. [4] Joliff B. et al. (1999) LPS XXIX, Abstract #2000. [5] Burgess R. and Turner G. (1997) MAPS, 33, 921–935.。
8031和8051是最常见的mcs51系列单片机,是inter公司早期的成熟的单片机产品,应用范围涉及到各行各业,下面介绍一下它的引脚图等资料。
<8031,8051管脚图>8031,8051引脚功能(1)主电源引脚Vss和Vcc①Vss接地②Vcc正常操作时为+5伏电源(2)外接晶振引脚XTAL1和XTAL2①XTAL1内部振荡电路反相放大器的输入端,是外接晶体的一个引脚。
当采用外部振荡器时,此引脚接地。
②XTAL2内部振荡电路反相放大器的输出端。
是外接晶体的另一端。
当采用外部振荡器时,此引脚接外部振荡源。
(3)控制或与其它电源复用引脚RST/VPD,ALE/ ,和/Vpp①RST/VPD 当振荡器运行时,在此引脚上出现两个机器周期的高电平(由低到高跳变),将使单片机复位在Vcc掉电期间,此引脚可接上备用电源,由VPD向内部提供备用电源,以保持内部RAM中的数据。
②ALE/ 正常操作时为ALE功能(允许地址锁存)提供把地址的低字节锁存到外部锁存器,ALE 引脚以不变的频率(振荡器频率的)周期性地发出正脉冲信号。
因此,它可用作对外输出的时钟,或用于定时目的。
但要注意,每当访问外部数据存储器时,将跳过一个ALE脉冲,ALE 端可以驱动(吸收或输出电流)八个LSTTL电路。
对于EPROM型单片机,在EPROM编程期间,此引脚接收编程脉冲(功能)③外部程序存储器读选通信号输出端,在从外部程序存储取指令(或数据)期间,在每个机器周期内两次有效。
同样可以驱动八LSTTL输入。
④/Vpp 、/Vpp为内部程序存储器和外部程序存储器选择端。
当/Vpp为高电平时,访问内部程序存储器,当/Vpp 为低电平时,则访问外部程序存储器。
对于EPROM型单片机,在EPROM编程期间,此引脚上加21伏EPROM编程电源(Vpp)。
⊙IC-8031☆8031/8051/8751引脚功能:Vcc:+5V电源电压。
Vss:电路接地端。