《步进电机及单片机英文文献及翻译》由会员分享,可在线阅读,更多相关《步进电机及单片机英文文献及翻译(16页珍藏版)》请在金锄头文库上搜索。
1、外文文献:外文文献:Knowledge of the stepper motorKnowledge of the stepper motorWhat is a stepper motor: Stepper motor is a kind of electrical pulses into angular displacement of theimplementing agency. Popular little lesson: When thedriver receives astep pulsesignal, it will drive a stepper motor to set the
2、direction of rotation at a fixedangle (and the step angle). You can control the number of pulses to control theangular displacement, so as to achieve accurate positioning purposes; the same timeyou can control the pulse frequency to control the motor rotation speed andacceleration, to achieve speed
3、control purposes.What kinds of stepper motor sub-: In three stepper motors: permanent magnet (PM), reactive (VR) and hybrid (HB)permanent magnet stepper usually two-phase, torque, and smaller, step angle ofdegrees or the general 15 degrees; reaction step is generally three-phase, canachieve high tor
4、que output, step angle of degrees is generally, but the noise andvibration are large. 80 countries in Europe and America have been eliminated; hybridstepper is a mix of permanent magnet and reactive advantages. It consists of twophases and the five-phase: two-phase step angle of degrees while the ge
5、neralfive-phase step angle of degrees generally. The most widely used Stepper Motor.What is to keep the torque (HOLDING TORQUE)How much precision stepper motor? Whether the cumulative: The general accuracy of the stepper motor step angle of 3-5%, and not cumulative.Stepper motor to allow the minimum
6、 amount of surface temperatureStepper motor to allow the minimum amount of surface temperature:Stepper motor causes the motor temperature is too high the first magneticdemagnetization, resulting in loss of torque down even further, so the motor surfacetemperature should be the maximum allowed depend
7、ing on the motor demagnetizationof magnetic material points; Generally speaking, the magnetic demagnetizationpoints are above 130 degrees Celsius, and some even as high as 200 degrees Celsius,so the stepper motor surface temperature of 80-90 degrees Celsius is normal.How to determine the stepper mot
8、or driver DC power supply: A. Determination of the voltageHybrid stepping motor driver power supply voltage is generally a wide range (suchas the IM483 supply voltage of 12 48VDC), the supply voltage is usually basedon the work of the motor speed and response to the request to choose. If the motorop
9、erating speed higher or faster response to the request, then the voltage valueis high, but note that the ripple voltage can not exceed the maximum input voltageof the drive, or it may damage the drive. B. Determination of CurrentPower supply current is generally based on the output phase current dri
10、ve I todetermine. If a linear power supply, powersupply current is generally preferableto times the I; if we adopt the switching power supply, power supply current isgenerally preferable to I, to times.The main characteristics of stepping motor: A stepper motor drive can be added operate pulse drive
11、 signal must be no pulsewhen the stepper motor at rest, such asIf adding the appropriate pulse signal, it will to a certain angle (called the stepangle) rotation. Rotation speed and pulse frequency is proportional to. 2 Dragon step angle stepper motor version is degrees, 360 degrees around, takes48
12、pulses to complete. 3steppermotorhasinstantstartandrapidcessationofsuperiorcharacteristics.Change the pulse of the order of 4, you can easily change the direction of rotation.Therefore, the current printers, plotters, robotics, and so devices are the coreof the stepper motor as the driving force.Ste
13、pper motor control exampleWe use four-phase unipolar stepper motor as an example. The structure shown inFigure 1: Four four-phase winding leads (as opposed to phase A1 A2 B1 phase phase B2) andtwo public lines (to the power of positive). The windings of one phase to the powerof the ground. So that t
14、he windings will be inspired. We use four-phase eight-beatcontrol, ie, 1 phase 2 phase alternating turn, would enhance resolution. perstep can be transferred to control the motor excitation is transferred in orderas follows: If the requirements of motor reversal, the transmission excitation signal c
15、anbe reversed. 2 control schemeControl system block diagram is as follows The program uses AT89S51 as the main control device. It is compatible with theAT89C51, but also increased the SPI interface and the watchdog module, which notonlymakesthedebuggingprocessbecomeseasyandalsomorestable.Themicrocon
16、troller in the program mainly for field signal acquisition and operationof the stepper motor to calculate the direction and speed information. Then sentto the CPLD.CPLD with EPM7128SLC84-15, EPM7128 programmable logic device of large-scale, forthe ALTERA companys MAX7000 family. High impedance, elec
17、trically erasable andother characteristics, can be used for the 2500 unit, the working voltage of +5V. CPLD receivesinformation sent from the microcontroller after converted tothecorresponding control signal output to the stepper motor drive. Put the controlsignal drives the motor windings after the
18、 input, to achieve effective control ofthe motor. The hardware structure of the motor driveMotor drive using the following circuit: R1-R8 in which the resistance value of 320. R9-R12 resistance value . Q1-Q4as Darlington D401A, Q5-Q8 for the S8550. J1, J2 and the stepper motor connectedto the six-le
19、ad。Advantages and disadvantages of stepper motorAdvantages 1. The motor rotation angle is proportional to the number of pulses; 2. When the motor stopped with a maximum torque (when the winding excitationtime); 3. Since the accuracy of each step in the three per cent to five per cent, andthe error w
20、ill not accumulate to the next step and thus has better positionalaccuracy and repeatability of movement; 4. Excellent response from the stop and reverse; 5. In the absence of brush, high reliability, it just depends on the life ofthe motor bearing life; 6. Motor response only determined by the numb
21、er of input pulses, which can beused open loop control, which makes the motor and control structure can berelatively simpleSystem cost 7. Just load directly connected to the motor shaft can also be extremely slowsynchronous rotation. 8. Speed ?is proportional to the pulse frequency, and thus a relat
22、ively widespeed range.Shortcomings1. If not properly controlled prone to resonance;2. Difficult operation to a higher speed.3. Difficult to obtain high torque4. There is no advantage in terms of volume weight, low energy efficiency.5. Over load will destroy the synchronization, the work will be issu
23、ed whenhigh-speed vibration and noise.Stepper motor drive requirements(1) to provide fast rise and fall of current speed, the current waveform as closeas possible rectangle.For the period ended with the release of the loop current flow, to reduce the windingends of the back electromotive force, to a
24、ccelerate the current decay.(2) rhyme with higher power and efficiency.Stepper motor driver, which is the control pulse signal emitted into the angulardisplacement of the stepper motor, or: the control system sends a pulse signal eachthrough the stepper motor drive to rotate a step angle. That is th
25、e stepper motorspeed is proportional to the frequency and pulse signals. Therefore, the frequencycontrol pulse signal, to be precise motor speed control; control the number of steppulses to connect the motor accurately. Stepper motor drive there are many, weshould take a reasonable choice of power r
26、equirements of the drive, the followingwere introduced various types of typical drive.The latest technological developmentsDomestic and international research on the sub-drive technology is very active,high-performance sub-driver circuit can be broken downinto thousands or even anysubdivision. Now a
27、ble to do complicated calculations to make after the breakdownof uniform step angle, which greatly improves the resolution of stepper motor pulses,reduce or eliminate the vibration, noise and torque ripple, the stepper motor ismore class server feature.The actual role of step angle: in the absence o
28、f sub-drive, the user select adifferent number of phases depends mainly on the stepper motor to meet their ownrequirements on the step angle ,If you use the sub-drive, the user can change thedrive number of segments, can dramatically change the actual step angle steppermotor phases of change in the
29、role of the actual step angle is almost negligible.Introduction of AT89C51Introduction of AT89C51DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4Kbytes of Flash programmable and erasable read only memory (PEROM). The device ismanufactured using Atmels high -den
30、sity nonvolatile memory technology and iscompatible with the industry-standard MCS-51 instruction set and pinout. Theon-chip Flash allows the program memory to be reprogrammed in-system or by aconventional nonvolatile memory programmer. By combining a versatile 8-bit CPU withFlash on a monolithic ch
31、ip, the Atmel AT89C51 is a powerful microcomputer whichprovides a highly-flexible and cost-effective solution to many embedded controlapplications.Function characteristicThe AT89C51 provides the following standard features: 4K bytes of Flash, 128bytes of RAM, 32 I/O lines, two 16-bit timer/counters,
32、 a five vector two-levelinterrupt architecture, a full duplex serial port, on-chip oscillator and clockcircuitry. In addition, the AT89C51 is designed with static logic for operationdown to zero frequency and supports two software selectable power saving modes.The Idle Mode stops the CPU while allow
33、ing the RAM, timer/counters, serial portand interrupt system to continue functioning. The Power-down Mode saves the RAMcontents but freezes the oscillator disabling all other chip functions until thenext hardware reset.Pin DescriptionVCC:Supply voltage.GND:Ground.Port 0:Port 0 is an 8-bit open-drain
34、 bi-directional I/O port. As an output port, each pincan sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be usedas highimpedance0 may also be configured to be the multiplexed loworderaddress/data bus during accesses to external program and data memory. In this modeP0 has inte
35、rnal 0 also receives the code bytes during Flash programming,andoutputs the code bytes during programverification. External pullups are requiredduring programverification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1output buffers can sink/source four TTL 1s are w
36、ritten to Port 1 pins they arepulled high by the internal pullups and can be used as inputs. As inputs,Port 1pins that are externally being pulled low will source current (IIL) because of theinternal 1 also receives the low-order address bytes during Flash programming andverification.Port 2Port 2 is
37、 an 8-bit bi-directional I/O port with internal pullups.The Port 2output buffers can sink/source four TTL 1s are written to Port 2 pins they arepulled high by the internal pullups and can be used as inputs. As inputs,Port 2pins that are externally being pulled low will source current, because of the
38、internal 2 emits the high-order address byte during fetches from external programmemory and during accesses to external data memory that use 16-bit addresses. Inthis application, it uses strong internal pullupswhen emitting 1s. During accessesto external data memory that use 8-bit addresses, Port 2
39、emits the contents of theP2 Special Function 2 alsoreceives the high-orderaddress bits andsome controlsignals during Flash programming and verification.Port 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3output buffers can sink/source four TTL 1s are written to Port 3 pi
40、ns they arepulled high by the internal pullups and can be used as inputs. As inputs,Port 3pins that are externally being pulled low will source current (IIL) because of the3 also serves the functions of various special features of the AT89C51 as listedbelow:Port 3 also receives some control signals
41、forFlash programming andverification.RSTReset input. A high on this pin for two machine cycles while the oscillatoris running resets the device.ALE/PROGAddress Latch Enable output pulse for latching the low byte of the addressduring accesses to external memory. This pin is also the program pulse inp
42、ut (PROG)during Flash normal operation ALE isemitted at a constant rate of 1/6 theoscillator frequency, and may be used for external timing or clocking purposes.Note, however, that one ALE pulse is skipped during each access to external DataMemory.If desired, ALE operation can be disabled by setting
43、 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 themicrocontroller is in external execution mode.PSENProgram Store Enable is the read strobe to external program th
44、e AT89C51 isexecuting code from external program memory, PSEN is activated twice each machinecycle, except that two PSEN activations are skipped during each access to externaldata memory.EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the deviceto fetch code from external
45、 program memory locations starting at 0000H up to FFFFH.Note, however, that if lock bit 1 is programmed, EA will be internally latched onshould be strapped to VCC for internal program pin also receives the 12-voltprogrammingenablevoltage(VPP)duringFlashprogramming,forpartsthatrequire12-volt VPP.XTAL
46、1Input to the inverting oscillator amplifier and input to the internal clockoperating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an invertingamplifier which can be configured for use as an on-chip os
47、cillator, as shown inFigure a quartz crystal or ceramic resonator may be used. To drive the device froman external clock source, XTAL2 should be left unconnected while XTAL1 is drivenas shown in Figure are no requirements on the duty cycle of the external clocksignal,sincetheinputtotheinternalclocki
48、ngcircuitryisthroughadivide-by-two flip-flop, but minimum and maximum voltage high and low timespecifications must be observed.Figure 1. Oscillator Connections Figure 2. External Clock DriveConfigurationIdle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripheralsremain active
49、. The mode is invoked by software. The content of the on-chip RAM andall the special functions registers remain unchanged during this mode. The idlemode can be terminated by any enabled interrupt or by a hardware should be notedthat when idle is terminated by a hard ware reset, the device normally r
50、esumesprogram execution,from where it left off, up to two machine cycles before theinternal reset algorithm takes control. On-chip hardware inhibits access tointernal RAM in this event, but access to the port pins is not inhibited. Toeliminate the possibility of an unexpected write to a port pin whe
51、n Idle isterminated by reset, the instruction following the one that invokes Idle shouldnot be one that writes to a port pin or to external memory.Power-down ModeIn the power-down mode, the oscillator is stopped, and the instruction thatinvokes power-down is the last instruction executed. The on-chi
52、p RAM and SpecialFunction 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 butdoes not change the on-chip RAM. The reset should not be activated before VCC isrestored to its normal operating level and mu
53、st be held active long enough to allowthe oscillator to restart and stabilize.中文译文:中文译文:步进电机的知识步进电机的知识什么是步进电机:步进电机是一种把电脉冲转化为角位移的执行机构。通俗的说:当驱动程序收到一个步进脉冲信号,将驱动步进电机轴旋转一个固定的角度(步进角)。您可以通过控制脉冲个数来控制角位移, 从而达到准确定位的目的 ;同时,你可以通过控制脉冲频率来控制电机的旋转速度和加速度,实现速度控制的目的。步进电机的种类:步进电机分为三种:永磁式( PM),反应式( VR)和混合式( HR)永磁式步进电机一般
54、为两相,转矩和体积较小,步进角一步度或15 度;反应式一般有三相可以实现大转矩输出,步进角一般是度,但噪声和振动大。在欧洲和美洲80 个国家已被淘汰 ;混合式步进是混合了永磁式和反应的优势。它由两相和五相: 一般两相的步距角是度,而的五相步距角为度。是使用最广泛的的步进电机。步进电机允许的最高表面温度步进电机温度过高首先会的磁性材料退磁,导致转矩降低甚至失步,电机表面温度允许的最大值取决于的磁性材料退磁点;一般来说,磁性材料退磁点在摄氏130 度以上有些材料甚至高达摄氏200 度高, 所以步进电机表面温度在摄氏80-90 度是正常的。步进电机精度为多少?是否累积一般步进电机的精度为步进角的3-
55、5%,且不累积如何确定步进电机驱动器直流电源A.电压确定混合式步进电机驱动器的电源电压范围较广 (比如 IM483 的供电电压 12?48VDC ) ,电源电压通常根据电机的转速和响应要求来选择。如果要求较快的运行速度较高的响应速度就选用较高的电压,但注意电源电压的峰值不能超过驱动器的最大输入电压,否则可能会损坏驱动器。B.电流确定电源电流一般根据输出相电流I 来确定。如果采用线性电源,电源电流一般可取I 的?倍;如果采用开关电源,电源电流一般可取I 的?倍。步进电机的主要特性在步进电机关机时要确保没有脉冲信号,当电机运行时如果加入适当的脉冲信号,它会转过一定的角度(称为步距角是)。转速与脉冲
56、频率成正比。 2 龙式步进电机步距角度,旋转360 度,需要 48 个脉冲来完成。 3 步进电机具有快速启动和停止的优良特性。4 只要改变脉冲,可以很容易地改变电机轴旋转的方向。因此,目前的打印机,绘图仪,机器人设备以步进电机作为动力核心。步进电机控制的例子我们以四相单极步进电机为例:四个相绕组引出四个相和两个公共线(连接到正极)。一相接地。会被激发,。我们使用四相八拍控制,即第1 阶段第 2 阶段交替反过来,会提高分辨率。步距角,可以转移到控制电机励磁是为了转移如下:如果电机反转的要求,传输的激励信号可以逆转的。 2 控制方案控制系统框图如下该方案采用 AT89S51 的主要控制装置。 它是
57、与 AT89C51 兼容,但也增加了 SPI 接口和看门狗模块,这不仅使调试变得更容易,也更稳定。单片机程序主要用于现场信号的采集和通过步进电机的运转来计算的方向和速度信息。然后将信息发送到CPLD。CPLD 使用 EPM7128SLC84-15 ,ALTERA 公司的 MAX7000 系列可编程逻辑器件EPM7128 。具有高阻抗,电可擦除等特点, 可用单位数为 2500 单位,工作电压 +5 V CPLD接收脉冲后转换为相应的控制信号输出到步进电机驱动器,从微控制器发送的信息。输入后把控制信号发送到驱动电机绕组,以达到有效控制电机的目的。为电机驱动器的硬件结构电机驱动器通过下面的电路来实现
58、:R1?R8 的电阻值为 320。 R9-R12 的电阻值为 。 Q1?Q4 作为达林顿 401A, Q5-Q8为 S8550。 J1,J2 和步进电机连接到六个接口。步进电机优点和缺点优势1。电机的旋转角度与脉冲数成正比;2。当电机停转为最大转矩(当绕组励磁时);3。由于每一步准确度为百分之三到五,而且误差不会累积到下一步,因而具有更好定位精度和重复定位精度 ;4。优良的启动和制动特性 _;5。没有电刷,可靠性高,电机的寿命只是取决于电机轴承;6。电机_仅由输入脉冲数决定,可用于开环控制,这使得电机和控制结构确定相对简单系统成本7。只是负载直接连接到电机轴也可以极其缓慢旋转8。速度与的脉冲频
59、率成正比,因此,有相对较宽的调速范围缺点1。如果没有适当的控制,容易共振;2。高速操作难度较大3。难以获得大转矩4。没有体积小,重量轻,能耗低,效率高等方面优势5。过载时会破坏同步性,工作时会发出时较大的振动和噪音步进电机驱动要求(1)为了满足速度迅速上升或下降的要求,波形应当尽可能接近矩形以释放回路电流流,绕组两端的反电动势,加速电流衰减(2)具有较高功率和效率步进电机驱动器,把输入的脉冲信号转化为角位移,每当控制系统发出一个脉冲信号,步进电机驱动就旋转一个步距角,步进电机的速度与的脉冲信号频率成正比,因此,通过控制脉冲信号频率,就可以精确控制电机转速步进脉冲数决定准确连接为电机步进电机驱动
60、器有很多,我们应该根据功率采取的合理的方式选择驱动器最新的技术发展国内和国际上对于驱动技术的研究十分活跃,高性能子驱动电路可以细分成几千部分甚至任意细分,现在已经能够做到通过复杂的计算统一步距角,大大提高了步进电机的脉冲分辨率,减少或消除振动,噪声和转矩波动,步进电机有了更多“类伺服”功能实际作用:步距角细分驱动器出现之前,用户需要选择不同的相来获取不同的步进电机步距角,以满足自己的要求,如果使用细分驱动器,用户可以通过更改驱动器号段,来改变实际的步距角,相数对实际步距角的作用几乎可以忽略不计AT89C51AT89C51 的介绍的介绍描述AT89C51 是一个拥有 4K 字节 FLASH 编程
61、功能和可擦除只读储存器的低功耗,高性能 CMOS8 位微机(PEROM)。该设备是采用 Atmel 的高密度非易失性内存技术并与工业标准的的 MCS-51 指令集和引脚兼容。芯片上的 Flash 允许程序存储器通过系统或由传统的非易失性存储器编程重新编程。通过把一个多功能8 位 CPU 与一个单一的芯片上的 Flash 相结合的, Atmel 的 AT89C51 是一个功能强大微型计算机为许多嵌入式控制程序提供了高度灵活和成本效益的解决方案。功能特点AT89C51 具有以下功能: 4K 字节的 Flash,128 字节 RAM,32 I / O 口,两个 16位定时器 /计数器,一个五向量 2
62、 级中断机构,一个全双工串行口,芯片振荡器和时钟电路。此外, AT89C51 支持频率为 0 的静态逻辑运算,并支持两种节电模式。空闲模式时 CPU 停止工作,同时允许 RAM,定时器/计数器,串口和中断系统继续运作。掉电模式保存 RAM 的内容,但冻结振荡器,禁用所有其他芯片功能,直到硬件复位。引脚描述VCC:电源电压GND:地端口 0:端口 0 是一个 8 位漏极开路双向 I / O 端口。作为一个输出端口,每个引脚可以驱动 8 个 TTL 输入端。当 1 写入端口 0 引脚,引脚可作为高阻输入端 .端口 0 也可以设定成地址 /数据在访问外部程序和数据存储器时的总线。 在这种模式下,口
63、0 内部上拉 .电阻口 0 在 Flash 编程期间也可以收到代码字节,输出程序改变的代码字节。程序改变期间还要外部上拉电阻端口 1端口 1 是一个具有内部上拉电阻的8 位双向 I / O 端口端口 1 输出缓冲器可以驱动四个 TTL 输入.当 1 被写入端口 1 它们被内部上拉电阻上拉为高电平并可以用作输入口。作为输入口时,由于内部上拉电阻的作用,引脚被外部信号拉低时输出一个电流,flash 编程和校验时端口 1 也会接收到低地址信号。端口 2端口 2 是一个具有内部上拉电阻的8 位双向 I / O 端口。端口 2 输出缓冲器可以驱动四个 TTL 输入。当 1S 写入端口 2 引脚他们被内部
64、上拉电阻拉到高电平,并可以用作输入口。作为输入口时,由于内部上拉电阻的做用,端口2 引脚被外部信号拉至低电平时,将输出电流,端口 2 在访问使用 16 位地址的外部数据存储器时发出的高位地址字节。在此应用中,它采用强大的内部上拉电阻,发光1S。在访问使用 8 位地址的外部数据存储器时,端口2 也会收到一些高八位地址信号或者控制信号。端口 3端口 3 是一个具有内部上拉电阻的8 位双向 I / O 端口。端口 3 输出缓冲器可以驱动四个 TTL 输入。当 1S 被写入端口 3 的引脚,他们被内部上拉电阻拉到高电平,并可以用作输入口。作为输入口时,由于内部上拉电阻的做用,端口2 引脚被外部信号拉至
65、低电平时,将输出电流。端口3 还为 AT89C51 提供各种特殊功能,如下:端口引脚RST复位输入引脚。震荡器运行时,两个运行周期的高电平将使设备复位。ALE / PROG在访问外部存储器时地址锁存使能输出脉冲锁存的低八位地址。该引脚也是程序在Flash 编程时的 PROG。正常运行时 ALE 以恒定的速率发出振荡频率的 1/6 的脉冲信号,可用作外部时钟或定时。 但是请注意, , 在每次访问外部数据存储器都有一个 ALE 脉冲跳过。 。如果需要,可以通过把 0 SFR 置位为 8EH 来禁用 ALE。此时,ALE 仅执行 MOVX 或 MOVC指令。如果单片机在执行外部的工作,应将 ALE
66、设置为禁用。PSEN程序储存允许输出是外部程序存储器的读选通信号,当 AT89C51 由外部程序存储器读取指令时,每个机器周期两次 PSEN 有效,即输出两个脉冲。在此期间,当访问外部数据存储器时,这两次有效的 PSEN 信号不出现。EA/ VPP第二功能RXDTXDINT0INT1T0T1WRRD外部访问允许。 EA 必须绑到 GND 才能使设备开始在 0000H 到 FFFFH 位取代码。但是请注意,如果锁存位 1 被编程,EA 将锁存位置上复位。若 EA 为高电平则单片机执行内部程序。在 Flash 编程时,也可以使用使用 12V 编程电压VCCXTAL1:震荡器反相放大器及内部时钟发生
67、器的输入端。XTAL2:震荡器反相放大器的输出端。时钟振荡器的特性时钟振荡器是可以设置为内部振荡器的反相放大器 XTAL1 和 XTAL2 分别为其出入端和输出端,如图 1 所示。石英晶体或陶瓷谐振器都可以作为其材料。如图 2 所示要想通过外部时钟来驱动它, XTAL1 工作时 XTAL2 应悬空。对外部时钟信号的占空比没有特殊要求,因为外部时钟信号是通过一个 2 分频触发器后作为内部时钟信号的,但最小高电平持续时间和最大的低电平持续时间应该符合要求。内部振荡电路外部振荡电路闲散模式在闲散模式下,CPU停止工作,而所有其他元件依然处于工作状态。该模式是通过软件控制的。这种模式下,片上RAM和所
68、有特殊功能寄存器的内部数据不变。该模式可以由任何可用的终止指令或者硬件重置来终止当由硬件复位来终止闲散工作模式时, 中央处理器CPU通常是从激活空闲模式那条指令的下一条开始继续执行程序的,要完成内部复位操作,硬件复位脉冲要保持两个机器周期有效,在这种情况下,内部禁止中央处理器 CPU访问片内RAM,而允许访问其他端口,这是为了避免可能对端口产生的意外写入:激活空闲模式的指令后面的一条指令不应是一条对端口或外部存储器的写入指令。掉电模式在掉电模式下,振荡器停止运行,断电指令是最后一条要执行的指令。片上 RAM和特殊功能寄存器保持原值,直到掉电模式终止。终止掉电唯一的方式是硬件复位。复位将重置SFR,但不改变RAM的内容。复位不能被激活,直到VCC恢复到其正常水平,以确保有足够长的时间使振荡器重新启动并稳定。 。模式闲散模式闲散模式掉电模式掉电模式程序存储器内部内部外部外部ALE1100PSENP0数据浮空数据数据P1数据数据数据数据P2数据地址数据数据P3数据数据数据数据1100