首页 stc89c52单片机介绍(Introduction of STC89C52 SCM)

stc89c52单片机介绍(Introduction of STC89C52 SCM)

举报
开通vip

stc89c52单片机介绍(Introduction of STC89C52 SCM)stc89c52单片机介绍(Introduction of STC89C52 SCM) stc89c52单片机介绍(Introduction of STC89C52 SCM) ======================================== page first ======================================== STC89C52 SCM introduction: A single chip computer is a complete computer s...

stc89c52单片机介绍(Introduction of STC89C52 SCM)
stc89c52单片机介绍(Introduction of STC89C52 SCM) stc89c52单片机介绍(Introduction of STC89C52 SCM) ======================================== page first ======================================== STC89C52 SCM introduction: A single chip computer is a complete computer system that is integrated into a single chip. Despite most of his features Integrated on a small chip, but it has most of the components needed for a full computer: CPU , Memory, internal and external bus system, most will have the core. At the same time, such as communication interfaces, Timer, real-time clock and other peripheral equipment. And now the most powerful single chip microcomputer system can even sound, map Images, networks, and complex input and output systems are integrated into a single chip. Microcontrollers are also known as microcontrollers Microcontroler ) because it was first used in industrial control Realm. SCM by chip only CPU Special processors have evolved. The earliest design concept was through Pass a lot of peripherals and CPU Integrated into a single chip to make the computer system smaller and easier to integrate Into complex and demanding control equipment. INTEL The Z80 It was the earliest thought The processor that you want to design, and then, the development of the microcontroller and the special processor will go their separate ways. Early SCM is Eight Or Four Bit. One of the most successful is... INTEL The Eight thousand and thirty-one Because Jane It's reliable and has good performance. It has received a great deal of praise. Thereafter Eight thousand and thirty-one Developed on the MCS51 Serial list Sheet machine system. The single-chip microcomputer system based on this system is still widely used until now. With the industrial control collar The increase in domain requirements began to appear Sixteen Bit microcontroller, but because the cost performance is not ideal, has not been widely Applications. Ninety After the 1980s, with the development of consumer electronic products, SCM technology has been greatly improved. along with INTEL i960 A series, especially later ARM A wide range of applications, Thirty-two Bit microcontroller generation Sixteen Bit microcontroller high-end status, and into the mainstream market. Traditional Eight Bit MCU performance is also Has been improved rapidly, compared with the processing capacity Eighty It has increased several hundred times in the 1980s. At present, high-end Thirty-two Bit monolithic The main frequency of the machine has exceeded 300MHz The performance catching. Ninety A dedicated processor in the mid-1990s, and a plain model The factory price falls to One Dollars, the most high-end models are only Ten Dollar. Contemporary SCM system has not Then only the bare metal environment in the development and use of special embedded operating system is widely used in the full range Scm. In the palm computer and mobile phone core processing high-end microcontroller can even be used directly Appropriative Windows and Linux Operating system. SCM is more suitable for embedded systems than dedicated processors, so it has the most applications. In fact, SCM is the largest number of computers in the world. Almost every piece of electronics used in modern human life And mechanical products will be integrated with single-chip microcomputer. Mobile phones, telephones, calculators, home appliances, electronic toys, Handheld computers and computer accessories such as the mouse are available 1-2 Mcu. And there are a few in the personal computer Many SCM work. The car is usually equipped Forty Multiple single-chip microcomputer, complex industrial control system ======================================== page second ======================================== There may even be hundreds of microcontrollers working at the same time! The number of SCM is not only far exceeded PC Machines and other meters The calculations are even more numerous than the number of human beings. Single chip microcomputer is also called a single chip microcontroller , It is not a chip that performs some logical function , It's a plan The computer system is integrated into a single chip. To sum up: a chip becomes a computer. Its volume Small, light quality, cheap price, for learning, application and development provides convenient conditions. At the same time, learn to use SCM is the best choice to understand the principles and structure of the computer. SCM internal and computer functions similar modules, such as CPU Memory, parallel bus, etc. A memory device that has the same function as a hard disk, and differs from each other in terms of its performance relative to our home appliances The brain is weak, but the price is low, usually not more than Ten Yuan can ...... Use it to make some control appliances A class of work that is not very complicated is enough. We now use the automatic drum washing machine, smoke hood, VCD And so on inside the appliance, you can see its shadow! It is mainly used as the core part of the control part. It is an on-line real-time control computer, on-line is field control, need is stronger Anti-interference ability, low cost, and this is also with offline computers (such as home) PC Main area Don't. SCM is dependent on procedures, and can be modified. Realize different functions through different programs, especially It's a special, unique feature, something else that needs a lot of effort to do, and some of them It's hard to do it with great effort. A not very complex function, if used in the United States Fifty Developed in the 1990s Seventy-four Series, or Sixty Age CD4000 The series of pure hardware to fix, the circuit must be a big PCB Board! But if you use the United States Seventy The success of the series of single-chip microcomputer in the market, the results will be A world of difference~ Just because of the single chip microcomputer, you can achieve high intelligence, high efficiency and high efficiency through the program you write Reliability! Because SCM is sensitive to cost, so the current dominant software is the lowest level assembly language Language, it is in addition to the binary machine code above the lowest level language, since it is so low-level, why use? ? Many advanced languages have reached the level of visual programming, why not? The reason is simple, SCM is not the same as the home computer CPU And there is no mass storage device like hard disks. A visual high-level language applet, which even if only a button, it will reach dozens K The Dimension! For home use PC The hard disk is nothing, but for the microcontroller is not acceptable. single Using the machine in terms of hardware resources to be very high for the rate, therefore assemblyalthoughprimitive actually make a lot Use. The same reason, if the giant computer operating systems and applications to the home PC come up Run, home PC You can't stand it. It can be said that in twentieth Century, the "three electric" times, namely the electrical age, the electronic age, and now Access to the computer age. However, this kind of computer usually refers to personal computers PC Machine. It comes from the Lord Machine, keyboard, display and so on. There's another type of computer that most people don't know very well. This calculation A machine is a single chip microcomputer (also called a microcontroller) that gives intelligence to a wide range of machines. As the name suggests, this kind of computer ======================================== page third ======================================== The minimal system can be easily operated and controlled with only one integrated circuit. Because it's small enough to pass through Often hidden in the stomach of a charged machine. It plays the role of the human mind in the whole device, Something went wrong and the whole device was paralyzed. Now, the use of this microcontroller has been very extensive, such as Intelligent instrument, real time industrial control, communication equipment, navigation system, home appliance, etc.. A variety of products once used SCM can play the role of upgrading the product, often preceded by the product name as an adjective - "wisdom." Can be type, such as intelligent washing machines, etc.. Now some factory technicians or other amateur electronic developers do it Some products out of the circuit is not too complicated, that is, the function is too simple and very easy to be copied. Investigate its reason, May be stuck on the product, not using a microcontroller or other programmable logic device. STC89C52 It's a kind of band 8K Byte blinking programmable erasable read only memory ( FPEROM-Flash, Programable, and, Erasable, Read, Only, Memory ). Low voltage, high performance COMOS8 Microprocessor, commonly known as single chip microcomputer. The device is adopted ATMEL Engage in secret Manufacturing, manufacturing, and industrial standards of nonvolatile memory MCS-51 Instruction set and output pin phase Volume. SCM total control circuit as follows Four - One : ======================================== page fourth ======================================== chart Tutu chart Four - - - One SCM total control circuit SCM total control circuit SCM total control circuit SCM total control circuit One Clock circuit STC89C52 Internally, a high gain inverting amplifier is used to form the oscillator pin RXD and TXD Input and output of the amplifier respectively. Clocks can be produced internally or externally Type production. The internal mode of the clock circuit is shown in Fig. Four - 2 (a) As shown in RXD and TXD The external pin Timing element, the internal oscillator generates self-excited oscillation. The timing element is usually made of quartz crystals and capacitors Parallel resonant circuit. Crystal oscillation frequency can be found in One point two ~ 12MHz Between, the capacitor value in Five ~ 30pF Between the capacitors, the size of the capacitor can play a role in trimming the frequency. The external mode of the clock circuit is shown in Fig. Four - Two ( B As shown, RXD Earthing, TXD External oscillator. The external oscillation signal has no special requirement. Only the pulse width is guaranteed, and the frequency is lower than that of the external oscillation signal 12MHz Square wave signal. The on-chip clock generator divides the oscillation frequency two to produce a two phase clock P1 and P2 , For SCM use. Show, RXD Earthing, TXD External oscillator. External oscillation signal has no special requirement, only request Guaranteed pulse width is generally below the frequency 12MHz Square wave signal. The on-chip clock generator oscillates Frequency two divider generates a two phase clock P1 and P2 For SCM use. RXD Earthing, TXD External oscillator. There is no special requirement for external oscillation signal, only guarantee Pulse width is generally lower than frequency 12MHz Square wave signal. The internal clock generator oscillates the oscillator frequency Two frequency divider generates a two phase clock P1 and P2 For SCM use. ( (( ( A ) )) Internal mode clock circuit Internal mode clock circuit Internal mode clock circuit Internal mode clock circuit ( (( ( B ) )) External mode clock circuit External mode clock circuit External mode clock circuit External mode clock circuit chart Tutu chart Four - - - Two Clock circuit Clock circuit Clock circuit Clock circuit Two Reset and reset circuit ( One Reset operation ======================================== page fifth ======================================== Reset is the initialization operation of single chip microcomputer. Its main function is to bring PC Initialize to 0000H Make single Chip machine 0000H The unit starts executing the program. In addition to the normal initialization of the system, due to In order to get out of the difficulty, the system needs to press the reset button again when the system is in a deadlock state Start up. except PC Outside, The reset operation also affects some other registers, and their reset status is shown in Table 1 As shown. surface Table Table 1 one by one One The reset status of some registers The reset status of some registers The reset status of some registers The reset status of some registers register Reset state register Reset state PC 0000H TCON 00H ACC 00H TL0 00H PSW 00H TH0 00H SP 07H TL1 00H DPTR 0000H TH1 00H P0-P3 FFH SCON 00H IP XX000000B SBUF Indefinite IE 0X000000B PCON 0XXX0000B TMOD 00H ( Two Reset signal and its generation RST The pin is the input terminal of the reset signal. The reset signal is active high, and the active time should be maintained Continued Twenty-four Oscillating period ( That is, two machine cycles ) Above。 If the use rate is 6MHz The crystal oscillator is reset Signal duration shall exceed 4us To complete the reset operation. The logic of the circuit that produces the reset signal is shown in Fig. Four - Three As shown: ======================================== page sixth ======================================== chart Tutu chart Four - - - Three Circuit logic diagram of reset signal Circuit logic diagram of reset signal Circuit logic diagram of reset signal Circuit logic diagram of reset signal The whole reset circuit includes two parts inside and outside the chip. A reset signal produced by an external circuit (RST) Send to The Schmidt flip-flop is then replaced by an on-chip reset circuit in each machine cycle S5P2 Time for Schmidt flip flops The output is sampled before obtaining the signal needed for internal reset operation. Reset operation on power, automatic reset button, manual reset two ways. The power on auto reset is realized by charging the capacitor of the external reset circuit Four - Four ( A As shown. Then, as long as the power Vcc The rise time does not exceed 1ms It can be implemented automatically Electrical reset, that is, through the power supply, it becomes a system reset initialization. Manual reset button, level mode and pulse mode of two. Wherein, the key level reset is accomplished by resetting the key level Bit by resistance and Vcc When the power is connected, the circuit is as follows Four - Four ( B As shown; and the key pulse Flush reduction is the use of RC A positive pulse produced by a differential circuit, The circuit is shown in Fig. Four - Four ( C As shown: ( (( ( A ) )) Power on reset Power on reset Power on reset Power on reset ( (( ( B ) )) Button level reset Button level reset Button level reset Button level reset ( (( ( C ) )) Button reset Key pulse reset Key pulse reset Key pulse reset chart Tutu chart Four - - - Four Reset circuit Reset circuit Reset circuit Reset circuit The resistor and capacitor parameters in the above circuit diagram apply to 6MHz Crystal oscillator, can guarantee the reset signal high electricity ======================================== page seventh ======================================== Mean duration is greater than Two Machine cycle. The reset circuit of the system adopts the diagram Four - Four ( B Power on reset mode. STC89C52 Details are as follows: Main power pin Two Root) VCC (Pin40) Power input, + 5V Power Supply GND (Pin20) Ground wire External crystal pin (external pin) Two Root) XTAL1 (Pin19) The input of the on-chip oscillation circuit XTAL2 (Pin20) The output of an on-chip oscillation circuit Control pin Four Root) RST/VPP (Pin9) : the reset pin appears on the pin Two The high level of the machine cycle will enable the microcontroller Reset. ALE/PROG (Pin30) Address latch enable signal PSEN (Pin29) Read strobe signal for external memory EA/VPP (Pin31) The internal and external strobe of the program memory is connected to the low level and read from the external program memory Instruction, if high, reads instructions from internal program memory. Programmable input / Output pin Thirty-two Root) STC89C52 SCM Four group Eight Bit programmable I/O Mouth position P0 , P1 , P2 , P3 Every mouth has a mouth Eight (a Eight Root pin) a total of Thirty-two Root. PO (export Pin39 ~ Pin32 ): Eight Bit bidirectional I/O Mouth line, the name of P0.0 ~ P0.7 P1 (export Pin1 ~ Pin8 ): Eight Quasi bidirectional I/O Mouth line, the name of P1.0 ~ P1.7 P2 (export Pin21 ~ Pin28 ): Eight Quasi bidirectional I/O Mouth line, the name of P2.0 ~ P2.7 P3 (export Pin10 ~ Pin17 ): Eight Quasi bidirectional I/O Mouth line, the name of P3.0 ~ P3.7 STC89C52 The main functions are shown in table two. Table two STC89C52 major function Main functional characteristics compatible MCS51 Instruction set 8K Repeatedlyrewritable Flash ROM ======================================== page eighth ======================================== Thirty-two Two way I/O mouth 256x8bit inside RAM Three individual Sixteen Bit programmable timing / Counter interrupt clock frequency 0-24MHz Two Serial interrupt Programmable UART Serial channel Two External interrupt source common Six Middle fault source Two Read write interrupt line Three Level encryption bit Low power idle and power down modes The software sets sleep and wake up functions
本文档为【stc89c52单片机介绍(Introduction of STC89C52 SCM)】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_281650
暂无简介~
格式:doc
大小:64KB
软件:Word
页数:32
分类:生活休闲
上传时间:2017-10-21
浏览量:57