1、英文原文 : 80C51 8051 single-chip micro-computer, referred to as microcontrollers, there are known as micro-controller, a micro-computer re - To branch. SCM is developed in the mid 70s a large-scale integrated circuit chip, a CPU, RAM, ROM, I / O interfaces and interrupt system on the same silicon devic
2、e. Since the 80s, Microcontroller rapid development, all kinds of new products are constantly emerging, there have been many high-performance of new models now become the field of factory automation and control of the pillar industries. Pin Function: MCS-51 is a standard 40-pin DIP IC chip, pin dist
3、ribution - microcontroller pin diagram please refer to: P0.0 P0.7 P0 port 8-bit bidirectional port lines (in the pin 39 to No. 32 terminal). P1.0 P1.7 P1 port 8-bit bidirectional port line (pin 1 in the No. 8 terminal). P2.0 P2.7 P2 port 8-bit bidirectional port lines (in the pin terminal 21 28). P3
4、.0 P3.7 P3 port 8-bit bidirectional port lines (in the pin terminal 10 17). This four I / O port has not exactly the same function, we can get to learn, and other books though, but written in too deep, difficult to understand for beginners, here are according to my own expression to write the I beli
5、eve that you can understand. P0 port has three functions: 1, external expansion memory, as the data bus (Figure 1 in D0 D7 of data bus interface) 2, external expansion memory, as the address bus (Figure 1 in A0 A7 to address bus interface) 3, is not extended, it can do a general I / O to use, but wi
6、thin the supreme pull-up resistor, as an input or output should be connected to an external pull-up resistor. P1 port Zhizuo I / O port to use: its internal pull-up resistor. P2 port has two functions: 1,An extended external memory when used as an address bus 2, doing a general I / O port used, and
7、their internal pull-up resistor; P3 port has two functions: As well as I / O using the external (the internal pull-up resistor), there are some special features, from a special register to set the specific features please refer to our explanation behind the pin. Internal EPROM of the microcontroller
8、 chip (for example, 8751), for the writing process required to provide specialized programming and programming pulse power, these signals are also provided in the form from the signal pin, and Namely: programming pulse: 30 feet (ALE / PROG) Programming voltage (25V): 31 feet (EA / Vpp) In introducin
9、g the four I / O port referred to a pull-up resistor Then, pull-up resistor is what Dongdong do? What role does he play? Said the resistance that is of course, is a resistor, when as an input, the pull-up resistor pulled its potential, if the input is low you can provide a current source; Therefore,
10、 if the P0 port as long as the input, in the high impedance state, only an external pull-up resistor to be effective. ALE / PROG address latch control signal: in a system is extended, ALE is used to control the P0 port output low 8-bit address latch latch get together in order to achieve low address
11、 and data segregation. (In the back on the expansion of the curriculum, we will see the 8051 expansion of EEPROM circuit, the ALE and the 74LS373 in Figure G-latches connected to the external CPU to access when the time to lock the address low address, the P0 port output. ALE may be high may also be
12、 low, when the ALE is high, allowing address latch signal when accessing external memory, ALE signals a negative transition (from positive to negative) P0 port on the lower eight address signals into the latch. when ALE is low, when, P0 port on the content and the output latch line. on the latch, an
13、d we will be introduced later. In the absence of access to external memory during the period, ALE 1 / 6 oscillator frequency output cycle (ie, frequency of 6 points), when access to external memory to 1 / 12 oscillator cycle, the output (12 min frequency). From here we can see that when the system d
14、oes not extend when the ALE will be 1 / 6 cycle, fixed frequency oscillator output, so can be used as an external clock, or the use of an external timing pulse. PORG pulse input for the program: In the fifth lesson MCUs internal structure and composition, we know that in 8051 within the a 4KB or 8KB
15、 of program memory (ROM), ROMs role is to be used to store user needs implementation of the program, then we are into how to write good programs into this ROM in it? Is actually programmed into the pulse input can be written, this pulse input port is PROG. PSEN external program memory read strobe: I
16、n reading an external ROM, PSEN low effective, in order to achieve an external ROM module read. 1, the internal ROM reading, PSEN is not action; 2, external ROM reading at each machine cycle will move twice; 3, external RAM read, the two PSEN pulse is skipped will not be output; 4, external ROM, and
17、 ROM-foot-phase OE. See Figure 2 - (8051 extension 2KB EEPROM circuit in Figure PSEN and expansion ROM in the OE pin-phase) EA / VPP access and sequence memory control signals 1, then high time: CPU reads the internal program memory (ROM) Expansion of the external ROM: When reading the internal prog
18、ram memory than 0FFFH (8051) 1FFFH (8052) automatically reads the external ROM. 2, then low when: CPU to read external program memory (ROM). In the previous study, we are aware, there is no internal ROM MCU 8031, then 8031 microcontroller in the application, this pin is a low level of direct. 3,8751
19、Shaoxie internal EPROM, to make use of this pin input voltage of 21V for Shao Xie. RST Reset signal: when the input signal continuously high for more than two machine cycles when it is effective to complete the MCU reset initialization, when the reset program counter PC = 0000H, ie, after reset from
20、 the program memory of the 0000H unit to read the first script. External crystal oscillator pins XTAL1 and XTAL2. When using the chip internal clock, this two-pin for external quartz crystal and fine-tuning capacitor; when using an external clock, used to access an external clock pulse signal. VCC:
21、Power Supply +5 V input VSS: GND Ground. AVR and the pic are 8051 different structures with 8-bit microcontrollers, because structure is different, so assembly instructions are different, but distinct from the use of CISC instruction set of the 8051, they are RISC instruction set, and only a few doz
22、en instructions, most instructions are single instruction cycle instruction, so in the same crystal frequency, faster than the 8051. Another PIC 8-bit microcontroller in previous years, is the worlds largest MCU shipments, followed by Freescale microcontroller. ARM is actually 32-bit microcontroller
23、, its internal resources (registers and peripheral functions) than in 8051 and PIC, AVR should be a lot more, with the computers CPU chip is very close. Commonly used in mobile phones, routers and so on. DSP is actually a special kind of microcontroller, which from 8-32 are available here. It is spe
24、cifically used to calculate the digital signals. Operation in some formulas, its fastest computers than the current home of the CPU even faster. For example, the general 32-bit DSP instruction cycle in an op-End a 32-digit x 32-digit product coupled with a 32-digit. Applied to certain pairs of real-time processing requirements of the higher places