【文章內(nèi)容簡介】
3 P1 mouth: P1 mouth is an 8bit twoway I/O port. ~ mouth pin the internal resistance provides. and requirements on the external pullup Infrared Remote And Chips Are Introduced 5 resistors. and also separately as piece inside precision simulation Diagram b AT89C2051 foot figure parator with input (AIN0) and reversedphase input (AIN1). Output buffer can absorb the P1 mouth 20mA current and can directly LED display driver. When P1 mouth pin into a 1, can make its input. When the pin ~ as input and external down, they will be for the internal resistance and flow current (IIL). In flash P1 mouth during the procedure and program code data receiving calibration. 4 P3: the ~ P3, is the internal resistance with seven twoway I / 0 lead. for fixed inputs piece inside the parator output signal and it as a general I/O foot and inaccessible. P3 mouth buffer can absorb 20mA current. When P3 mouth pin into 1, they are the internal resistance can push and input. As input, and the low external P3 mouth pin pullup resistors and will use current (IIL) outflow. P3 mouth still used to implement the various functions, such as AT89C2051 shown in table 1. P3 mouth still receive some for flash memory programming and calibration of program control signals. P3 mouth function as is shown in table 1. Table 1 P3 mouth pin Function RXD(Serial input) TXD(Serial output port) INT0(External interruption 0) INT1(External interruption 1) TO(The timer 0 external input) T1(The timer 1 external input) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 89C2051 RST/VPP (RXD) (TXD) XTAL2 XTAL1 (INT0) (INT1) (T0) (T1) GND VCC (AIN1) (AIN0) Infrared Remote And Chips Are Introduced 6 5 RST: reset input. RST once, all into high level I/O foot will reset to 1. When the oscillator is running, continuous gives RST pin two machine cycle of high level can finish reset. Each machine cycle to 12 oscillator or clock cycle. 6 XTAL1: as the oscillator amplifier input and inverse internal clock generator input. 7. XTAL2: as the oscillator reversedphase the amplifier39。s output. 3) the software and hardware constraints. AT89C2051 Due to the foot of the chip AT89C2051, no set limits of external storage interface, so, for external memory read/write instructions as MOVX etc. Due to 2KB ROM, so, the space to jump instruction should pay attention to the destination address range (transfer 000H 7FFH), beyond the range of addresses, will not meet wrong results. The scope of data storage is 00H (7FH when stack manipulation), also should be noticed. The input signal is simulated by the original foot into the microcontroller, so the original foot Unable to external use. Simulation parator can pare two simulation, if the size of the voltage external A D/A converter and its output as A parator analog input, and by simulating the parator another input voltage to be measured, through the introduction of the software method can realize the A/D conversion. 4 the Flash memory AT89C2051) Provide a 2KB of singlechip AT89C2051 in Flash memory chips, which allows the online program to modify or use special programming programming. A) . Flash memory encryption AT89C2051 SCM has 2 encryption, can programming (P) or programming (U) to obtain different encryption functionality. Encryption functionality table as shown in table 11. Table 11 LB1 LB2 Encryption functionality U U No encryption functionality P U Prohibit to flash to programming P P Prohibit to flash to programming, Also banned program Encrypt a content erased only through chips to erase operation. B) . Flash memory programming and procedures Infrared Remote And Chips Are Introduced 7 (1) the piece inside chip AT89C2051 Flash memory programming model as shown in table 12. Table 12 AT89C2051 microcontroller programming model Mode RESET Write code data 12V L H H H Read code data H H L L H H Write code data LB1 Write code data LB2 12V H H H H 12V H H L L Chip erased 12V H L L L Read the signal bytes H H L L L L . Note: (1) the counters RESET at an EPROM