AT89C51外文翻译 外文文献 英文文献
文献翻译-AT89C51的介绍及运用概述
英文翻译系别专业班级学生姓名学号指导教师Introduction and application of AT89C51 Microcontrollers are used in a multitude of commercial applications such as modems, motor-control systems, air conditioner 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 Plaform 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.1. IntroductionThe 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 anautopilot 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 is 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 necessitatesnot 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 postsilicon 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, a five vector two-level interrupt architecture,a full duple ser -ial 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 oscil -lator disabling all other chip functions until the next hardware reset.Pin Configurations Block Diagram2 Pin DescriptionVCC Supply voltage.GND Ground.Port 0Port 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 low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pullups are required during program verification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/so -urce four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port1 pins that are externally being pulled low will source current (IIL) because ofthe internal pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 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 pullups 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 pullups.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 pullups.Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @DPTR). In this application, it uses strong internal pull-ups when emitting 1s.During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emitsthe contents of the P2 Special Function Register.Port 2 also receives the high-order address bits and some control signals durin Flash programming and verification.Port 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/sou -rce four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special featuresof the AT89C51 as listed below:3 Port Pin Alternate FunctionsP3.0 RXD(serial input port)P3.1 TXD (serial output port)P3.2 INT0 (external interrupt 0)P3.3 INT1 (external interrupt 1)P3.4 T0 (timer 0 external input)P3.5 T1 (timer 1 external input)P3.6 WR (external data memory write strobe)P3.7 RD (external data memory read strobe)Port 3 also receives some control signals for Flash programming and verification. RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress 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 duri -ng 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.PSENProgram 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.EA/VPPExternal 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.EA 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.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.4 Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Idle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, theinstruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.Figure 1. Oscillator Connections Figure 2. External Clock Drive Configuration Note: C1, C2 = 30 pF . .10 pF for Crystals = 40 pF . .10 pF for Ceramic Resonators In the power-down mode, the oscillator is stopped, and the instruction that invokes.5 Power-down Modepower-down is the last instruction executed. The on-chip RAM and Special Function 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 but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Status of External Pins During Idle and Power-down Modes Mode Program Memory ALE PSEN PORT0 PORT1 PORT2 PORT3Idle Internal 1 1 Data Data Data DataIdle External 1 1 Float Data Address DataPower-down Internal 0 0 Data Data Data DataPower-down External 0 0 Float Data Data DataProgram Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.Lock Bit Protection Modes Program Lock Bits Protection Type LB1 LB2 LB31 U U U No program lock features2 P U U MOVC instructions executed from external program memory are disabled from etching code bytes from internal memory.3 P P U Same as mode 2, also verify is disabled4 P P P Same as mode 3, also external execution is disabledWhen lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.6 Programming the FlashThe AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal. The low-voltage programming mode provides a convenient way to program the AT89C51 inside the user’s system, while the high-voltage programming mode is compatible with conventional thirdparty Flash or EPROM programmers. The AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled. The respective top-side marking and device signature codes are listed in the following table.VPP = 12V VPP = 5VTop-Side Mark AT89C51 AT89C51xxxx xxxx-5yyww yywwSignature (030H) = 1EH (030H) = 1EH(031H) = 51H (031H) = 51H(032H) =F FH (032H) = 05HThe AT89C51 code memory array is programmed byte-bybyte 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.7 Programming AlgorithmBefore programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table and Figure 3 and Figure 4. To program the AT89C51, take the following steps.1. Input the desired memory location on the address lines.2. Input the appropriate data byte on the data lines.3. Activate the correct combination of control signals.4. Raise EA/VPP to 12V for the high-voltage programming mode.5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.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 indicateREADY.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 observing that their features are enabled.8 Flash Programming ModesMode RST PSEN ALE/PROG EA/VPP P2.6 P2.7 P3.6 P3.7Write Code Data H L H/12V L H H HRead Code Data H L H H L L H HWriteLockBit -1 H L H/12V H H H HBit -2 H L H/12V H H L LBit -3 H L H/12V H L L LChip Erase H LH/12V H L L LRead Signature Byte H L H H L L L LNote: 1. Chip Erase requires a 10 ms PROG pulse.Figure 3. Programming the Flash Figure 4. Verifying the FlashFlash Programming and Verification Waveforms -High-voltage Mode (VPP = 12V) Flash Programming and Verification Waveforms -Low-voltage Mode (VPP = 5V)9 Chip EraseThe entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all “1”s. The chip erase operation must be executed befor e the code memory can be re-programmed.Reading the Signature Bytes:The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned areas follows.(030H) = 1EH indicates manufactured by Atmel(031H) = 51H indicates 89C51(032H) = FFH indicates 12V programming(032H) = 05H indicates 5V programmingProgramming InterfaceEvery code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is selftimed and once initiated, will automatically time itself to completion. Flash Programming and Verification Characteristics TA = 0°C to 70°C, VCC = 5.0 . .10%10 Symbol Parameter Min Max UnitsVPP(1) Programming EnableV oltage11.5 12.5 VIPP(1) Programming Enable Current 1.0 mA1/tCLCL Oscillator Frequency 3 24 MHztA VGL Address Setup to PROGLow48tCLCLtGHAX Address Hold After PROG 48tCLCLtDVGL Data Setup to PROG Low 48tCLCLtGHDX Data Hold After PROG 48tCLCLtEHSH P2.7(ENABLE) High to VPP 48tCLCLtSHGL VPP Setup to PROG Low 10 μstGHSL(1) VPP Hold After PROG 10 μstGLGH PROG Width 1 110 μstA VQV Address to Data Valid 48tCLCLtELQV ENABLE Low to Data Valid 48tCLCLtEHQZ Data Float After ENABLE 0 48tCLCLtGHBL PROG High to BUSY Low 1.0 μstWC Byte Write Cycle Time 2.0 msNote: 1. Only used in 12-volt programming mode.Absolute Maximum Ratings*Operating Temperature......................... -55°C to +125°CStorage Temperature ............................. -65°C to +150°CV oltage on Any Pin with Respect to Ground ............-1.0V to +7.0VMaximum Operating V oltage .................................. 6.6VDC Output Current....................................... 15.0 mA11 DC CharacteristicsTA = -40°C to 85°C, VCC = 5.0V . .20% (unless otherwise noted)Symbol Parameter Condition Min Max Units VIL Input Low-voltage (Except EA) -0.5 0.2 VCC 0.1 -VVIL1 nput Low-voltage (EA) -0.5 0.2 VCC 0.3 -VVIH iput High-voltage (Except XTAL1, RST) 0.2 VCC +0.9 VCC + 0.5 VVIH1 Input High-voltage (XTAL1, RST) 0.7 VCC VCC + 0.5 VVOL Output Low-voltage(1) (Ports 1,2,3) IOL = 1.6 mA 0.45 VVOL1 Output Low-voltage(1) (Port 0, ALE, PSEN) IOL = 3.2 mA 0.45 VVOH Output High-voltage (Ports 1,2,3, ALE, PSEN) IOH = -60 μA, VCC = 5V . .10% 2.4 VIOH = -25 μA 0.75 VCC VIOH = -10 μA 0.9 VCC VVOH1 Output High-voltage (Port 0 in External Bus Mode) IOH = -800 μA, VCC = 5V . .10% 2.4 VIOH = -300μA, 0.75 VCC VIOH = -80μA, 0.9 VCC VIIL Logical 0 Input Current (Ports 1,2,3)VIN = 0.45V -50 μ AITL Logical 1 to 0 Transition Current (Ports 1,2,3) VIN = 2V, VCC = 5V . .10% -650 μ AILI Input Leakage Current (Port 0, EA) 0.45 < VIN < VCC . 10 μ A RRST Reset Pull-down Resistor 50 300 K.CIO Pin Capacitance Test Freq. = 1 MHz, TA = 25°C 10 pFICC Power Supply Current Active Mode, 12 MHz 20 mA Idle Mode, 12 MHz 5 mA Power-down Mode(2) VCC = 6V 100 μ A VCC = 3V 40 μ A12 AC CharacteristicsUnder operating conditions, load capacitance for Port 0, ALE/PROG, and PSEN = 100 pF; load capacitance for all other outputs = 80 pF.External Program and Data Memory Characteristics Symbol ParameterFrequency 12 MHz Oscillator 16 to 24 MHz Oscillator Units Min Max Min Max 1/tCLCL Oscillator 0 24 MHztLHLL ALE Pulse Width 127 2tCLCL-40 40 ns nstA VLL Address Valid to ALE Low 43 tCLCL-13 nstLLAX Address Hold After ALE Low 48 tCLCL-20 nstLLIV ALE Low to Valid Instruction In 233 4tCLCL-65 nstLLPL ALE Low to PSEN Low 43 tCLCL-13 nstPLPH PSEN Pulse Width 205 3tCLCL-20 nstPLIV PSEN Low to Valid Instruction In 145 3tCLCL-45 nstPXIX Input Instruction Hold After PSEN 0 0 nstPXIZ Input Instruction Float After PSEN 59 tCLCL-10 nstPXA V PSEN to Address Valid 75 tCLCL-8 nstA VIV Address to Valid Instruction In 312 5tCLCL-55 nstPLAZ PSEN Low to Address Float 10 10 nstRLRH RD Pulse Width 400 6tCLCL-100 nstWLWH WR Pulse Width 400 6tCLCL-100 nstRLDV RD Low to Valid Data In 252 5tCLCL-90 nstRHDX Data Hold After RD 0 0 ns 13tRHDZ Data Float After RD 97 2tCLCL-28 nstLLDV ALE Low to Valid Data In 517 8tCLCL-150 nstA VDV Address to Valid Data In 585 9tCLCL-165 nstLLWL ALE Low to RD or WR Low 200 300 3tCLCL-50 3tCLCL+50 nstA VWL Address to RD or WR Low 203 4tCLCL-75 nstQVWX Data Valid to WR Transition 23 tCLCL-20 nstQVWH Data Valid to WR High 433 7tCLCL-120 nstWHQX Data Hold After WR 33 tCLCL-20 nstRLAZ RD Low to Address Float 0 0 nstWHLH RD or WR High to ALE High 43 123 tCLCL-20 nsExternal Program Memory Read CycleExternal Data Memory Read CycleExternal Data Memory Write Cycle External Data Memory Write CycleExternal Clock Drive WaveformsExternal Clock DriveSymbol Parameter Min Max Units1/tCLCL Oscillator Frequency 0 24 MHztCLCL Clock Period 41.6 nstCHCX High Time 15 nstCLCX Low Time 15 nstCLCH Rise Time 20 nstCHCL Fall Time ns 20 nsSerial Port Timing:Shift Register Mode Test Conditions(VCC = 5.0 V . .20%; Load Capacitance = 80 pF)Symbol Parameter 12 MHz Osc Variable Oscillator Units UnitsMin Max Min MaxtXLXL Serial Port Clock Cycle Time 1.0 12tCLCL μstQVXH Output Data Setup to Clock Rising Edge 700 10tCLCL-133 nstXHQX Output Data Hold After Clock Rising Edge 50 2tCLCL-117 nstXHDX Input Data Hold After Clock Rising Edge 0 0 nstXHDV Clock Rising Edge to Input Data Valid 700 10tCLCL-133 ns 13 ShiftRegister Mode Timing Waveforms AC Testing Input/Output Waveforms Float WaveformsA 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 theoutside. 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.AT89C51的介绍及运用单片机广泛应用于商业:诸如调制解调器,电动机控制系统,空调控制系统,汽车发动机和其他一些领域。
外文翻译--AT89C51单片机的介绍
专业文献翻译题目: AT89C51单片机的介绍姓名:学院:专业: 电子信息科学与技术班级: 班学号:指导教师: 职称:20 年月日原文:The Introduction of AT89C51DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Function characteristicThe AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, one 5 vector two-level interrupt architecture, a full duplex serial port, one-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 system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.Pin DescriptionVCC:Supply voltage.GND:Ground.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 address/data bus during accesses to external program and data memory. In this mode P0 has internal Pull-up resistor. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during Program verification. External Pull-up resistors are required during Program verification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal Pull-up resistors. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal Pull-up resistors 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-up resistors. Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 2 is an 8-bit bi-directional I/O port with internal Pull-up resistor. 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-up resistor and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current, because of the internal Pull-up resistor. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal Pull-up resistor when emitting 1s. During accesses to external data memory that use 8-bit addresses, 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 is an 8-bit bi-directional I/O port with internal Pull-up resistor. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal Pull-up resistor 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-up resistor. Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification.RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress 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 during each access to external Data Memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bitset, 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.PSENProgram 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.EA/VPPExternal 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. EA 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 require12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum andmaximum voltage high and low time specifications must be observed.Figure 1. Oscillator Connections Figure 2. External Clock Drive ConfigurationIdle ModeIn idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not 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 that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit frompower-down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.译文:AT89C51的介绍描述AT89C51是一个低电压,高性能CMOS 8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。
AT89C51的外文文献及翻译
原文:The Introduction of AT89C51DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Function characteristicThe AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial 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 system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.1 / 13Pin DescriptionVCC:Supply voltage.GND:Ground.Port 0Port 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 highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming,and outputs the code bytes during programverification. External pullups are required during programverification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups 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 pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 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 pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-orderaddress byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, 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 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification.3 / 13RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress 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 during each access to external Data Memory.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.PSENProgram 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.EA/VPPExternal 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.EA 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 require12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.5 / 13Figure 1. Oscillator Connections Figure 2. External Clock Drive ConfigurationIdle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution,from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not 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 that invokes power-down is the last instruction executed. The on-chip RAM and Special Function 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 but does not change the on-chipRAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.7 / 13译文:AT89C51的介绍描述AT89C51是一个低电压,高性能CMOS 8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。
AT89C51的外文文献及翻译
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 highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming,and outputs the code bytes during programverification. External pullups are required during programverification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internalpullups.ThePort1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups and can Байду номын сангаасe used as inputs. As inputs,Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.
单片机外文翻译----AT89C51单片机控制的恒温水域温控系统
中文2528字AT89C51 single-chip temperature-controlled watertemperature control systemEarly contact thermometers for chemical water temperature thermostat shortcomings, this paper introduces an approach based on AT89C51 single-chip microcomputer-based controller, combined with integrated temperature sensor AD590J composed of constant temperature water temperature control system.Chemical, chemical experiments and research on water temperature requirements of high performance and accuracy, the current market face chemistry, chemical experiments and study the high price of heated water systems. In this paper, the design of single-chip component AT89C51 from the temperature control system for people with low-cost, high precision, intelligent control, etc.The water temperature of the performance indicators are: Temperature range: 0 ~ 1O0 ℃; temperature range: 0 ~ 99.9 ℃; temperature: 0.4 ℃; heating power: 1000W.Part of the hardware circuitAT89C51 selected as the system CPU, it is a low-power, high performance, 4kB flash chip programmable / erasable read-only memory 8-bit microcontroller COMS.Block diagram of the system AT89C51 single-chip by chip, IO expansion port 8255 chip, 8032 chip digital-to-analog conversion, analog-to-digital conversion chip 0809, keyboard control, status indication circuit, sampling circuit temperature thermostat control circuit, driver circuit and display circuit, such as group into.1.1 temperature sampling circuitTemperature sampling circuit using AD590 current-mode temperature-sensitive device of its stability and linearity are better. When in AD590 for the current 273.2uA, temperature increase 1℃, the current increase in 1uA. The current is converted to voltage signal by analog-to-digital converter ADC0809, AT89C51 single-chip temperature monitoring and conversion. One resistor R measurement using a low temperature coefficient of resistance, temperature coefficient of 10 x l0_6 / ℃. When monitoring the temperature of lO0 ℃when generated in the resistor voltage 18.66V about, when the temperature is 0 ℃when generated in the resistance of about 13.66V voltage, that is, at a temperature of 0 ~ 1O0 ℃in resistance on pressure drop resulting from bad to 5v. However, when the temperature is 0 ℃demodulation IC2 potential output allows for OV, the time when 1O0 ℃for IC2 output 5v, in the constant temperature water tank 3 installed AD590, which are located under the sink in the various parts, using its monitoring of temperature changes in the market tank in order to control the stirring motor to ensure uniform temperature sink.1.2 thermostat control circuitConstant temperature control circuit from heating thermostat temperature setting and the composition of the two parts of the circuit. The thermostat circuit settings temperature to provide the working conditions of the heating circuit, the circuit set by the keyboard combination of software programming to achieve common. In addition to each button and set the IO port connected to 8255, but also through a door with the AT89C51 and T0 timer connected so that when the button is depressed immediately after the interruption to the application AT89C51, 8255 inquiry, and at the same time the functions of the corresponding control . One set is the key type from the set and the AT89C51, D / A converter analog voltage measurement is the AD590, after the detection signal AT89C51, D / A converter provides analog, IC3 constitute a comparison amplifier, IC4 ratio amplifier , BG1, BG2, T constitutes a thyristor conduction angle control circuit, a single bipolar transistor oscillator circuit the lower the frequency, SCR's on-the shorter the time the smaller the heating power, on the contrary higher. Single-junction transistors and the oscillation frequency by the ratio of amplifier output voltage control, AT89C51 single-chip temperature settings through the sample and the temperature difference after the value, after amplification by comparison with the temperature change to mediate voltage thyristor the conduction angle in order to achieve the adjustment of heating power to meet the temperature requirements of the waters of the thermostat.1.3 Drive CircuitWhen the 8255 high output corresponding IO port, the drive transistor turn-on 9013, so that the relay action, in order to drive the work of the relevant circuit. Significant choice for a show so that the display to choose between the "settings" and "measurement".1.4 Keyboard control and status indication circuitWith the 8255 connected to the IO port 8 and 9 LED button to complete thecommon waters of the control thermostat and the instructions state. In addition to each button with the 8255 connected to the IO port, but also with AT89C51 it connected the timer so that when the button is depressed immediately after the interruption of AT89C51 applications, and query the status of 8255 in order to carry out the functions of the corresponding control. 1.5 shows the circuit Display circuit using a half the number of table 4 show the temperature head waters of the measurement of temperature and set temperature.2 Software designSkeleton of the software, contains initialization, configuration subroutine, subroutines to deal with temperature, showing subroutine. Completion of system initialization after power-on reset 8255 and software initialization and pre-heated water for the water to wait for work, and open the inlet solenoid valve, when the corresponding button press interrupted when AT89C51, read 8255 the status of the population to determine the function keys in order to call the corresponding subroutine. Subroutine completed one set of the set temperature function. Initialization settings for the "0o.0o", when the choice set and to identify key addition and subtraction operations for each click on the Settings button software settings for the corresponding temperature of the addition and subtraction operation count, and the value storage and display. Subroutine to deal with the role of temperature is the temperature set values and the difference to the SCR trigger circuit heating thermostat control.2.1 The use of Pro / E to establish mold standard parts library FamilyPro/E is part of the family table (or assembly, or the characteristics of) a collection of these parts (or assembly or characteristics) are broadly similar, but in 12 some small differences, for example, fastening screws Hexagon many kinds of specifications, but they seem to be like and to implement the same function, so in the Pro / E in them as a part family is a very useful table in the family the same as a table-driven components parts to be identified. In Pro / E use group table has the following advantages:1) simple and compact to create and store a large number of objects.2) For the generation of standard parts to save a great deal of time and work.3) parts from a series of documents to generate change, do not have to re-create and generate for each part.4) In the parts to create tiny changes in the relationship do not have to use to changethe model.Table feature allows three-dimensional mold standard parts library and standard library mold the development and use of things become very easy. The following guide to commonly used as an example to create a lead-chu-chu series of standard parts. First, Pro / E in the completion of the three-dimensional modeling guide column, and the need to change the size parameters defined as symbols. To mark the size of symbol table for the family members did not indicate the size of the features of a non-changing, dependent on the existence of other features.Family Table is essentially constituted by the rows and columns of the table to start, you can use the Pro / TABLE to create and modify. Here contains examples and their appropriate values, the use of specific projects were listed. Generic model is not in the group table of the project be included in each instance will be automatically generated in accordance with design intent, Family Table, regardless of the merits of another to create a new table or modify an existing table, you can add to the table project. The use of the above-mentioned methods. Enterprises can die design in accordance with the need to build their own three-dimensional mold standard parts library.2.2 The use of Pro / E to establish the standard mold base libraryIn the use of Pro / E to establish the mold standard parts library, in order to further improve the efficiency of die design, quality and standardization, it is necessary to consider the establishment of standard mold base library, the following discussion of how to use Pro / E to establish the standard mold base. The establishment of standard mold base the first thing to consider is the business of processing capacity punching equipment, punching equipment to the processing capacity as well as equipment based on the work table to consider the standard form of mold, practicality and versatility will be higher. In the three-dimensional mold standard parts library has been established under the premise of the establishment of standards mold-base much to the convenience and quick. First of all, to enter the Pro / ASSMBLY equipped) mode, with the establishment of similar communities standard parts, the specific path for the operation: ASSMBLY (components) -- Family Tab (Family Table add-item (additional items)) -- Component (component), and then choose to change to take place in the assembly of parts or components as the assembly of the project group table, and in the assembly do not need to change family (such as fasteners) you do not need to select. instances in the assembly of the assemblyaccording to the agreed relationship between the automatically generated . other aircraft such as the bending modulus, tensile modulus planes.Taking full account of this, pressing equipment and typical performance parameters under the premise of stamping parts, you can use the same solution to create a standard mold base.3 ConclusionAt present, some colleges and universities as a result of provincial funding in the strained devices, laboratory equipment, more backward, in chemistry and chemical engineering laboratories still use a contact thermometer to control water temperature. In order to overcome the factors that a lot of inconvenience to the original based on the old thermostat has been designed transformation of waters. Proved by the use of the design,to meet the current chemistry, chemical engineering and research needs of the experimental results.AT89C51单片机控制的恒温水域温控系统针对化工早期接点温度计恒温水域控温存在的缺点,本文介绍了一种基于AT89C51单片机为主控制器,结合AD590J集成温度传感器等组成的恒温水域温控系统。
英文原文
英文原文A T89C51 DA TA SHEEP Philips Semiconductors 1999.decDescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory (PEROM) and 128 bytes RAM. The device is manufacture d using Atmel’s high density nonvolatile memory technology and is compatible with the industry standard MCS-51™ instruction set and pinout. The chip combines a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.Features:• Compatible with MCS-51™ Products• 4K Bytes of In-System Reprogrammable Flash Memory• Endurance: 1,000 Write/Erase Cycles• Fully Static Op eration: 0 Hz to 24 MHz• Three-Level Program Memory Lock• 128 x 8-Bit Internal RAM• 32 Programmable I/O Lines• Two 16-Bit Timer/Counters• Six Interrupt Sources• Programmable Serial Channel• Low Power Idle and Power Down ModesThe AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial 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 system to continue functioning. The Power Down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.Block DiagramPin Description:VCC Supply voltage.GND Ground.Port 0Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs. When is 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 loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pullups are required during program verification.Port 1Port 1 is an 8-bit bidirectional I/O port with internal pullups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pullups 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 pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 2 is an 8-bit bidirectional 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 theinternal pullups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (I IL) because of the internal pullups.Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 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 3Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 alsoreceives some controlsignals for Flashprogramming andverification.RSTReset input. Ahigh on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress 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 during each access to external Data Memory.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.PSENProgram 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.EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the device to fetchcode 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.EA 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.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Idle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not 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 that invokes power down is the last instruction executed. The on-chip RAM and Special Function 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 but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below:When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.Programming the Flash:The AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed.The programming interface accepts either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal.The low voltage programming mode provides a convenient way to program the AT89C51 inside the user’s system, while the high-voltage programming mode is compatible with conventional third party Flash or EPROM programmers.The AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled. The respective top-side marking and device signature codes are listed in the followingThe AT89C51 code memory array is programmed byte-bybyte in either programming mode. To program any nonblank byte in the on-chip Flash Programmable and Erasable Read OnlyMemory, the entire memory must be erased using the Chip Erase Mode.Programming Algorithm:Before programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table and Figures 3 and 4. To program the AT89C51, take the following steps.1. Input the desired memory location on the address lines.2. Input the appropriate data byte on the data lines.3. Activate the correct combination of control signals.4. Raise EA/VPP to 12V for the high-voltage programming mode.5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. Thebyte-write cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.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 observing that their features are enabled.Chip Erase: T he entire Flash Programmable and Erasable Read Only Memory array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all “1”s. The chip erase operation must be executed before the code memory can be re-programmed.Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows.(030H) = 1EH indicates manufactured by Atmel(031H) = 51H indicates 89C51(032H) = FFH indicates 12V programming(032H) = 05H indicates 5V programmingProgramming InterfaceEvery code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is selftimed and once initiated, will automatically time itself to completion.Note: 1.chip erase requires a 10-ms PROG pulseFigure 3. Programming the Flash Figure 4. Verifying the FlashFlash Programming and Verification CharacteristicsNote: 1. Only used in 12-volt programming mode.Flash Programming and Verification Waveforms - High Voltage Mode (VPP = 12V)Flash Programming and Verification Waveforms - Low Voltage Mode (VPP = 5V)Absolute Maximum Ratings*Operating Temperature.................................. -55°C to +125°CStorage Temperature ..................................... -65°C to +150°CVoltage on Any Pinwith Respect to Ground .....................................-1.0V to +7.0VMaximum Operating Voltage............................................. 6.6VDC Output Current...................................................... 15.0 mADC CharacteristicsNotes: 1. Under steady state (non-transient) conditions, IOL must be externally limited as follows:Maximum IOL per port pin: 10 mAMaximum IOL per 8-bit port: Port 0: 26 mAPorts 1, 2, 3: 15 mAMaximum total IOL for all output pins: 71 mA2. Minimum VCC for Power Down is 2V.AC Characteristics(Under Operating Conditions; Load Capacitance for Port 0, ALE/PROG, and PSEN = 100 pF; Load Capacitance for all other outputs = 80 pF)External Program Memory Read CycleExternal Data Memory Read CycleExternal Data Memory Write CycleExternal Clock Drive WaveformsSerial Port Timing: Shift Register Mode Test ConditionsShift Register Mode Timing WaveformsAC Testing Input/Output Waveforms(1)Note: 1. AC Inputs during testing are driven at VCC - 0.5V for a logic 1 and 0.45V for a logic 0. Timing measurements are made at VIH min. for a logic 1 and VIL max. for a logic 0.(1)Float WaveformsNote: 1. For timing purposes, a port pin is no longer floating when a 100 mV change from load voltage occurs. A port pin begins to float when 100 mV change from the loaded VOH/VOL level occurs.Ordering Information* SFRs are bit addressable.– Reserved bits.. Reset value depends on reset source.。
(完整)AT89C51单片机英文文献附带翻译
AT89C51的概况一 AT89C51应用单片机广泛应用于商业:诸如调制解调器,电动机控制系统,空调控制系统,汽车发动机和其他一些领域。
这些单片机的高速处理速度和增强型外围设备集合使得它们适合于这种高速事件应用场合.然而,这些关键应用领域也要求这些单片机高度可靠。
健壮的测试环境和用于验证这些无论在元部件层次还是系统级别的单片机的合适的工具环境保证了高可靠性和低市场风险。
Intel 平台工程部门开发了一种面向对象的用于验证它的AT89C51 汽车单片机多线性测试环境。
这种环境的目标不仅是为AT89C51 汽车单片机提供一种健壮测试环境,而且开发一种能够容易扩展并重复用来验证其他几种将来的单片机。
开发的这种环境连接了AT89C51.本文讨论了这种测试环境的设计和原理,它的和各种硬件、软件环境部件的交互性,以及如何使用AT89C51。
1.1 介绍8 位AT89C51 CHMOS 工艺单片机被设计用于处理高速计算和快速输入/输出。
MCS51 单片机典型的应用是高速事件控制系统。
商业应用包括调制解调器,电动机控制系统,打印机,影印机,空调控制系统,磁盘驱动器和医疗设备。
汽车工业把MCS51 单片机用于发动机控制系统,悬挂系统和反锁制动系统.AT89C51 尤其很好适用于得益于它的处理速度和增强型片上外围功能集,诸如:汽车动力控制,车辆动态悬挂,反锁制动和稳定性控制应用。
由于这些决定性应用,市场需要一种可靠的具有低干扰潜伏响应的费用-效能控制器,服务大量时间和事件驱动的在实时应用需要的集成外围的能力,具有在单一程序包中高出平均处理功率的中央处理器。
拥有操作不可预测的设备的经济和法律风险是很高的。
一旦进入市场,尤其任务决定性应用诸如自动驾驶仪或反锁制动系统,错误将是财力上所禁止的。
重新设计的费用可以高达500K 美元,如果产品族享有同样内核或外围设计缺陷的话,费用会更高。
另外,部件的替代品领域是极其昂贵的,因为设备要用来把模块典型地焊接成一个总体的价值比各个部件高几倍.为了缓和这些问题,在最坏的环境和电压条件下对这些单片机进行无论在部件级别还是系统级别上的综合测试是必需的。
单片机英文参考文献
单片机英文参考文献篇一:5-单片机+外文文献+英文文献+外文翻译中英对照AT89C51的介绍(原文出处:http:///resource/)描述AT89C51是一个低电压,高性能CMOS8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。
和128字节的存取数据存储器(RAM),这种器件采用ATMEL公司的高密度、不容易丢失存储技术生产,并且能够与MCS-51系列的单片机兼容。
片内含有8位中央处理器和闪烁存储单元,有较强的功能的AT89C51单片机能够被应用到控制领域中。
功能特性AT89C51提供以下的功能标准:4K字节闪烁存储器,128字节随机存取数据存储器,32个I/O口,2个16位定时/计数器,1个5向量两级中断结构,1个串行通信口,片内震荡器和时钟电路。
另外,AT89C51还可以进行0HZ的静态逻辑操作,并支持两种软件的节电模式。
闲散方式停止中央处理器的工作,能够允许随机存取数据存储器、定时/计数器、串行通信口及中断系统继续工作。
掉电方式保存随机存取数据存储器中的内容,但震荡器停止工作并禁止其它所有部件的工作直到下一个复位。
引脚描述VCC:电源电压 GND:地 P0口:P0口是一组8位漏极开路双向I/O口,即地址/数据总线复用口。
作为输出口时,每一个管脚都能够驱动8个TTL电路。
当“1”被写入P0口时,每个管脚都能够作为高阻抗输入端。
P0口还能够在访问外部数据存储器或程序存储器时,转换地址和数据总线复用,并在这时激活内部的上拉电阻。
P0口在闪烁编程时,P0口接收指令,在程序校验时,输出指令,需要接电阻。
沈阳航空工业学院电子工程系毕业设计(外文翻译)P1口:P1口一个带内部上拉电阻的8位双向I/O口,P1的输出缓冲级可驱动4个TTL电路。
对端口写“1”,通过内部的电阻把端口拉到高电平,此时可作为输入口。
因为内部有电阻,某个引脚被外部信号拉低时输出一个电流。
闪烁编程时和程序校验时,P1口接收低8位地址。
AT89C51的外文文献及翻译
原文:The Introduction of AT89C51DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Function characteristicThe AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial 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 system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.Pin DescriptionVCC:Supply voltage.GND:Ground.Port 0Port 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 highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming,and outputs the code bytes during programverification. External pullups are required during programverification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups 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 pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 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 pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-orderaddress byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, 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 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification.RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress 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 during each access to external Data Memory.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.PSENProgram 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.EA/VPPExternal 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.EA 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 require12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Figure 1. Oscillator Connections Figure 2. External Clock Drive ConfigurationIdle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution,from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not 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 that invokes power-down is the last instruction executed. The on-chip RAM and Special Function 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 but does not change the on-chipRAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.译文:AT89C51的介绍描述AT89C51是一个低电压,高性能CMOS 8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。
基于AT89C51的遥控定时器外文翻译
毕业论文(设计)文献翻译本翻译源自于:CNKI数字图书馆毕业设计名称:基于单片机的无线定时计时系统接口设计外文翻译名称:基于单片机的定时器设计学生姓名:院 (系):电子信息学院专业班级:电气10703班指导教师:辅导教师:时间:2011年2月21日至2011年4月20日基于AT89C51的遥控定时器描述:AT89C51是一个低电压,高性能CMOS 8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。
这种器件采用ATMEL公司的高密度、不容易丢失存储技术生产,并且能够与MCS-51系列的单片机兼容。
片内含有8位中央处理器和闪烁存储单元,有较强的功能的AT89C51单片机能够被应用到控制领域中。
功能特性:AT89C51提供以下的功能标准:4K字节闪烁存储器,128字节随机存取数据存储器,32个I/O口,2个16位定时/计数器,1个5向量两级中断结构,1个串行通信口,片内震荡器和时钟电路。
另外,AT89C51还可以进行0HZ的静态逻辑操作,并支持两种软件的节电模式。
闲散方式停止中央处理器的工作,能够允许随机存取数据存储器、定时/计数器、串行通信口及中断系统继续工作。
掉电方式保存随机存取数据存储器中的内容,但震荡器停止工作并禁止其它所有部件的工作直到下一个复位。
引脚描述:VCC:电源电压GND:地P0口:P0口是一组8位漏极开路双向I/O口,即地址/数据总线复用口。
作为输出口时,每一个管脚都能够驱动8个TTL电路。
当“1”被写入P0口时,每个管脚都能够作为高阻抗输入端。
P0口还能够在访问外部数据存储器或程序存储器时,转换地址和数据总线复用,并在这时激活内部的上拉电阻。
P0口在闪烁编程时,P0口接收指令,在程序校验时,输出指令,需要接电阻。
P1口:P1口一个带内部上拉电阻的8位双向I/O口,P1的输出缓冲级可驱动4个TTL电路。
对端口写“1”,通过内部的电阻把端口拉到高电平,此时可作为输入口。
电气电子专业外文翻译--AT89C51的介绍
原文:The Introduction of AT89C51DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Function characteristicThe AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial 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 system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.Pin DescriptionVCC:Supply voltage.GND:Ground.Port 0Port 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 highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming,and outputs the code bytes during programverification. External pullups are required during programverification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups 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 pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 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 pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, 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 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification.RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress 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 during each access to external Data Memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bitset, 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.PSENProgram 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.EA/VPPExternal 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.EA 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 require12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Figure 1. Oscillator Connections Figure 2. External Clock Drive ConfigurationIdle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution,from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset,the instruction following the one that invokes Idle should not 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 that invokes power-down is the last instruction executed. The on-chip RAM and Special Function 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 but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to functionproperly.译文:AT89C51的介绍描述AT89C51是一个低电压,高性能CMOS 8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。
基于单片机的智能小车外文文献翻译
毕业设计(论文)外文文献翻译系部机电工程系专业车辆工程学生姓名学号指导教师职称讲师2013年2 月Electric intelligent car based on SCMThrough research and to realize a photoelectric sensor for sensitive components ,with AT89C51 as control core electric tracing of intelligent control carbonylation-the car ,the system is also including dc motor ,L9110 chips and LM324 comparator etc. The design USES AT89C51 as intelligent car core controller.The system takes microcontroller as control core and realization of electric before Enter ,back ,turn left and right turn function .Through the Angle sensor detection the seesaw Angle change ,use incremental pl algorithm to control the electric car for balance ,and using photoelectric sensor detection black line ,make the electricity Actuation vehicle in the course of driving keep linear motion and don’t skip from atrium .1. Project DesignLight buy a sensor ,the reality of the electric car is moving quickly degrees ,bit ,buy, transportation line shape when measured quantity of real condition ,and will be measured quantity number according to preach sent to monolithic machine into line processing, but buy single chip machine according to the measured buy root different forms of several inspection according to real now to electric actuation vehicle wisdom can control system .This kind of square case real now to electric actuation vehicle dynamic shape state into the shipment do real possession in system ,control system spirit alive ,can depend ,pure degree is high ,can full foot of each item of the stockings to bed .(1)straight epidemiological speed is tasseled straight epidemiological speed department with pulse width modulation experience .meanwhile gather speed is experience .meanwhile ,its main electrical pulse width modulation by road system type variable change device ,Jane says PWM variable change device .Adjustable speed by in the department of PWM experience .Meanwhile open shut frequency rate is high ,only on electricity barnado electricity sense of filter wave can be use to get to move very small straight pulse electric flow ,electricity flow barnado electric capacity easily even tantras, department of low speed operation flat experience .meanwhile ,adjustable speed stability van is surrounded relatively wide ,can reach 1000 left light .By on electrical flow wave shape than V-M system .be in phase with flat to all electrical flow dynamic machine ,electric heat consumption and hair loss than a small .with the sample buy in open shut frequency rate is high ,and if a fast speed electrical machine ring should match close ,fasten tasseled phase can be to get very wide frequency band ,because of the fast speed ring should be good ,dynamic configuration sexual can perturbation resistance can force is powerful .According to the root ,with more than ensemble close and this set of electrical machine control project by tolerance of the quantity and electrical machine speed straight flow of hair ,the exhibitor to adopt the project with a single extremely H type can be changed into change device inverse PWM line speed .1.1 photoelectric detection module designThe intelligent car was stuck on the black line running on white paper “road”, so this module design need to detect shop on the black rubber belt drive area , including Run straight along the arc district and driving district two area .Because f the black and white paper to light reflection coefficient is different ,can according to receive reflected light .The strength of the judge “road”-the black line .this paper USES is simple and practical detection methods, namely the infrared detection method.Infrared detection method ,I use infrared ray in different colors of physical surface with different reflection properties characteristics .In the car driving process Continually to the ground to launch the infrared ,when the infrared met white ground occurs when the reflected light ,aimless and launch packed on the car of receiving tube receiving ; if Fruit is met black line is absorbed ,and than the infrared cars receiving tube receiving less than signal .1.2 signal comparative module designThis part design USES a LM324 comparator ,of sensor signal voltage received compare and amplified ,and will compare the results after Feed to the microcontroller ,used to detect sensor sensitivity ,diagram shown in figure 5 shows .When two sensors simultaneously detect light ,straight forward .When the sensor can’t detect light ,in cut-off state ,double LM324 operational amplifier output low level to microcontroller ,by program processing ,If left not detected light ,then left correct direction; If the right has not been detected light ,then turn correct direction .1.3 motor control and driving module designBecause use is double drive cars ,this part of the circuit must be able to output of two different voltage values ,respectively to controlling trolley right and left two motor drive ,the two of the wheel speed and direction of the same or different ,thus to control its advance and turning .In system design process ,use two L9110 chips to connect SCM and dc motor respectively .L9110 is for control and drive motor design two channels push-pull power amplifier application-specific integrated circuit device ,discrete circuits in monolithic IC integrated such that the peripheral equipments in lower cost and the whole machine can carry on sexual high .The core slice two a TTL/CMOS and let electricity flat lose into ,have good anti-jamming ,two output terminal can pick flooding dynamic electric machine straight to the shipment of positive reverse move and it has had a big electricity flow flooding dynamic can force ,each call way can pass over 800mA continuous current ,peak current capacity of 1.5 ~OA ; At the same time it has lower output saturation pressure drop and the static electricity ,The built-in clamp a diode can release the perceptual load of reverse current impulse ,making it the drive relays ,dc motors ,stepping motor or switch power tube the useof safe and reliable .Follow tracing car system to common AT89C51, complementarywith relatively simple components and circuit design ,the smooth completion of follow under the premise of tracing function ,and fully considered appearance ,costs ,so most of the circuit car by manual welding is complete .In the design ,we never in a circuit increase redundant functions ,but retained various hardware interface and software subroutines interface to facilitate the expansion and development after.2. System hardware design2.1 motor driver module designIn making intelligent car, right wheel respectively with two speed and Torque basic identical dc motor driven deceleration. bolt-on trunk-lid spoiler Department to install a direction wheel, then through the I/O mouth to control tow dc slowing down Motor speed and steering can be achieved on the car to the left, turn right and straight line.Motor drive using a integrated electrical machine flooding dynamic core slice L 298 N. L298N is ST the production of the company, the internal containing four channel logical drive circuit, it is a kind of tow phase four phase motor drive, namely the special contains tow H bridge of high voltage large current commander bridge type drive,acceptance criteria TTL logic level signals, be driven 46V, 2A below the motor.2.2 tracing module designTracing module mainly composed by photoelectric sensor reflex, Photoconductive resistance of the resistance of the light with the surrounding environment changes, when the LTT white lines above, light emission strongly; The LTT black line above, light emission are relatively weak. So when photoconductive resistance in white line and black line above the elements will occur significantly changes, the resistance changes value after comparator can output high level. But this way environmental influences big, work is not stable. This article actual use is RPP220 type reflex sensors made tracing module.RPR220 is an integration of reflective photoelectric detector, transmitter is a gas infrared light emitting diode and the receiver is a high sensitivity silicon photoelectric triode flat. When the light emitting diode reflected back, triode conduction and output low level2.3 obstacle avoidance module designObstacle avoidance module mainly composed by infrared reflection sensor. Infrared reflection sensor by one infrared tubes and photoelectric diode constitute, infrared tubes out to meet the infrared object reflective sex strong after be turned back, by photoelectric diode receiving, causephotoelectric diode current increases, light born this change into voltage signal, it could be processor receives and processing.2.4 remote control module designThis module will launch end USES high sensitive HL-5000 type universal television remote control, the receiver using receive frequency for 38kH receiving head 1838, this module and the single chip computer interface is very convenient. In addition, for the red outside meet after harvest of plait code letter number the department tasseled set when shipped with project of AT89C52 single chip microcomputer external interruption. In order to recognize a complete key signal, must for each coding pulse width were measured with discriminate receives the pulse is o still 1. the microcontroller timer/counter to measuring pulse width. Timer/counter except points than can be set, from except 2 to except 2048, measurable pulse width can reach 500m/s. This paper set except point for 12, namely than 12 points frequency, because the external clock is about 12MH, clock cycle for 1s, so the timer/counter for 1 per timing once s.2.5 alarm module designAlarm module core chip 110 IC, can choose application in automobile, motorcycle, alarms, personal riot device, door magnetic alarm device and etc.3. System software designThis system software modular structure, he main program, initial anti-fuzzy procedures, interrupt subroutines, delay subroutines, buttons pronunciation subroutines, buttons scanning subroutines constitutes.3.1 tracing subroutines designTracing module is designed by the left right photoelectric sensor output terminal receiving monolithic respectively, p22 and p23 tube feet, then through the microcontroller programming, produce PWM control signal. Through L 298 control motor speed, let the car to move forward, left turn, turn right and stop driving purpose.3.2 avoid barrier of programmingObstacle avoidance module is designed by the infrared reflection sensor module around the output terminal receiving MCU respectively p20 and p21 tube feet, then through the microcontroller programming, produce PWM control signal, through L298 control motor speed, let the car to move forward, left turn, turn right and stop driving purpose.3.3 remote subroutines designRemote control module is designed by the infrared sensor 1838 an output terminal of the receiving MZUp32 tube feet, then use all-purpose remote control on the remote control, then letmicrocontroller decoding, produce PWM control signal, through L298 control motor speed, let the car move forward, left turn, turn right and stop driving purpose.4. Summar yAdopts singlechip, using photoelectric senor and infrared reflection senor was designed as a detection system, can realize automatic homing line to walk, automatic obstacle avoidance, alarm and remote control functions such as intelligent car. This design is the obvious advantage of simple circuit, reliability, low cost, and easy to function of further perfecting and expansion.From 基于单片机的智能小车通过研发实现了一种一光电传感器为敏感元件,以AT89C51单片机为控制核心的电机循迹小车的智能控,该系统还包括直流电机、L9110芯片和LM324比较器等。
AT89C51外文翻译毕业设计
AT89C51外文翻译毕业设计AT89C51 外文翻译DescriptionThe AT89C51is a low-power high-performance CMOS8-bit microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory PEROMThe device is manufactured using Atmels high density nonvolatile memory technology and is compatible with the industry standard MCS-51 instruction-set and pinout The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer By combining a versatile 8-bit CPUwith Flash on a monolithic chip the Atmel AT89C51is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applicationsFeaturesCompatible with MCS-51 Products4K Bytes of In-System Reprogrammable Flash Memory-En dura nee 1000 WriteErase CyclesFully Static Operation 0 Hz to 24 MHzThree-Level Program Memory Lock128 x 8-Bit Internal RAM32 Programmable IO LinesTwo 16-Bit TimerCountersSix Interrupt SourcesProgrammable Serial ChannelLow Power Idle and Power Down ModesThe AT89C51 provides the following standard features 4K bytes ofFlash128 bytes of RAM 32 IO lines two 16-bit timercounters a five vector 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 Modestops the CPUwhiletwo-level interrupt architecture a full duplex serial port on-chip allowing the RAM timercounters serial port and interrupt system to continue functioning The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware resetVCCSupply voltageGNDGroundPort 0Port 0 is an 8-bit open-drain bi-directional IO port As an output port each pin can sink eight TTL inputs When1s are written to port 0 pins thepins can be used as high-impedance inputsPort 0 may also be configured to be the multiplexed low-order addressdata bus during accesses to external program and data memory In this mode P0 has internal pullupsPort 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification External pullups are required during program verificationPort 1Port 1 is an 8-bit bi-directional IO port with internal pullupsThePort 1 output buffers can sinksource four TTL inputsWhen 1s are writtento Port 1 pins they are pulled high by the internal pullups and can be used as inputs As inputsPort 1 pins that are externally being pulled will source current IIL because of the internal pullupsPort 1 also receives thelow low-order address bytes during Flash programming and verificationPort 2Port 2 is an 8-bit bi-directional IO port with internal pullupsThePort 2 output buffers can sinksource four TTL inputsWhen 1s are written to Port 2 pins they are pulled high by the internal pullups and can be used as inputs As inputsPort 2 pins that are externally being pulled low will source current IIL because of the internal pullupsPort 2 emits the high-order address byte during fetches from externalprogram memoryand during accesses to external data memorythat use 16-bit addresses MOVX DPTR In this application it uses strong internal pullups when emitting 1s During accesses to external data memory that use 8-bit addresses MOVX RI Port 2 emits the contents of the P2 Special FunctionRegister Port 2 also receives the high-order address bits and somecontrol signals during Flash programming and verificationPort 3Port 3 is an 8-bit bi-directional IO port with internal pullups ThePort 3 output buffers can sinksource four TTL inputsWhen 1s are writtento Port 3 pins they are pulled high by the internal pullups and can be used as inputs As inputsPort 3 pins that are externally being pulled will source current IIL because of the pullups Port 3 also serves the functions oflow various special features of the AT89C51 as listed belowPort 3 also receives some control signals for Flash programming and verificationRSTReset input A high on this pin for two machine cycles while the oscillator is running resets the deviceALEPROGAddress 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 16 the oscillator frequency and may be used for external timing or clocking purposes Note however that one ALE pulse is skipped during each access to external DataMemoryIf 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 theALE-disable bit has no effect if the microcontroller is in external execution modePSENProgram Store Enable is the read strobe to external program memoryWhen 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 memoryEAVPPExternal Access Enable EA must be strapped to GND in order to enable the device to fetch code from external program memorylocations starting at 0000H up to FFFFHNotehowever that if lock bit 1 is programmed EA will beinternally latched on reset EA should be strapped to VCC for internal program executionsThis pin also receivesthe 12-volt programming enable voltage VPP during Flash programming forparts that require 12-volt VPPXTAL1Input to the inverting oscillator amplifier and input to the internalclock operating circuitXTAL2Output from the inverting oscillator amplifierOscillator CharacteristicsXTAL1and XTAL2are the input and output respectivelyof an invertingamplifier which can be configured for use as an on-chip oscillator as shown in Figure 1 Either a quartz crystal or ceramic resonator may be used To drive the device from an external clock source XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2There are no requirements on the duty cycle of the external clock signal since the input to the internal clocking circuitry is through a divide-by-two flip-flop but minimum and imum voltage high and low time specifications must be observedIdle ModeIn idle mode the CPU puts itself to sleep while all the on-chip peripherals remain active The modeis invoked by software The content of the on-chip RAMand all the special functions registers remain unchanged during this modeThe idle modecan be terminated by any enabled interrupt or by a hardware reset It should be noted that when idle is terminated by a hard ware reset the device normally resumes program execution from where it left off up to two machine cycles before the internal reset algorithm takes control On-chip hardware inhibits access to internal RAM in this event but access to the port pins is not inhibited To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset the instruction following the one that invokes Idle should not be one thatwrites to a port pin or to external memoryFigure 1 Oscillator ConnectionsNote C1 C2 30 pF ± 10 pF for Crystals 40 pF ± 10 pF for Ceramic ResonatorsFigure 2 External Clock Drive ConfigurationPower-down ModeIn the power-down modethe oscillator is stopped and the instructionthat invokes power-down is the last instruction executed The on-chip RAM and Special Function Registers retain their values until the power-down modeis terminated The only exit from power-down is a hardware reset Reset redefines the SFRs but does not change the on-chip RAM The reset should not be activated before VCCis restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilizeProgram Memory Lock BitsOnthe chip are three lock bits which can be left unprogrammed U or can be programmed P to obtain the additional features listed in the table belowWhen lock bit 1 is programmed the logic level at the EA pin is sampled and latched during reset If the device is powered up without a reset the latch initializes to a random value and holds that value until reset is activated It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properlyProgramming the FlashThe AT89C51 is normally shipped with the on-chip Flash memory array in the erased state that is contents FFH and ready to be programmedThe programming interface accepts either a high-voltage 12-volt or a low-voltage VCC program enable signal The low-voltage programming mode provides a convenient way to program the AT89C51inside the users system while the high-voltage programming mode is compatible with conventional thirdparty Flash or EPROM programmersThe AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled The respective top-side marking and device signature codes are listed in the following tableThe AT89C51 code memory array is programmed byte-by-byte in either programming modeTo program any non-blank byte in the on-chip Flash Memory the entire memory must be erased using the Chip Erase Mode ProgrammingAlgorithm Before programming the AT89C51 the address data and control signals should be set up according to the Flash programming mode table and Figures 3 and 4 To program the AT89C51 take the following steps1Input the desired memory location on the address lines2Input the appropriate data byte on the data lines3Activate the correct combination of control signals4Raise EAVPP to 12V for the high-voltage programming mode5Pulse ALEPROGonce to program a byte in the Flash array or the lock bits The byte-write cycle is self-timedand typically takes no more than 15 msRepeat steps 1 through 5 changing the address and data for the entire array or until the end of the object file is reachedData Polling The AT89C51 features Data Polling to indicate the end of a write cycle During a write cycle anattempted read of the last byte written will result in the complement of the written datum on PO7 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 initiatedReadyBusy The progress of byte programming can also be monitored by the RDYBSY output signal P34 is pulled low after ALE goes high during programming to indicate BUSY P34 is pulled high again when programming is done to indicate READYProgram 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 observing that their features are enabledChip Erase The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALEPROG low for 10 ms The code array is written with all 1s The chip erase operation must be executed before the code memory can be re-programmedReading the Signature Bytes The signature bytes are read by the same procedure as a normal verification of locations 030H 031H and 032Hexcept that P36 and P37 must be pulled to a logic low The values returned areas follows030H1EH indicates manufactured by Atmel031H 51H indicates 89C51032H FFH indicates 12V programming032H 05H indicates 5V programmingProgramming InterfaceEvery code byte in the Flash array can be written and the entire arraycan be erased by using the appropriate combination of control signals Thewrite operation cycle is selftimed and once initiated will automaticallytime itself to completionAll major programming vendors offer worldwide support for the Atmelmicrocontroller series Please contact your local programming vendor forthe appropriate software revisionFlash Programming and Verification Waveforms - High-voltage ModeVPP 12VFlash Programming and Verification Waveforms - Low-voltage Mode VPP5VFlash Programming and Verification Characteristics TA 0 °C to 70°C VCC 50 ± 10Absolute imum RatingsNOTICE Stresses beyond those listed under Absolute imum Ratings may cause permanent damage to the device This is a stress rating only and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of this specification is not implied Exposure to absolute imumrating conditions for extended periods may affect device reliabilityDC CharacteristicsTA - 40° C to 85 °C VCC 50V ± 20 unless otherwise notedNotes 1 Under steady state non-transient conditions IOL must be externally limited as followsimum IOL per port pin 10 mAimum IOL per 8-bit port Port 0 26 mAPorts 1 2 3 15 mAimum total IOL for all output pins 71 mAIf IOL exceeds the test condition VOL may exceed the related specification Pins are not guaranteed to sink current greater than the listed test conditions2 Minimum VCC for Power-down is 2VAC CharacteristicsUnder operating conditions load capacitance for Port 0 ALEPROG andPSEN 100 pF load capacitance for all other outputs 80 pFExternal Program and Data Memory CharacteristicsExternal Program Memory Read CycleExternal Data Memory Read CycleExternal Data Memory Write CycleExternal Clock Drive WaveformsExternal Clock DriveSerial Port Timing Shift Register Mode Test ConditionsVCC 50 V ± 20 Load Capacitance 80 pFShift Register Mode Timing WaveformsAC Testing InputOutput Waveforms 1Note 1 AC Inputs during testing are driven at VCC - 05V for a logic 1 and 045V for a logic 0 Timing measurements are made at VIH min for a logic 1 and VIL for a logic 0Float Waveforms 1Note 1 For timing purposes a port pin is no longer floating when a100mVchange from load voltage occurs A port pin begins to float when 100mV change from the loaded VOHVOL level occursAT89C51中文原文AT89C51是美国ATMEL公司生产的低电压高性能CMOS位单片机片内含4kbytes的可反复擦写的只读程序存储器PERO和128 bytes的随机存取数据存储器RAM器件采用ATMEL公司的高密度非易失性存储技术生产兼容标准MCS-51指令系统片内置通用8位中央处理器CPUS Flash存储单元功能强大AT89C51单片机可为您提供许多高性价比的应用场合可灵活应用于各种控制领域主要性能参数-与MCS-51产品指令系统完全兼容4k 字节可重擦写Flash 闪速存储器1000 次擦写周期全静态操作0Hz-24MHz三级加密程序存储器-128X 8字节内部RAM-32个可编程I /O口线2个16位定时/计数器6个中断源-可编程串行UART通道低功耗空闲和掉电模式功能特性概述AT89C5 1提供以下标准功能4k 字节Flash 闪速存储器128字节内部RAM32个I /O 口线两个16 位定时/计数器一个5 向量两级中断结构一个全双工串行通信口片内振荡器及时钟电路同时AT89C5何降至OHz的静态逻辑操作并支持两种软件可选的节电工作模式空闲方式停止CPU勺工作但允许RAM E时/计数器串行通信口及中断系统继续工作掉电方式保存RAM中的内容但振荡器停止工作并禁止其它所有部件工作直到下一个硬件复位引脚功能说明Vcc 电源电压-GND地P0 口P0 口是一组8 位漏极开路型双向I /O 口也即地址/数据总线复用口作为输出口用时每位能吸收电流的方式驱动8个TTL逻辑门电路对端口写1可作为高阻抗输入端用在访问外部数据存储器或程序存储器时这组口线分时转换地址低8 位和数据总线复用在访问期间激活内部上拉电阻在FIash 编程时P0 口接收指令字节而在程序校验时输出指令字节校验时要求外接上拉电阻• P1 口P1是一个带内部上拉电阻的8位双向I /O 口P1的输出缓冲级可驱动吸收或输出电流4个TTL逻辑门电路对端口写1 通过内部的上拉电阻把端口拉到高电平此时可作输入口作输入口使用时因为内部存在上拉电阻某个引脚被外部信号拉低时会输出一个电流IILFIash编程和程序校验期间P1接收低8位地址-P2 口P2是一个带有内部上拉电阻的8位双向I /O 口P2的输出缓冲级可驱动吸收或输出电流4个TTL逻辑门电路对端口写1通过内部的上拉电阻把端口拉到高电平此时可作输入口作输入口使用时因为内部存在上拉电阻某个引脚被外部信号拉低时会输出一个电流IIL 在访问外部程序存储器或16位地址的外部数据存储器例如执行MOVXDPT指令时P2 口送出高8位地址数据在访问8位地址的外部数据存储器如执行MOVXR脂令时P2 口线上的内容也即特殊功能寄存器SFR区中R2寄存器的内容在整个访问期间不改变Flash编程或校验时P2亦接收高位地址和其它控制信号-P3 口P3 口是一组带有内部上拉电阻的8位双向I /O 口P3 口输出缓冲级可驱动吸收或输出电流4个TTL逻辑门电路对P3 口写入1时它们被内部上拉电阻拉高并可作为输入端口作输入端时被外部拉低的P3 口将用上拉电阻输出电流IILP3 口除了作为一般的I /O口线外更重要的用途是它的第二功能如下表所示P3 口还接收一些用于Flash闪速存储器编程和程序校验的控制信号-RST复位输入当振荡器工作时RST引脚出现两个机器周期以上高电平将使单片机复位•ALEZ PROG当访问外部程序存储器或数据存储器时ALE地址锁存允许输出脉冲用于锁存地址的低8 位字节即使不访问外部存储器ALE 仍以时钟振荡频率的l /6 输出固定的正脉冲信号因此它可对外输出时钟或用于定时目的要注意的是每当访问外部数据存储器时将跳过一个ALE脉冲对Flash存储器编程期间该引脚还用于输入编程脉冲PROG如有必要可通过对特殊功能寄存器SFR区中的8EH单元的DO位置位可禁止ALE操作该位置位后只有一条MOV和MOV指令ALE才会被激活此外该引脚会被微弱拉高单片机执行外部程序时应设置ALE无效-PSEN程序储存允许PSEN俞出是外部程序存储器的读选通信号当AT89C51由外部程序存储器取指令或数据时每个机器周期两次P SENt效即输出两个脉冲在此期间当访问外部数据存储器这两次有效的P SEN信号不出现-EA/ VPP外部访问允许欲使CPU仅访问外部程序存储器地址为0000HFFFFHE端必须保持低电平接地需注意的是如果加密位LB1被编程复位时内部会锁存EA端状态如EA端为高电平接VCC端CPU则执行内部程序存储器中的指令Flash存储器编程时该引脚加上12V的编程允许电源Vpp当然这必须是该器件是使用12V编程电压Vpp-XTAL1振荡器反相放大器的及内部时钟发生器的输入端-XTAL2振荡器反相放大器的输出端时钟振荡器AT89C5l 中有一个用于构成内部振荡器的高增益反相放大器引脚XTAL1 和XTAL2 分别是该放大器的输入端和输出端这个放大器与作为反馈元件的片外石英晶体或陶瓷谐振器一起构成自激振荡器振荡电路参见图石英晶5 外接体或陶瓷谐振器及电容C1C2接在放大器的反馈回路中构成并联振荡电路对外接电容C1C2虽然没有十分严格的要求但电容容量的大小会轻微影响振荡频率的高低振荡器工作的稳定性起振的难易程序及温度稳定性如果使用石英晶体我们推荐电容使用30pF± 10pF而如使用陶瓷谐振器建议选择40pF± 10F用户也可以采用外部时钟采用外部时钟的电路如图5 右图所示这种情况下外部时钟脉冲接到XTAL1端即内部时钟发生器的输入端XTAL2则悬空由于外部时钟信号是通过一个2 分频触发器后作为内部时钟信号的所以对外部时钟信号的占空比没有特殊要求但最小高电平持续时间和最大的低电平持续时间应符合产品技术条件的要求空闲节电模式AT89C51 有两种可用软件编程的省电模式它们是空闲模式和掉电工作模式这两种方式是控制专用寄存器PCO即电源控制寄存器中的PDPCON和IDLPCON0位来实现的PD 是掉电模式当PD 1 时激活掉电工作模式单片机进入掉电工作状态IDL是空闲等待方式当IDL 1激活空闲工作模式单片机进入睡眠状态如需同时进入两种工作模式即PD和IDL同时为1则先激活掉电模式在空闲工作模式状态CPU保持睡眠状态而所有片内的外设仍保持激活状态这种方式由软件产生此时片内RAM和所有特殊功能寄存器的内容保持不变空闲模式可由任何允许的中断请求或硬件复位终止终止空闲工作模式的方法有两种其一是任何一条被允许中断的事件被激活IDL PCON0被硬件清除即刻终止空闲工作模式程序会首先响应中断进入中断服务程序执行完中断服务程序并紧随RETI 中断返回指令后下一条要执行的指令就是使单片机进入空闲模式那条指令后面的一条指令其二是通过硬件复位也可将空闲工作模式终止需要注意的是当由硬件复位来终止空闲工作模式时CPU通常是从激活空闲模式那条指令的下一条指令开始继续执行程序的要完成内部复位操作硬件复位脉冲要保持两个机器周期 钟周期有效在这种情况下内部禁止 CPI 访问片内RA 顾允许访问其它端口为了避 免可能对端口产生意外写入激活空闲模式的那条指令后一条指令不应是一条对 端口或外部存储器的写入指令掉电模式在掉电模式下振荡器停止工作进入掉电模式的指令是最后一条被执行的指 令片内RAM和特殊功能寄存器的内容在终止掉电模式前被冻结退出掉电模式的唯一方法是硬件复位复位后将重新定义全部特殊功能寄存器但不改变 内容在Vcc 恢复到正常工作电平前复位应无效且必须保持一定时间以使振荡器 重启动并稳定工作空闲和掉电模式外部引脚状态程序存储器的加密 AT89C51可使用对芯片上的3个加密位LB1LB2LB3进行编程P 或不编程U来得到如下表所示的功能加密位保护功能表注表中的 U 表示未编程 P 表示编程当加密位LB1被编程时在复位期间EA 端的逻辑电平被采样并锁存如果单片 机上电后一直没有复位则锁存起的初始值是一个随机数且这个随机数会一直保 存到真正复位为止为使单片机能正常工作被锁存的 EA 电平值必须与该引脚当 前的逻辑电平一致此外加密位只能通过整片擦除的方法清除Flash 闪速存储器的编程AT89C51单片机内部有4k 字节的Flash PERO 这个Flash 存储阵列出厂时已处于擦除状态即所有存储单元的内容均为 FFH 用户随时可对其进行编程编程 接口可接收高电压12V 或低电压Vcc 的允许编程信号低电压编程模式适合于用户 在线编程系统而高电压编程模式可与通用 EP ROMS 程器兼容AT89C51 单片机中有些属于低电压编程方式而有些则是高电压编程方式用 户可从芯片上的型号和读取芯片内的名字节获得该信息见下表24 个时RAM 中的AT89C51 的程序存储器阵列是采用字节写入方式编程的每次写入一个字节要对整个芯片内的P EROM程序存储器写入一个非空字节必须使用片擦除的方式将整个存储器的内容清除编程方法编程前须按表6和图6所示设置好地址数据及控制信号编程单元的地址加在P1 口和P2 口的P20— P2311位地址范围为OOOOHkOFFFH数据从P0 口输入引脚P26COmP37勺电平设置见表6PSEF为低电平RST保持高电平EAZVpp引脚是编程电源的输入端按要求加上编程电压ALEZ PROG引脚输入编程脉冲负脉冲编程时可采用4—20MHZ勺时钟振荡器AT89C51编程方法如下1 .在地址线上加上要编程单元的地址信号2.在数据线上加上要写入勺数据字节3.激活相应勺控制信号4.在高电压编程方式时将EA/Vpp端加上12V编程电压5.每对Flash 存储阵列写入一个字节或每写入一个程序加密位加上一个ALE/ PRO编程脉冲改变编程单元的地址和写入的数据重复15步骤直到全部文件编程结束每个字节写入周期是自身定时的通常约为15ms数据查询AT89C51 单片机用数据查询方式来检测一个写周期是否结束在一个写周期中如需读取最后写入的那个字节则读出的数据的最高位P07是原来写入字节最高位勺反码写周期完成后有效勺数据就会出现在所有输出端上此时可进入下一个字节勺写周期写周期开始后可在任意时刻进行数据查询Ready/ Busy字节编程的进度可通过RD* BSY俞出信号监测编程期间ALE变为高电平H后P34RDY/ BSY端电平被拉低表示正在编程状态忙状态编程完成后P34变为高电平表示准备就绪状态-程序校验如果加密位LB1LB2没有进行编程则代码数据可通过地址和数据线读回原编写的数据采用下图的电路程序存储器的地址由P1 和P2 口的P20—P23输入数据由P0 口读出P26COmP37l勺控制信号见表6PSEN保持低电平ALEEA和RST保持高电平校验时P0 口须接上10k左右的上拉电阻表6 Flash 存储器编程真值表注片擦除操作时要求PR0咏冲宽度为10ms图6 校验电路加密位不可直接校验加密位的校验可通过对存储器的校验和写入状态来验Flash 存储器编程和校验时序图7 高电压编程和图8 低电压编程Flash 存储器编程和校验的波形时序高电压编程VPP 12VFlash 存储器编程和校验的波形时序低电压编程VPP 5V•芯片擦除利用控制信号的正确组合表6并保持ALEZPROSI脚10mS的低电平脉冲宽度即可将PEROM阵列4k 字节和三个加密位整片擦除代码阵列在片擦除操作中将任何非空单元写入1 这步骤需再编程之前进行•读片内签名字节AT89C51单片机内有3个签名字节地址为030H031H和032H用于声明该器件的厂商型号和编程电压读签名字节的过程和单元030H031H 及032H的正常校验相仿只com电平返回值意义如下030H 1EH声明产品由ATMEI公司制造031H 51H声明为AT89C51单片机032H FFH声明为12V编程电压032H 05H声明为5V编程电压编程接口采用控制信号的正确组合可对Flash 闪速存储阵列中的每一代码字节进行写入和存储器的整片擦除写操作周期是自身定时的初始化后它将自动定时到操作完成Flash 编程和校验特性TA 0 r to 70 r Vcc 50V ± 10注仅用于12V编程模式-AT89C5啲极限工作参数极限参数直流特性TA -40 r to 85 r Vcc 50V± 20unless otherwise noted注1 在稳定状态无输出条件下IOL 有以下限制每一引脚最大IOL10mA每一8 位端口P0 口26mAP1P和P315mA全部输出引脚最大IOL71mA掉电模式的最小Vcc 为2V交流特性在以下条件下P0 口ALEZPSENPSE的负载电容为100pF其他输出口负载电容为80pF外部程序存储器读周期外部数据存储器读周期外部时钟驱动波形外部时钟驱动特性串行口时序移位寄存器测试条件Vcc 50V± 20负载容抗80pF移位寄存器时序波形注AC输入测试在Vcc-com 逻辑0时序测试在VIH为最小值和VIL为最大值时测量注在浮空状态下端口引脚在负载出现100mV电压变化即为浮空也即当一个端口电压从VOH到VOL变化时出现100mV电压时为浮空状态1。
AT89C51系列用户指南-外文翻译
AT89C51 Family User’s Guide1. Features• Compatible with MCS-51™ Products• 4K Bytes of In-System Reprogrammable Flash Memory–Endurance: 1,000 Write/Erase Cycles• Fully Static Operation: 0 Hz to 24 MHz• Three-level Program Memory Lock• 128 x 8-bit Internal RAM• 32 Programmable I/O Lines• Two 16-bit Timer/Counters• Six Interrupt Sources• Programmable Serial Channel• Low-power Idle and Power-down Modes2. DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin-out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.3. Pin Configurations4. Lock DiagramThe AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial 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 system to continue functioning. ThePower-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.5. Pin DescriptionVCC: 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 low-order 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 pull-ups. The Port 1 output buffers can sink/source 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 pull-ups. 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 external data memory that uses 16-bit addresses (MOVX @ DPTR). Inthis 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 pull-ups. The Port 3 output buffers can sink/source 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. Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification. 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 during each access to external Data Memory. 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 isweakly 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.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. EA ________ should be strapped to V C C for internal program executions. This pin also receives the 12-volt programming enable voltage (V PP ) during Flash programming, for parts that require 12-volt V PP .XTAL1:Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2:Output from the inverting oscillator amplifier.6. Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Oscillator ConnectionsNote: C1, C2 = 30 pF±10 pF for Crystals= 40 pF±10 pF for Ceramic ResonatorsExternal Clock Drive Configuration7. Idle ModeIn idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all thespecial functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.8. Power-down ModeIn the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function 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 but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize. 9. Programming the FlashThe AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal. The low-voltage programming mode provides a convenient way to program the AT89C51 inside the user’s system, while the high-voltage programming mode is compatible with conventional third party Flash or EPROM programmers. The AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled. The respective top-side marking and device signature codes are listed in the following table.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.10. Flash Programming and Verification Characterist icsTA = 0°C to 70°C, VCC = 5.0±10%11. DC CharacteristicsTA = -40°C to 85°C, VCC = 5.0V±20% (unless otherwise noted)Notes:1. under steady state (non-transient) conditions, IOL must be externally limited as follows:Maximum IOL per port pin: 10 mAMaximum IOL per 8-bit port: Port 0: 26 mAPorts 1, 2, 3: 15 mAMaximum total IOL for all output pins: 71 mAIf IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test conditions.2.Minimum VCC for Power-down is 2V.12. External Program and Data Memory Characteris tics13. External Program Memory Read Cycle14. External Data Memory Read Cycle15. External Data Memory Write Cycle16. External Clock Drive Waveforms17. External Clock Drive18. Serial Port Timing: Shift Register Mode Test Co nditions(VCC = 5.0 V 20%; Load Capacitance = 80 pF)19. Shift Register Mode Timing Waveforms20. Ring Information21. Packaging InformationAT89C51系列用户指南1 主要性能参数MCS-51 产品指令系统完全兼容4k 字节可重擦写 Flash 闪速存储器--周期:1000次擦/写全静态操作:0Hz-24MHz三级加密程序存储器128×8 字节内部 RAM32个可编程 I/O 口线2个 16 位定时/计数器6个中断源可程串行UART 通道低功耗空闲和掉电模式2 功能特性概述AT89C51 是美国 ATMEL 公司生产的低电压,高性能 CMOS8 位单片机,片内含 4k bytes 的可反复擦写的只读程序存储器(PEROM)和 128 bytes 的随机存取数据存储器(RAM),器件采用 ATMEL 公司的高密度、非易失性存储技术生产,兼容标准 MCS-51 指令系统,片内置通用 8 位中央处理器(CPU)和 Flash 存储单元,功能强大 AT89C51 单片机可为您提供许多高性价比的应用场合,可灵活应用于各种控制领域。
AT89C51的介绍外文翻译1
AT89C51的介绍描述:AT89C51是一个低电压,高性能CMOS8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。
和128字节的存取数据存储器(RAM),这种器件采用ATMEL公司的高密度、不容易丢失存储技术生产,并且能够与MCS-51系列的单片机兼容。
片内含有8位中央处理器和闪烁存储单元,功能强大AT89C51单片机可为您提供许多高性价比的应用场合,可灵活应用于各种控制领域。
主要性能参数:·与MCS-51产品指令系统完全兼容·4K字节可重擦写Flash闪速存储器·1000次擦写周期·数据保留时间:10年·全静态操作:0Hz—24MHz·三级加密程序存储器·128×8字节内部RAM·32个可编程I/O口线·2个16位定时/计数器·6个中断源·可编程串行UART通道·低功耗空闲和掉电模式·片内振荡器和时钟电路·全双工UART串行中断口线·双数据寄存器指针功能特性概述:AT89C51提供以下标准功能:4K字节Flash闪速存储器,128字节内部RAM,32个I/O口线,两个16位定时/计数器,一个5向量两级中断结构,一个全双工串行通信口,片内振荡器及时钟电路。
同时,AT89C51可降至0Hz的静态逻辑操作,并支持两种软件可选的节电工作模式。
空闲方式停止CPU的工作,但允许RAM,定时/计数器。
串行通信口及中断系统继续工作。
掉电方式保存RAM中的内容,但振荡器停止工作并禁止其它所有部件工作直到下一个硬件复位。
AT89C51单片机是一个行业标准架构,被广泛接受和应用,并作为一种开发工具。
有许多工业供应商,他们供应这种控制器或把这种控制器集成到某种类型的系统芯片的结构。
医学研究理事会和高级微电子研究所都选择这个设备,但他们论证的是两种截然不同固化工艺。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
AT89C51外文翻译DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory (PEROM). The device is manufactured using Atmel’s high density nonvolatile memory technology and is compatible with the industry standard MCS-51™ instruction-set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.Features• Compatible with MCS-51™ Products• 4K Bytes of In-System Reprogrammable Flash Memory– Endurance: 1,000 Write/Erase Cycles• Fully Static Operation: 0 Hz to 24 MHz• Three-Level Program Memory Lock• 128 x 8-Bit Internal RAM• 32 Programmable I/O Lines• Two 16-Bit Timer/Counters• Six Interrupt Sources• Programmable Serial Channel• Low Power Idle and Power Down ModesThe AT89C51 provides the following standard features: 4K bytes of Flash,128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial 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 system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.VCCSupply voltage.GNDGround.Port 0Port 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 low-order address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pullups are required during program verification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups 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 pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 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 pullups 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 pullups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @DPTR). In this application, it uses strong internal pullups when emitting 1s. During accesses to external data memory that use 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 3Port 3 is an 8-bit bi-directional I/O port with internal pullups. The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they arepulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification. RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress 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 during each access to external Data Memory.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.PSENProgram 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.EA/VPPExternal 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 toFFFFH.Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA 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.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Idle ModeIn idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.Figure 1. Oscillator ConnectionsNote: C1, C2 = 30 pF ± 10 pF for Crystals= 40 pF ± 10 pF for Ceramic ResonatorsFigure 2. External Clock Drive ConfigurationPower-down ModeIn the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function 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 but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset.If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.Programming the FlashThe AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH)and ready to be programmed. The programming interface accepts either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal. The low-voltage programming mode provides a convenient way to program the AT89C51 inside t he user’s system, while the high-voltage programming mode is compatible with conventional thirdparty Flash or EPROM programmers.The AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled. The respective top-side marking and device signature codes are listed in the following table.The AT89C51 code memory array is programmed byte-by-byte in either programming mode. To program any non-blank byte in the on-chip Flash Memory, the entire memory must be erased using the Chip Erase Mode. Programming Algorithm: Before programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table and Figures 3 and 4. To program the AT89C51, take the following steps.1. Input the desired memory location on the address lines.2. Input the appropriate data byte on the data lines.3. Activate the correct combination of control signals.4. Raise EA/VPP to 12V for the high-voltage programming mode.5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write cycle is self-timedand typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, anattempted 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 observing that their features are enabled.Chip Erase: The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all ―1‖s. The chip erase operation must be executed before the code memory can be re-programmed.Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows.(030H) = 1EH indicates manufactured by Atmel(031H) = 51H indicates 89C51(032H) = FFH indicates 12V programming(032H) = 05H indicates 5V programmingProgramming InterfaceEvery code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is selftimed and once initiated, will automatically time itself to completion.All major programming vendors offer worldwide support for the Atmelmicrocontroller series. Please contact your local programming vendor for the appropriate software revision.Flash Programming and Verification Waveforms - High-voltage Mode (VPP = 12V)Flash Programming and Verification Waveforms - Low-voltage Mode (VPP = 5V)Flash Programming and Verification Characteristics TA = 0°C to 70°C, VCC = 5.0 ±10%Absolute Maximum Ratings**NOTICE: Str esses beyond those listed under ―Absolute Maximum Ratings‖ may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.DC CharacteristicsTA = -40°C to 85°C, VCC = 5.0V ±20% (unless otherwise noted)Notes: 1. Under steady state (non-transient) conditions, IOL must be externally limited as follows:Maximum IOL per port pin: 10 mAMaximum IOL per 8-bit port: Port 0: 26 mAPorts 1, 2, 3: 15 mAMaximum total IOL for all output pins: 71 mAIf IOL exceeds the test condition, VOL may exceed the related specification. Pins arenot guaranteed to sink current greater than the listed test conditions.2. Minimum VCC for Power-down is 2V.AC CharacteristicsUnder operating conditions, load capacitance for Port 0, ALE/PROG, and PSEN = 100 pF; load capacitance for all other outputs = 80 pF.External Program and Data Memory CharacteristicsExternal Program Memory Read CycleExternal Data Memory Read CycleExternal Data Memory Write CycleExternal Clock Drive WaveformsExternal Clock DriveSerial Port Timing: Shift Register Mode Test Conditions (VCC = 5.0 V ±20%; Load Capacitance = 80 pF)Shift Register Mode Timing WaveformsAC Testing Input/Output Waveforms(1)Note: 1. AC Inputs during testing are driven at VCC - 0.5V for a logic 1 and 0.45V for a logic 0. Timing measurements are made at VIH min. for a logic 1 and VIL max. for a logic 0.Float Waveforms(1)Note: 1. For timing purposes, a port pin is no longer floating when a 100mV change from load voltage occurs. A port pin begins to float when 100mV change from the loaded VOH/VOL level occurs.AT89C51中文原文AT89C51是美国ATMEL公司生产的低电压,高性能CMOS8位单片机,片内含4k bytes的可反复擦写的只读程序存储器(PEROM)和128 bytes的随机存取数据存储器(RAM),器件采用ATMEL公司的高密度、非易失性存储技术生产,兼容标准MCS-51指令系统,片内置通用8位中央处理器(CPU)和Flash存储单元,功能强大AT89C51单片机可为您提供许多高性价比的应用场合,可灵活应用于各种控制领域。