基于单片机的路灯遥控装置的设计外文翻译汇编
单片机控制系统外文翻译

单片机控制系统外文翻译Microcomputer SystemsElectronic systems are used for handing information in the most general sense; this information may be telephone conversation, instrument read or a company’s accounts, but in each case the same main type of operation are involved: the processing, storage and transmission of information. in conventional electronic design these operations are combined at the function level; for example a counter, whether electronic or mechanical, stores the current and increments it by one as required. A system such as an electronic clock which employs counters has its storage and processing capabilities spread throughout the system because each counter is able to store and process numbers.Present day microprocessor based systems depart from this conventional approach by separating the three functions of processing, storage, and transmission into different section of the system. This partitioning into three main functions was devised by Von Neumann during the 1940s, and was not conceived especially for microcomputers. Almost every computer ever made has been designed with this structure, and despite the enormous range in their physical forms, they have all been of essentially the same basic design.In a microprocessor based system the processing will be performed in the microprocessor itself. The storage will be by means of memory circuits and the communication of information into and out of the system will be by means of special input/output(I/O) circuits. It would be impossible to identify a particular piece of hardware which performed the counting in a microprocessor based clock because the time would be stored in the memory and incremented at regular intervals but the microprocessor. However, the software which defined the system’s behavior would contain sections that performed as counters. The apparently rather abstract approach to the architecture of the microprocessor and its associated circuits allows it to be very flexible in use, since the system is defined almost entirely software. The design process is largely one of software engineering, and the similar problems of construction and maintenance which occur in conventional engineering are encountered when producing software.The figure1.1 illustrates how these three sections within a microcomputer are connected in terms of the communication of information within the machine. The system is controlled by the microprocessor which supervises the transfer of information between itself and the memory and input/output sections. The external connections relate to the rest (that is, the non-computer part) of the engineering system.Fig.1.1 Three Sections of a TypicalMicrocomputerAlthough only one storage section has been shown in the diagram, in practice two distinct types of memory RAM and ROM are used. In each case, the word ‘memory’ is rather inappropriate since a computers memory is more like a filing cabinet in concept; information is stored in a set of numbered ‘boxes’ and it is referenced by the serial number of the ‘box’ in question.Microcomputers use RAM (Random Access Memory) into which data can be written and from which data can be read again when needed. This data can be read back from the memory in any sequence desired, and not necessarily the same order in w hich it was written, hence the expression ‘random’ access memory. Another type of ROM (Read Only Memory) is used to hold fixed patterns of information which cannot be affected by the microprocessor; these patterns are not lost when power is removed and are normally used to hold the program which defines the behavior of a microprocessor based system. ROMs can be read like RAMs, but unlike RAMs they cannot be used to store variable information. Some ROMs have their data patterns put in during manufacture, while others are programmable by the user by means of special equipment and are called programmable ROMs. The widely used programmable ROMs are erasable by means of special ultraviolet lamps and are referred to as EPROMs, short for Erasable Programmable Read Only Memories. Other new types ofdevice can be erased electrically without the need for ultraviolet light, which are called Electrically Erasable Programmable Read Only Memories, EEPROMs.The microprocessor processes data under the control of the program, controlling the flow of information to and from memory and input/output devices. Some input/output devices are general-purpose types while others are designed for controlling special hardware such as disc drives or controlling information transmission to other computers. Most types of I/O devices are programmable to some extent, allowing different modes of operation, while some actually contain special-purpose microprocessors to permit quite complex operations to be carried out without directly involving the main microprocessor.The microprocessor , memory and input/output circuit may all be contained on the same integrated circuit provided that the application does not require too much program or data storage . This is usually the case in low-cost application such as the controllers used in microwave ovens and automatic washing machines . The use of single package allows considerable cost savings to e made when articles are manufactured in large quantities . As technology develops , more and more powerful processors and larger and larger amounts of memory are being incorporated into single chip microcomputers with resulting saving in assembly costs in the final products . For the foreseeable future , however , it will continue to be necessary to interconnect a number of integrated circuits to make a microcomputer whenever larger amounts of storage or input/output are required.Another major engineering application of microcomputers is in process control. Here the presence of the microcomputer is usually more apparent to the user because provision is normally made for programming the microcomputer for the particular application. In process control applications the benefits lf fitting the entire system on to single chip are usually outweighed by the high design cost involved, because this sort lf equipment is produced in smaller quantities. Moreover, process controllers are usually more complicated so that it is more difficult to make them as single integrated circuits. Two approaches are possible; the controller can be implemented as a general-purpose microcomputerrather like a more robust version lf a hobby computer, or as a ‘packaged’ system, signed for replacing controllers based on older technologies such as electromagnetic relays. In the former case the system would probably be programmed in conventional programming languages such as the ones to9 be introduced later, while in the other case a special-purpose language might be used, for example one which allowed the function of the controller to be described in terms of relay interconnections, In either case programs can be stored in RAM, which allows them to be altered to suit changes in application, but this makes the overall system vulnerable to loss lf power unless batteries are used to ensure continuity of supply. Alternatively programs can be stored in ROM, in which case they virtually become part of the electronic ‘hardware’ and are often referred to as firmware.More sophisticated process controllers require minicomputers for their implementation, although the use o f large scale integrated circuits ‘the distinction between mini and microcomputers, Products and process controllers of various kinds represent the majority of present-day microcomputer applications, the exact figures depending on one’s i nterpretation of the word ‘product’. Virtually all engineering and scientific uses of microcomputers can be assigned to one or other of these categories. But in the system we most study Pressure and Pressure Transmitters. Pressure arises when a force is applied over an area. Provided the force is one Newton and uniformly over the area of one square meters, the pressure has been designated one Pascal. Pressure is a universal processing condition. It is also a condition of life on the planet: we live at the bottom of an atmospheric ocean that extends upward for many miles. This mass of air has weight, and this weight pressing downward causes atmospheric pressure. Water, a fundamental necessity of life, is supplied to most of us under pressure. In the typical process plant, pressure influences boiling point temperatures, condensing point temperatures, process efficiency, costs, and other important factors. The measurement and control of pressure or lack of it-vacuum-in the typical process plant is critical.单片机控制系统广义地说,微型计算机控制系统(单片机控制系统)是用于处理信息的,这种被用于处理的信息可以是电话交谈,也可以是仪器的读数或者是一个企业的帐户,但是各种情况下都涉及到相同的主要操作:信息的处理、信息的存储和信息的传递。
基于单片机的交通灯控制系统单片机毕业论文外文文献翻译及原文

毕业设计(论文)外文文献翻译文献、资料中文题目:基于单片机的交通灯控制系统文献、资料英文题目:Structure and functionof the MCS-51 series文献、资料来源:文献、资料发表(出版)日期:院(部):专业:通信工程班级:姓名:学号:指导教师:翻译日期: 2017.02.14毕业设计文献资料翻译(原文及译文)原文名称:Structure and function of the MCS-51 series课题名称:基于单片机的交通灯控制系统Structure and function of the MCS-51 seriesStructure and function of the MCS-51 series one-chip computer MCS-51 is a name of a piece of one-chip computer series which Intel Company produces. This company introduced 8 top-grade one-chip computers of MCS-51 series in 1980 after introducing 8 one-chip computers of MCS-48 series in 1976. It belong to a lot of kinds this lineof one-chip computer the chips have, such as 8051, 8031, 8751, 80C51BH, 80C31BH,etc., their basic composition, basic performance and instruction system are all the same.8051 daily representatives-51 serial one-chip computers.A one-chip computer system is made up of several following parts:(1) One microprocessor of 8 (CPU). ( 2) At slice data memory RAM (128B/256B),it use not depositing not can reading /data that write, such as result not middle of operation, final result and data wanted to show, etc.(3) Procedure memory ROM/EPROM (4KB/8KB ), is used to preserve the procedure , some initial data and form in slice. But does not take ROM/EPROM within some one-chip computers, such as 8031, 8032.(4) Four 8 run side by side I/O interface P0 four P3, each mouth can use as introduction , may use as exporting too. (5) Two timer / counter, each timer / counter may set up and count in the way, used to count to the external incident, can set up into a timing way too, and can according to count or result of timing realize the control of the computer. (6) Five cut off cutting off the control system of the source. (7) One all duplex serial I/O mouth of UART (universal asynchronous receiver/transmitter (UART) ), is it realize one-chip computer or one-chip computer and serial communication of computer to use for. (8) Stretch oscillator and clock produce circuit, quartz crystal finely tune electric capacity need outer. Allow oscillation frequency as 12 megahertz now at most. Every the above-mentioned part was joined through the inside data bus .Amongthem, CPU is a core of the one-chip computer, it is the control of the computer and command centre, made up of such parts as arithmetic unit and controller , etc.. The arithmetic unit can carry on 8 persons of arithmetic operation and unit ALU of logic operation while including one, the 1 storing device temporaries of 8, storing device 2 temporarily, 8's accumulation device ACC, register B and procedure state register PSW, etc. Person who accumulate ACC count by 2 input ends entered of checking etc. temporarily as one operation often, come from person who store 1 operation is it is it make operation to go on to count temporarily , operation result and loop back ACC with another one. In addition, ACC is often regarded as the transfer station of data transmission on 8051 inside. The same as general microprocessor, it is the busiest register. Help remembering that agreeing with a express in the order. The controller includes the procedure counter, the order is deposited, the order deciphering, the oscillator and timing circuit, etc. The procedure counter is made up of counter of 8 for two, amounts to 16. It is a byte address counter of the procedure in fact, the content is the next IA that will carried out in PC. The content which changes it can change the direction that the procedure carries out. Shake the circuit in 8051 one-chip computers, only need outer quartz crystal and frequency to finely tune the electric capacity, its frequency range is its 12MHZ of 1.2MHZ. This pulse signal, as 8051 basic beats of working, namely the minimum unit of time. 8051 is the same as other computers, the work in harmony under thecontrol of the basic beat, just like an orchestra according to the beat play that is commanded.There are ROM (procedure memory , can only read ) and RAM in 8051 slices (data memory, can is it can write ) two to read, they have each independent memory address space, dispose way to be the same with general memory of computer. Procedure 8051 memory and 8751 slice procedure memory capacity 4KB, address begin from 0000H, used for preserving the procedure and form constant. Data 8051- 8751 8031 of memory data memory 128B, address false 00FH, using for middle result to deposit operation, the data are stored temporarily and the data are buffered. In RAM of this 128B, there is unit of 32 bytes that can be appointed as the job register, this and general microprocessor is different, 8051 slice RAM and job register rank one formation the same to arrange the location. It is not very the same that the memory of MCS-51 series one-chip computer and general computer disposes the way in addition. General computer for first address space, ROM and RAM can arrange in different space within the range of this address at will, namely the addresses of ROM and RAM, with distributing different address space in a formation. While visiting the memory, corresponding and only an address Memory unit, can ROM, it can be RAM too, and by visiting the order similarly. This kind of memory structure is called the structure of Princeton. 8051 memories are divided into procedure memory space and data memory space on the physics structure, there are four memoryspaces in all: The procedure stores in one and data memory space outside data memory and one in procedure memory space and one outside one, the structure forms of this kind of procedure device and data memory separated form data memory, called Harvard structure. But use the angle from users, 8051 memory address space is divided into three kinds: (1) In the slice, arrange blocks of FFFFH, 0000H of location, in unison outside the slice (use 16 addresses). (2) The data memory address space outside one of 64KB, the address is arranged from 0000H 64KB FFFFH (with 16 addresses) too to the location. (3) Data memory address space of 256B (use 8 addresses). Three above-mentioned memory space addresses overlap, for distinguishing and designing the order symbol of different data transmission in the instruction system of 8051: CPU visit slice, ROM order spend MOVC , visit block RAM order uses MOVX outside the slice, RAM order uses MOV to visit in slice.8051 one-chip computer have four 8 walk abreast I/O ports, call P0, P1, P2 and P3. Each port is 8 accurate two-way mouths, accounts for 32 pins altogether. Every one I/O line can be used as introduction and exported independently. Each port includes a latch (namely special function register), one exports the driver and a introduction buffer. Make data can latch when outputting, data can buffer when making introduction, but four function of pass away these self-same. Expand among the system of memory outside having slice, four ports these may serve as accurate two-way mouth of I/O in common use. Expand among the system ofmemory outside having slice, P2 mouth see high 8 address off; P0 mouth is a two-way bus, send the introduction of 8 low addresses and data / export in timesharingThe circuit of 8051 one-chip computers and four I/O ports is very ingenious in design. Familiar with I/O port logical circuit, not only help to use port correctly and rationally, and will inspire to designing the peripheral logical circuit of one-chip computer to some extent. Load ability and interface of port have certain requirement, because output grade, P0 of mouth and P1 end output, P3 of mouth grade different at structure, so, the load ability and interface of its door demand to have nothing in common with each other. P0 mouth is different from other mouth, its output grade draws the resistance supremely. When using it as the mouth in common use, output grade is it leak circuit to turn on, is it urge NMOS draw the resistance on taking to be outer with it while inputting to go out to fail. When being used as introduction, should write"1" to a latch first. Every one with P0 mouth can drive 8 Model LS TTL load to export. P1 mouth is an accurate two-way mouth too, used as I/O in common use. Different from P0 mouth output of circuit its, draw load resistance link with power on inside have. In fact, the resistance is that two effects are in charge of FET and together: One FET is in charge of load, its resistance is regular. Another one can is it lead to work with close at two state, make its President resistance value change approximate 0 or group value heavy two situation very. When it is 0 that the resistanceis approximate, can draw the pin to the high level fast; when resistance value is very large, P1 mouth high electricity at ordinary times, can is it draw electric current load to offer outwards, draw electric current load to offer outwards, draw the resistance on needn't answer and thinking. Here when the port is used as introduction, must write into 1 to the corresponding latch first too, make FET end relatively about 20,000 ohms because of load resistance in scene and because 40,000 ohms, will not exert an influence on the data that are input. The structure of P2 some mouth is similar to P0 mouth, there are MUX switches. Is it similar to mouth partly to urge, but mouth large a conversion controls some than P1.P3 mouth one multi-functional port, mouth getting many than P1 it have "3 doors and 4 buffers". Two parts there, make her besides accurate two-way function with P1 mouth just, can also use the second function of every pin, "and" door 3 functions one switch in fact, it determines to be to output data of latch to output second signal of function. Act as W=At 1 o'clock, output Q end signal; act as Q=At 1 o'clock, can output W line signal. At the time of programming, it is that the first function is still the second function but needn't have software that set up P3 mouth in advance .It hardware not inside is the automatic to have two function outputted when CPU carries on SFR and seeks the location to visit to P3 mouth/at not lasting lining, there are inside hardware latch Qs=1. The operation principle of P3 mouth is similar to P1 mouth.Output grade, P3 of mouth, P1 of P1, connect with inside have loadresistance of drawing, every one of they can drive 4 Model LS TTL load to output. As while inputting the mouth, any TTL or NMOS circuit can drive P1 of 8051 one-chip computers as P3 mouth in a normal way. Because draw resistance on output grade of them have, can open a way collector too or drain-source resistance is it urge to open a way, do not need to have the resistance of drawing outer. Mouths are all accurate two-way mouths too. When the conduct is input, must write the corresponding port latch with 1 first. As to 80C51 one-chip computer, port can only offer milliampere of output electric currents, is it output mouth go when urging one ordinary basing of transistor to regard as, should contact a resistance among the port and transistor base, in order to the electricity while restraining the high level from exporting P1~P3 Being restored to the throne is the operation of initializing of an one-chip computer. Its main function is to turn PC into 0000H initially, make the one-chip computer begin to hold the conduct procedure from unit 0000H. Except that the ones that enter the system are initialized normally, as because procedure operate it make mistakes or operate there aren't mistake, in order to extricate oneself from a predicament , need to be pressed and restored to the throne the key restarting too. It is an input end which is restored to the throne the signal in 8051 China RST pin. Restore to the throne signal high level effective, should sustain 24 shake cycle (namely 2 machine cycles) the above its effective times. If 6 of frequency of utilization brilliant to shake, restore to the throne signal durationshould exceed 4 delicate to finish restoring to the throne and operating. Produce the logic picture of circuit which is restored to the throne the signal: restore to the throne the circuit and include two parts outside in the chip entirely. Outside that circuit produce to restore to the throne signal (RST) hand over to Schmitt's trigger, restore to the throne circuit sample to output , Schmitt of trigger constantly in each S5P2 , machine of cycle in having one more , then just got and restored to the throne and operated the necessary signal inside. Restore to the throne resistance of circuit generally, electric capacity parameter suitable for 6 brilliant to shake, can is it restore to the throne signal high level duration greater than 2 machine cycles to guarantee. Being restored to the throne in the circuit is simple, its function is very important. Pieces of one-chip computer system could normal running, should first check it can restore to the throne not succeeding. Checking and can pop one's head and monitor the pin with the oscilloscope tentatively, push and is restored to the throne the key, the wave form that observes and has enough range is exported (instantaneous), can also through is it restore to the throne circuit group holding value carry on the experiment to change.MCS-51系列单片机的功能和结构MSC-51系列单片机具有一个单芯片电脑的结构和功能,它是英特尔公司的系列产品的名称。
单片机红外遥控外文翻译

Infrared Remote And Chips Are IntroducedPeople's eyes can see the visible wavele ngth from long to short accord ing to the arrangement, in order to red, orange, yellow, green, green, blue, violet. One of the red wavelengths for 0.62 ~ 0.76 mount, Purple is 0.38 wavelength range ~ mount. Purple is shorter than the wavelength of light called ultraviolet ray, red wavele ngths of light is Ion ger tha n that of in frared light. In frared remote control is to use wavelength for 0.76 ~ 1.5 mount between the near in frared to tran sfer con trol sig nal.Commo nly used in frared remote con trol system of gen eral poi nts tran smit and receive two parts. The main component part for the launch of infrared light emitting diode. It is actually a special light emitting diode, due to its internal material differs from ordinary light emitting diode, resulting in its ends on certain voltage, it is a rather infrared light. Use of infrared light emitti ng diode the in frared wavele ngths, for 940nm appeara nee and ordin ary, just the same light emitting diode five different colors. Infrared light emitting diode gen erally have black and blue, tran spare nt three colors. Judgme nt of infrared light emitting diode and judgment method, using a millimeter to ordinary diode electric block measure of infrared light emitting diode, reverse resista nee. The in frared light emitti ng diode lumin esce nce efficie ncy to use special instrument to measure precise, and use only spare conditions to pull away from roughly judgment. Receiving part of infrared receiving tube is a photose nsitivediode.In actual application of it receiving diode to reverse bias, it can work normally, i.e., the infrared receiving circuit application in diode is used to reverse, higher sensitivity. Infrared receiving diode usually have two round and rectangular. Due to the power of infrared light emitting diode (or less commonly 100mW), so ir receiving diode received signals is weak, so will increasehigh-gain ones.the amplifiercircuit.In com mon CX20106A, etc. PC1373H moo n in frared receivi ng special amplifier circuit. In recent years both amateur or formal products, mostly using in frared recei vinghead fini shed. The head of in frared recei ving product packages gen erally has two kin ds: one kind USES sheet shield ing, A kind of plastic packaging. There are three pin, namely the power is (VDD), power negative (GND) and data output (VO or OUT). Infrared receiving head foot arrangement for types varied, manufacturer's instructions. Finished the advantages of infrared receiving head is not in need of sophisticated debugg ing and shell scree n, use rise as a tran sistor, very convenient. But whe n used in the infrared receivingattention finished first carrier frequency.In frared remote com mon carrier freque ncy for 38kHz, this is tran smitted by using 455kHz Tao Zhe n to decide. At the launch of crystals were in teger freque ncy, freque ncy coefficie nts, so com mon ly 12, so 455kHz 宁12 hun dredth kHz 38kHz hun dredth 379,000. Some remote con trol system adopts 36kHz, 56kHz, etc. general 40kHz launched by thecrystals of oscillation freque ncy to decide.In frared remote characteristic is not in flue nee the surro unding environment and does not interfere with other electric equipment. Due to its cannot pen etratewalls, so the room can use com mon household applia nee of remote control without mutual interferenee, Circuit testing is simple, as long as give n circuit connection, gen erally does not n eed any commissi oning can work, Decoding easily, can undertake multiple remote control. Because each manufacturer produces a great deal of infrared remote application-specific integrated circuit, when need press diagram so jip. Therefore, the infrared remote now in household applia nces, in door close (less tha n 10 meters) in the remote control is widely used.Multiple infrared remote control system of infrared emission control buttons, there are many parts general representative of different control function. Whe n pressed a butt on, corresp ondin gly in the receiver with differe nt output.Receiving the output state can be roughly divided into pulse, level, selflock ing and in terlock, data five forms. "The pulse output is accordi ng to laun ch" whe n the butt on, the receiver output term in als output corresp onding "effective", a pulse width 100ms in gen eral. "Level" refers to the output launch press butt on, the receiver output corresp onding output level ", "effective transmit to loosen the receiver" level "disappears. This"effective pulse" and "effective", may be of high level is low, and may also depe nd on the output corresp onding static state, such as feet for low, static "high" for effective, As for the static, "low" high effective. In most cases, "high" for effective. "Since the lock" refers to launch the output of each time you press the butt on, a receiver output corresponding change, namely originally a state for high level into a low level, originally for low level into high level. The output power switch and mute as control etc. Sometimes also called the output form for "inv ert". "The in terlock" refers to multiple outputs each output, at the same time only one output. The TV sets of this case is selected, the otheris like the light and sound in put speed, etc."Data" refers to launch the output some key, use a few output form a bi nary nu mber, to represe ntdiffere nt keystroke.Normally, the receiver except a few data output, but also a "valid" output data, so the timely to collect data. This output form with single-chip microcomputer or are com monly used in terface. In additi on to the above output form outside, still have a "latch" and "temporary" two forms. The so- called "latch" refers to launch the output signal of each hair, the receiver output corresponding ", "new store until you receive signals. "Temporary" output and the introductionof "level" output is similar.Remote dista nce (Remote Con trol effect of RF Remote Con trol dista nce) are the major factorsasfollows:un ched in power tran smissi on power: while dista nee, but great power consumpti on, easy to gen eratenterfere nee.2.and receiving the receiver sensitivity, receiving, remote distanee in creased sen sitivity to improve, but easy to cause disturba nee maloperati on or abuse.3.antenna, using linear antenna, and parallel, remote distanee, but occupies a large space, in use the antennaspin, pull can in crease the remote dista nee.4.and the higher height: antenna, remote farther, but by objective eon diti ons.5. a nd stop: curre nt use of wireless remote use of UHF band stipulated by the state, the propagation characteristics of approximate linear transmission, light, small, transmitters and receivers diffraction between such as walls are block ing will greatlydisco un ted remote dista nee, if is rein forced eon crete walls, due to theabsorpti on effect eon ductor, radiowaves.Con sideri ng the desig n of hardware volume small to be embedded in the remote control, so we chose 20 foot single-chip chip AT89C2051. Below is the introduction of the function.(1)AT89C2051 internal structure and performaneeAT89C2051 is a byte flash 2K with programmable read-only memory can be erased EEPROM (low voltage, high performanee of eight CMOS microcomputer. It adopts ATMEL of high-density non-volatile storage tech no logy manu facturi ng and in dustrial sta ndard MCS - 51 in structio n set and lead. Through the comb in ati on of sin gle chip in gen eral CPL1 and flash memory, is a strong ATMEL AT89C2051 microcomputer, its application in many embedded control provides a highly flexible and low cost solutions. The compatible with 8051 AT89C2051 is CHMOS micro eontroller, the Flash memory capacity for 2KB. And CHMOS 80C51 process,have two kinds of leisure and power saving operation mode. The performanee is as follows.5.CUP, 2KB Flash memory,Worki ng voltage range 2.7-6V, 128KB data storage.The static worki ng way: 0-24MHz,15 root input/output line.A programmable serial, 2 a 16-bit timing/counters.There is a slice of in sideprecisio nsimulatio n comparator, 5thei nterrupt sources,2 priority.Programmable serial UART channel, Directly LED driver output,The internal structureof AT89C2051 is shown in figure 1.Figure 1 AT89C2051 in terior structure(2)AT89C2051 chip pin andfunctionIn order to adapt to the requirement of intelligent instrument, embedded in the chip foot AT89C2051 simplified configuration, as shown in figure b. The major cha nges to: (1) the lead foot from 20 to 40 wires, (2) in creased a simulated comparator.=DiagrambAT89C2051 foot figure.AT89C2051 pin fun ctio n:1.the VCC: voltage.1.to GND.1.P1 mouth: P1 mouth is an 8-bit two-way I/O port. P1.2 ~ P1.7 mouth pin theinternal resista nee provides. P1.0 and P1.1 requireme nts on the exter nal pull-up resistors. P1.0 and P1.1 also separately as piece in side precisi on simulati on comparator with in put (AIN0) and reversed-phasei nput (AIN1). Output buffer can absorb the P1 mouth 20mA current and can directly LED display driver. Whe n P1 mouth pin into a "1", can make its in put. Whe n the pin P1.2 ~ P1.7 as in put and exter nal dow n, they will be for the internal resista nee and flow curre nt (IIL). I n flash P1 mouth duri ng the procedure and program code datareceiving calibration.2.P3: the P3.0 ~ P3.5 P3, P3.7 is the in ternal resista nce with seven twoway I / 0 lead. P3.6 for fixed in puts piece in side the comparator output sig nal and it as a gen eral I/O foot and in accessible. P3 mouth buffer can absorb 20mA curre nt. When P3 mouth pin in to "1", they are the internal resista nee can push and in put. As in put, and the low exter nal P3 mouth pin pull-up resistors and will use curre nt (IIL) outflow. P3 mouth still used to impleme nt the various fun etio ns, such as AT89C2051 show n in table P3 mouth still receive some for flash memory programming and calibration of program con trol sig nals.5.RST: reset in put. 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 in put and inv erse internal clock gen eratori nput.7.XTAL2: as the oscillator reversed-phase the amplifier's output.P3 mouth function as isshown in table 1.Table 1(3)the software and hardware constraintsAT89C2051Due to the foot of the chip AT89C2051, no set limits of external storage in terface, so, for exter nal memory read/write in structio ns 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 OOH (7FH --whe n stack man ipulatio n), alsoshould be no ticed.The in put sig nal is simulated by the origi nal P3.6 foot into the microcontroller, sothe original P3.6 foot.Un able to exter nal use. Simulati on comparator can compare two simulation, if the size of the voltage external A D/A converter and its output as A comparator an alog in put, and by simulat ing the comparator ano ther in put voltage to be measured, through the introduction of the software method can realize the A/D con versi on.8.the Flash memory AT89C2051)Provide a 2KB of si ngle-chip AT89C2051 in Flash memory chips, which allows theonline program to modify or use special programming program ming.(1)Flash memory en crypti onAT89C2051 SCM has 2 encryption, can programming (P) or programming (U) to obtain different encryption functionality. Encryption functionality table asshown in table 1-1.En crypt a conten terased only through chips to eraseoperatio n.(2)Flash memory program ming and procedures the piece in side chip AT89C2051 Flash memory program ming.Note:1.the cou nters RESET at an EPROM in side the risi ng edge, and 000HRESET to XTAL1 by foot is executed,pulse count.2.piecesof 10ms to erasePROG pulse.3.duri ng the programmi ng P3.1 pulled low RDY/BSY in structio ns.⑶AT89C2051 SCM in Flash memory chips program ming steps are as follows:1.in the seque nee is the VCC GND pin, add worki ng voltage, XTAL1 pin RESET, receiving GND pin, other than the abovetime, waiting for 10ms.2.In P3.2 pin RESET,heighte ning level.3.In P3.3, P3.4, P3.5, P3.7 pinjadd model multilevel.4.P1.0 P1.7 -- for the 000H un itadd data bytes.5.RESET to increasethe 12V activation programming.6.P3.2 jump to a one byte programming or encryption.7.calibration has been programming, data from 12V to RESET logic level "H" and setP3.3 P3.7 -- for the correct level, and can output data in P1 mouth.8.For the n ext addresses) in the unit XTAL1 byte program ming, a pulse, make address counter add 1, in mouth add programming data.9.programming and calibration circuit figure c, d.Figure c programming circuitFigure d calibration circuit Explanation:(1)P3.1 during programming instructionsto below RDY/BSY,(2)single erasingthe PROG 10ms need,(3)internal EEPROM address coun ter on the rising edge RESET, and 000H RESET to XTAL1 by foot pulses are executed.Along with the rapid developme nt of scie nee and tech no logy, huma n society has un derg one earth-shak ing cha nges. Make our life more colorful. I n these cha nges, the remote control tech no logy has bee n widely permeatesTV, aerospace,military, sports andother product ion, all aspects of life. From the broad sense, all equipped with electric locomotive facility or electrical switches, if feel some n ecessary, can con sider to improve existi ng with remote control device, the operation fixed switch to realize the remote operation of the original equipment,stop, the variable,etc. Function.switch, for example, can be used to control the electric control switch the light switch, We design the infrared remote control system to realize the opponent switch quantity control. Infrared remote characteristic is not in flue nce the surro unding en vir onment and does not in terfere with other electric equipment. Due to its cannot penetrate walls, so the room can use com mon household applia nce of remote con trol without mutual in terfere nce, Circuit testi ng is simple, as long as give n circuit conn ecti on, gen erally does not need any commissioning can work, Decoding easily, can undertake multiple remote con trol.红外遥控人的眼睛能看到的可见光按波长从长到短排列,依次为红、橙、黄、 绿、青、蓝、紫。
单片机红外遥控外文翻译知识交流

Infrared Remote And Chips Are IntroducedPeople's eyes can see the visible wavele ngth from long to short accord ing to the arrangement, in order to red, orange, yellow, green, green, blue, violet. One of the red wavelengths for 0.62 ~ 0.76 mount, Purple is 0.38 wavelength range ~ mount. Purple is shorter than the wavelength of light called ultraviolet ray, red wavele ngths of light is Ion ger tha n that of in frared light. In frared remote control is to use wavelength for 0.76 ~ 1.5 mount between the near in frared to tran sfer con trol sig nal.Com mon ly used in frared remote con trol system of gen eral poi nts transmit and receive two parts. The main component part for the launch of infrared light emitting diode. It is actually a special light emitting diode, due to its internal material differs from ordinary light emitting diode, resulting in its ends on certain voltage, it is a rather infrared light. Use of infrared light emitti ng diode the in frared wavele ngths, for 940nm appeara nee and ordin ary, just the same light emitting diode five different colors. Infrared light emitting diode gen erally have black and blue, tran spare nt three colors. Judgme nt of infrared light emitting diode and judgment method, using a millimeter to ordinary diode electric block measure of in frared light emitti ng diode, reverse resista nee. The in frared light emitti ng diode lumin esce nce efficie ncy to use special in strume nt to measure precise, and use only spare con diti ons to pull away from roughly judgme nt. Recei ving part of in frared recei ving tube is a photose nsitive diode.In actual application of it receiving diode to reverse bias, it can work normally, i.e., the infrared receiving circuit application in diode is used to reverse, higher sensitivity. Infrared receiving diode usually have two round and rectangular. Due to the power of infrared light emitting diode (or less commonly 100mW), so ir receiving diode received signals is weak, so will in crease high-ga in on es.the amplifier circuit.In common CX20106A, etc. PC1373H moon infrared receiving special amplifier circuit. In recent years both amateur or formal products, mostly using in frared recei ving head fini shed. The head of in frared recei ving product packages gen erally has two kin ds: one kind USES sheet shield ing, A kind of plastic packaging. There are three pin, namely the power is (VDD), power negative (GND) and data output (VO or OUT). Infrared receiving head foot arrangement for types varied, manufacturer's instructions. Finished the advantages of infrared receiving head is not in need of sophisticated debugg ing and shell scree n, use rise as a tran sistor, very convenient. But whe n used in the infrared receiving attention finished first carrier frequency.In frared remote com mon carrier freque ncy for 38kHz, this is tran smitted by using 455kHz Tao Zhen to decide. At the launch of crystals were integer frequency, frequency coefficients, so commonly 12, so 455kHz 宁12 hun dredth kHz 38kHz hun dredth 379,000. Some remote con trol system adopts 36kHz, 56kHz, etc. general 40kHz launched by the crystals of oscillation freque ncy to decide.In frared remote characteristic is not in flue nee the surro unding environment and does not interfere with other electric equipment. Due to its cannot pen etrate walls, so the room can use com mon household applia nee of remote control without mutual interferenee, Circuit testing is simple, as long as give n circuit connection, gen erally does not n eed any commissi oning can work, Decod ing easily, can un dertake multiple remote con trol. Because each manufacturer produces a great deal of infrared remote application-specific integrated circuit, when need press diagram so jip. Therefore, the infrared remote now in household applia nces, in door close (less tha n 10 meters) in the remote con trol is widely used.Multiple infrared remote control system of infrared emission control buttons, there are many parts general representative of different controlfunction. Whe n pressed a butt on, corresp ondin gly in the receiver with differe nt output.Receiving the output state can be roughly divided into pulse, level, self-lock ing and in terlock, data five forms. "The pulse output is accord ing to laun ch" whe n the butt on, the receiver output term in als output corresp onding "effective", a pulse width 100ms in general. "Level" refers to the output launch press butt on, the receiver output corresp onding output level ", "effective transmit to loosen the receiver" level "disappears. This "effective pulse" and "effective", may be of high level is low, and may also depe nd on the output corresponding static state, such as feet for low, static "high" for effective, As for the static, "low" high effective. In most cases, "high" for effective. "Si nee the lock" refers to launch the output of each time you press the butt on, a receiver output corresp onding cha nge, n amely origi nally a state for high level into a low level, orig in ally for low level into high level. The output power switch and mute as control etc. Sometimes also called the output form for "i nv ert". "The in terlock" refers to multiple outputs each output, at the same time only one output. The TV sets of this case is selected, the other is like the light and sound in put speed, etc."Data" refers to launch the output some key, use a few output form a bi nary nu mber, to represe nt differe nt keystroke.Normally, the receiver except a few data output, but also a "valid" output data, so the timely to collect data. This output form with single-chip microcomputer or are com monly used in terface. In additi on to the above output form outside, still have a "latch" and "temporary" two forms. The so-called "latch" refers to launch the output signal of each hair, the receiver output corresponding ", "new store until you receive signals. "Temporary" output and the in troducti on of "level" output is similar.Remote dista nee (Remote Con trol effect of RF Remote Con trol dista nee)are the major factors as follows:un ched in power tran smissi on power: while dista nee, but great power con sumpti on, easy to gen erate in terfere nee.2. and receiving the receiver sensitivity, receiving, remote distanee in creased sen sitivity to improve, but easy to cause disturba nee maloperati on or abuse.3. antenna, using linear antenna, and parallel, remote distanee, but occupies a large space, in use the antenna spin, pull can in crease the remote dista nee.4. and the higher height: antenna, remote farther, but by objective eon diti ons.5. a nd stop: curre nt use of wireless remote use of UHF band stipulated by the state, the propagation characteristics of approximate linear transmission, light, small, transmitters and receivers diffraction between such as walls are block ing will greatly disco un ted remote dista nee, if is rein forced eon crete walls, due to the absorpti on effect eon ductor, radio waves.Con sideri ng the desig n of hardware volume small to be embedded in the remote eontrol, so we chose 20 foot single-chip chip AT89C2051. Below is the in troducti on of the fun eti on.(1)AT89C2051 internal structure and performaneeAT89C2051 is a byte flash 2K with programmable read-only memory can be erased EEPROM (low voltage, high performanee of eight CMOS microcomputer. It adopts ATMEL of high-density non-volatile storage tech no logy manu facturi ng and in dustrial sta ndard MCS - 51 in structi on set and lead. Through the comb in ati on of sin gle chip in gen eral CPL1 and flash memory, is a strong ATMEL AT89C2051 microcomputer, its application in many embedded control provides a highly flexible and low cost solutions. The compatible with 8051 AT89C2051 is CHMOS micro eontroller, the Flash memory capacity for 2KB. And CHMOS 80C51 process, have two kinds ofleisure and power sav ing operati on mode. The performa nee is as follows.5. CUP, 2KB Flash memory,Working voltage range 2.7-6V, 128KB data storage.The static working way: 0-24MH z, 15 root in put/output line.A programmable serial, 2 a 16-bit timing/counters.There is a slice of in side precisi on simulatio n comparator, 5 the in terrupt sources, 2 priority.Programmable serial UART channel, Directly LED driver output,The internal structure of AT89C2051 is shown in figure 1.Figure 1 AT89C2051 in terior structure(2)AT89C2051 chip pin and functionIn order to adapt to the requireme nt of in tellige nt in strume nt, embedded in the chip foot AT89C2051 simplified configuration, as shown in figure b. The major cha nges to: (1) the lead foot from 20 to 40 wires, (2) in creased a simulated comparator.=Diagram b AT89C2051 foot figure.AT89C2051 pin fun ctio n:1. the VCC: voltage.2. to GND.3. P1 mouth: P1 mouth is an 8-bit two-way I/O port. P1.2 ~ P1.7 mouth pin the internal resista nee provides. P1.0 and P1.1 requireme nts on the external pull-up resistors. P1.0 and P1.1 also separately as piece in side precisi on simulatio n comparator with in put (AIN0) and reversed-phase in put (AIN1). Output buffer can absorb the P1 mouth 20mA current and can directly LED display driver. Whe n P1 mouth pin in to a "1", can make its in put. Whe n the pin P1.2 ~ P1.7 as in put and external dow n, they will be for the in ternal resista nee and flow curre nt (IIL). I n flash P1 mouth duri ng the procedure and program code data recei ving calibrati on.4. P3: the P3.0 ~ P3.5 P3, P3.7 is the in ternal resista nee with seven two-way I / 0 lead. P3.6 for fixed in puts piece in side the comparator output sig nal and it as a gen eral I/O foot and in accessible. P3 mouth buffer can absorb20mA curre nt. When P3 mouth pin in to "1", they are the in ternal resista nceca n push and in put. As in put, and the low exter nal P3 mouth pin pull-up resistors and will use current (IIL) outflow. P3 mouth still used to implement the various functions, such as AT89C2051 shown in table P3 mouth still receive some for flash memory programming and calibration of program con trol sig nals.5. RST: reset in put. 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 in put and in verse internal clock generator in put.7. XTAL2: as the oscillator reversed-phase the amplifier's output.P3 mouth fun cti on as is show n in table 1.addresses, will not meet wrong results. The scope of data storage is OOH(7FH --whe n stack man ipulatio n), also should be no ticed.The in put sig nal is simulated by the origi nal P3.6 foot into the microcontroller, so the original P3.6 foot.Un able to exter nal use. Simulati on comparator can compare two simulation, if the size of the voltage external A D/A converter and its output as A comparator an alog in put, and by simulati ng the comparator ano ther in put voltage to be measured, through the in troduct ion of the software method can realize the A/D con versi on.8. the Flash memory AT89C2051)Provide a 2KB of si ngle-chip AT89C2051 in Flash memory chips, which allows the online program to modify or use special programming program ming.(1) F lash memory en crypti onAT89C2051 SCM has 2 encryption, can programming (P) or programming (U) to obtain different encryption functionality. Encryption functionality table as shown in table 1-1.En crypt a content erased only through chips to erase operatio n.(2) F lash memory program ming and procedures the piece in side chip AT89C2051 Flash memory program ming.Note:1. the cou nters RESET at an EPROM in side the risi ng edge, and 000H RESET to XTAL1 by foot is executed, pulse count.2. pieces of 10ms to erase PROG pulse.3. during the programming P3.1 pulled low RDY/BSY instructions.(3) A T89C2051 SCM in Flash memory chips program ming steps are as follows:1.in the seque nee is the VCC GND pin, add worki ng voltage, XTAL1 pin RESET, recei ving GND pin, other tha n the above time, wait ing for 10ms.2.In P3.2 pin RESET, heighte ning level.3.In P3.3, P3.4, P3.5, P3.7 pin; add model multilevel.4. P1.0 P1.7 -- for the 000H unit add data bytes.5. RESET to in crease the 12V activati on program ming.6. P3.2 jump to a one byte programming or encryption.7. calibration has been programming, data from 12V to RESET logic level "H" and set P3.3 P3.7 -- for the correct level, and can output data in P1 mouth.8. For the n ext addresses) in the unit XTAL1 byte program ming, a pulse, make address coun ter add 1, in mouth add program ming data.9. programmi ng and calibrati on circuit figure c, d.Figure c program ming circuit Figure d calibratio n circuit Expla nati on:(1) P3.1 duri ng programmi ng in structio ns to be low RDY/BSY,(2) single erasing the PROG 10ms need,(3) internal EEPROM address coun ter on the rising edge RESET, and 000H RESET to XTAL1 by foot pulses are executed.Along with the rapid developme nt of scie nee and tech no logy, huma n society has un derg one earth-shak ing cha nges. Make our life more colorful. I n these cha nges, the remote control tech no logy has bee n widely permeates TV aerospace, military, sports and other producti on, all aspects of life. From the broad sense, all equipped with electric locomotive facility or electrical switches, if feel some n ecessary, can con sider to improve existi ng with remote control device, the operation fixed switch to realize the remote operation of the origi nal equipme nt, stop, the variable, etc. Fun cti on.switch, for example, can be used to control the electric control switch the light switch, We design the infrared remote control system to realize the opponent switch quantity control. Infrared remote characteristic is not in flue nce the surro unding en vir onment and does not in terfere with other electric equipment. Due to its cannot penetrate walls, so the room can use com mon household applia nce of remote con trol without mutual in terfere nce, Circuit testi ng is simple, as long as give n circuit conn ecti on, gen erally does not need any commissioning can work, Decoding easily, can undertake multiple remote con trol.红外遥控人的眼睛能看到的可见光按波长从长到短排列,依次为红、橙、黄、绿、青、蓝、紫。
基于单片机的照明控制系统的中英文文献

The Control System for Lighting Based onSingle–chip MicrocomputerWith the rapid development of electronic technology,the system of control based on Single-chip Microcomputer is widely applied in industry, agriculture, electric power, electron, intelligent building and so on. Microcomputer,as the subject and core of the embedded system of control, replaces the traditional system—electronic circuit. At the same time, the development and maturation of the intelligent building have established the substantial foundation for the popularization and application of the control system for lighting based on single-chip microcomputer.The paper expatiates on the designing theories and implementation method of the control system for lighting by wired or wireless communications.Taking the designing process as mainline,it describes the process of designing from two respects—hardware and software. In another word, the paper describes the process from the method of circuit designing to the software technology of realizing the demanded functions. The host controller of the control system for lighting is based on AT89C51 single-chip microcomputer,and the auxiliary ones are based on AT89C2051. The system can do many jobs, such as wired communication,wireless data transmitting, controlling and display. The paper describes the designing process of the circuit at length, including: keyboard and LED display circuit,RS485 communication circuit, wireless transmitting circuit, control circuit of lighting, watchdog circuit,etc.The designing of software mainly includes the several programming,such as wired communication,wireless data transmitting, lamplight controlling, timed controlling, keyboard scanning and LED displaying. The wired communication programming function is that through Master-slave communication method based on RS485 the host controller sends orders to the all auxiliary controllers or each one, including: turning on lighting, turning off lighting, regulating brightness of lighting, controlling timed lighting, etc.The wireless data transmitting programming function is that by wireless transmitter it realizes wireless controlling of the lighting,and achieves the functions identical to wired communication.Traditional building automatic controlling system only includes such subsystems:comprehensive wires, computer network, safe defending,fire defending and closed-circuits TV monitoring systems and so on. But in the recent years, with the economic development and the progress of the science and technology,people haveput forward more higher demands for energy-conservation of lighting lamps and scientific management,which makes the lighting control system of the classroom have such functions as energy-conservation,convenience,intelligence, etc. What’s more, it can improve the efficiency of the work and study, result in many kinds of lighting effects, and improve the management level.There are the design philosophy of this system,operation principle of every chip, and such relevant problems as the choice, making and debugging of the components and unit circuits about lighting control system of classroom,which regards the micro-control unit as the control core of the system. This control system is suitable for such occasions as various kinds of multimedia classrooms, station waiting rooms, offices, etc. It is mainly composed of lightening control unit, moving sensor unit, illuminative sensor unit, handed-control unit, and so on. The target of the design is intelligent lightening, scientific management,and energy-conservation and cost- conservation. The AT89C2051with the feature of cheap cost has been used as the control unit in the whole design.The whole system not only has been introduced in the paper, but also has been successfully finished with series of the Dais micro-control unit. The experiment suggests that this design can easily come true if the users do as the thesis. So it can be used as the intelligent lighting control system of the university campus.What’s more, it will affect better if combining with other intelligent control systems.LED SummaryLED (Light Emitting Diode), light-emitting diode, is a solid state semiconductor devices, which can be directly converted into electricity to light. LED is the heart of a semiconductor chip, the chip is attached to one end of a stent, is the negative side, the other end of the power of the cathode,the entire chip package to be epoxy resin. Semiconductor chip is composed of two parts, part of the P-type semiconductor,it inside the hole-dominated, the other side is the N-type semiconductor, here is mainly electronic. But linking the two semiconductors,among them the formation of a "PN junction." When the current through the wires role in this chip, will be pushing e-P, P zone in the hole with electronic composite,and then to be issued in the form of photon energy,and this is the principle of LED luminescence.The wavelength of light that is the color of light,is formed by the PN junction of the decisions of the material.LED history50 years ago, people have to understand semiconductor materials can produce light of the basic knowledge, the first commercial diodes in 1960. English is the LED light emitting diode (LED) acronym,and its basic structure is an electroluminescent semiconductor materials, placed in a wire rack, then sealed with epoxy resin around, that is, solid package,Therefore, the protection of the internal batteries can play the role of line, so the seismic performance LED good.LED is the core of the P-type semiconductor and components of the N-type semiconductor chips, the P-type semiconductor and N-type semiconductor between a transition layer, called the PN junction. In some semiconductor materials in the PN junction, the injection of a small number of carrier-carrier and the majority of the extra time will be in the form of light energy to release, thus the power to direct conversion of solar energy. PN junction on reverse voltage, a few hard-carrier injection, it is not luminous.This use of injection electroluminescent diodes is produced by the principle of light-emitting diodes, commonly known as LED. When it in a positive state of the work (that is, at both ends with forward voltage), the current flows from the LED anode, cathode,semiconductor crystals on the issue from the ultraviolet to infrared light of different colors,light and the strength of the currents.Instruments used for the first LED light source instructions, but all kinds of light colored LED lights in traffic and large screen has been widely applied, have a very good economic and social benefits. The 12-inch red traffic lights as an example,is used in the United States have long life, low-efficiency 140 watt incandescent lamp as a light source, it produced 2,000 lumens of white light.The red filter, the loss-90 percent, only 200 lumens of red light. In the light of the new design, Lumileds companies have 18 red LED light source, including the loss of circuit, a total power consumption of 14 watts to generate the same optical effect.Automotive LED lights is also the source of important areas.For general lighting, people need more white light sources. The 1998 white LED successful development.This is the GaN LED chip and Yttrium Aluminum Garnet (YAG) package together cause. GaN chip of the Blu-ray(λ p = 465nm, Wd = 30nm), made of high-temperature sintering of the Ce3 + YAG phosphors excited by this Blu-ray after irradiating a yellow, the peak 550 nm. Blue-chip installed in the LED-based Wanxing reflection in the cavity, covered with a resin mixed with YAG thin layer, about 200-500 nm. LED-based tablets issued by the Blu-ray absorption part of thephosphor, the phosphor another part of the Blu-ray and a yellow light mixed, can be a white. Now, the InGaN / YAG white LED, YAG phosphor by changing the chemical composition of the phosphor layer and adjust the thickness of the 3500-10000 K color temperature can be colored white. This blue LED through the method by white, constructed simple,low-cost,high technology is mature,so use the most.In the 1960s, the use of science and technology workers semiconductor PN junction of The principle of developing a LED light-emitting diodes. At that time, the development of LED, the materials used are GaASP, its luminous color is red. After nearly 30 years of development, and now we are very familiar with the LED, has been sent to red, orange, yellow, green, blue, and other shade. However lighting necessary for white LED light only in recent years to develop,readers here to tell us about lighting with white LED.基于单片机的照明控制系统随着电子技术的飞速发展,基于单片机的控制系统已广泛应用于工业、农业、电力、电子、智能楼宇等行业,微型计算机作为嵌入式控制系统的主体与核心,代替了传统的控制系统的常规电子线路。
单片机智能路灯中英文对照外文翻译文献

单片机智能路灯中英文对照外文翻译文献单片机智能路灯中英文对照外文翻译文献(文档含英文原文和中文翻译)Based on single chip microcomputer intelligent street lightcontrol system【abstract 】 A street light automatic control system design, combined with the control, electric lamp switch control function; And street lamp fault detection and fault street lamp according to the function of the number. Use on STC 89C51 as the core Control unit; Using DS1302 clock chip to control the point open to turn off the lights when street lamps; By a photosensor complete collection of ambient light and street light fault detection, so as to realize the number of optically controlled open to turn off the lights and fault street lamp display. This system Can through the RS - 232 communication port with the street light control room of the upper machine communication.【key words】STC 89C51; Clock chip DS1302; photosensorIntroductionFor the most part at present domestic cities and regions of the street lamp Lighting adopts electric control, time control and single point of electrons Control, maintenance management and manual inspections and the masses The traditional way, because of the lack of scientific and effective monitoring Means, large area lighting during the day, night not large area Light phenomenon occurs frequently, often can't find and in a timely manner Processing, not only caused power resources, human resources Cost, improve the operating costs of the system and to citizens Life bring inconvenience.Intelligent road lighting system can according to different area Domain of different functional requirements, at different times and different every day Natural light or under different traffic flow conditions, the press According to a specific setting, realize dynamic wisdom of road lighting Can management, namely the TPO management (TIME/PLACE, TIME Location/OCCASION occasions). Intelligent road lighting Control system, through the comprehensive consideration and analysis and road Ming is closely related to the intensity of illumination time, road, environment and hand it in Scene control methods of factors such as flow rate, in themicrocomputer According to the preset control strategy, the road lighting into action Street lamp intelligent management and control in different conditions normally In different states implement diversified road lighting scene, To improve the quality of lighting at the same time get the best section Can effect.1. The system hardware designControl circuit mainly to light, temperature signal acquisition, data computing and analysis, and control of street lamp driver circuit according to the results of the operation. Circuit must have MD conversion function, adopt STCl2C5608AD single chip microcomputer as control unit, the single-chip computer as a single clock cycle enhanced 8051 kernel microcontroller, it contains 8 KB FLASH program memory, eight road lO MD conversion interface, can meet the need of data acquisition. Light intensity, temperature sensor using photosensitive resistance and thermal resistance,respectively.Figure 1Figure 2Photosensitive resistor Rx and resistance R2 bleeder circuit, light intensity changes, microcontroller P1.7 pin input voltage changes, and P1.7 pin can be set up for MD conversion interface, set a threshold voltage for light intensity can distinguish between day and night. Thermal resistor Rx and R3 bleeder circuit, the temperature changes, P1.5 pin voltage change, the figure 1 watch NA L/D conversion control circuit green quality can calculate the actual environment temperature and time control to modify parameters. S1 for four dial the code switch, can be used to think.1.1 hardware designSystem hardware modules include: control module, mining Use 89 c51 to realize on STC; Sensor module, Using photosensitive resistance on the surrounding environment light Sample, using photosensitive diode on-off to street lamp equipment Obstacle detection; The clock module, using DS1302 clock chip Slice; Display module, which is made up of four LED digital tube, use To display the fault street lamp number; Sound and light alarm module, Implementation of malfunctioning of the street lamp light hint; Communication moduleBlocks, used to transmit commands from PC.1.2 module functionOn STC 89 c51 based on DS1302 clock chip Provide the clock signal, according to the following time implementation control Turn off the lights.(1) : winter time 18:00 lights at night, The next morning at 7:30 to turn off the lights.(2) age season time: the evening number is turn on the light, The next morning at 6:30 to turn off the lights.(3) in the summer time: 20:00 lights at night, The next morning at 5:30 to turn off the lights.Dynamically changes of this period of time, changes in the operation A machine to complete, through the communication module will hold instructions written to STC 89 c51 chip, then changed the point open to turn off the lights During work time.Photosensitive resistance, by appropriate wavelength of light , the current will along with the increase of light intensity, thus Realize the photoelectric conversion. To die by ADC0832 device Hold number converted to provide single-chip, STC 89c51 according to The default program realize the electric lamp switch function.(1) automatic metering, during the day (or light) When lights go out, night (dark or light) street lights automatically Light up.(2) the sensitivity is adjustable, can adjust according to need Any work under the light.(3) to prevent the instant bright light interference, the AD hoc Delay off function (to strong light, the light switch When 30 seconds to shut down automatically).Photosensitive diode is to use silicon PN knot when the light is produced A photoelectric device, light current work in reverse bias Because of the pressure. During the day light or lamp light photosensitive 2 directly Diode reverse resistance decreases, and diode conduction; Light is very Hours photosensitive diode reverse resistance increases, the diode The check. Using photosensitive diode, detection of street lamp is night Normal work. When the photosensitive diode as shows that street lamp Equipment failure or theft, acousto-optic quote on STC 89 c51 started Alarm device, at the same time in four LED digital tube display the corresponding The street number.2.The system software designThe software design of this system is divided into seven parts, mainly Including the LED digital tube display program design; Light to check the Test program design; Equipment fault detection program design; when Clock driver chip design; Open to turn off the lights program design; Communication program design; Audible and visual alarm program design, etc.Software includes: main program, system initialization, anti-fuzzy functions,A/D conversion subroutine, communication processing subroutine, keyboard processing subroutine, warp/weft clock computing functions, dial the code switch handle child, switch input processing function, the switch quantity output treatment function, display function. MCU software programming to CodeVisionAVR C compiler as a development platform, USES C written in a high-level language.3.TAGUSES the wireless transceiver module and single-chip integration design, can reduce the hardware cost of the system, convenient installation, easy maintenance. Adopt type a 15 STR micropower wireless digital module, high efficiency forward error correction channel coding technology, improves the data the abrupt interference and random interference resistance ability. Using high-speed microcontroller W7E58, improve the measurement precision of the liquid level, simplified the hardware structure of the system. The system not only for level measurement is a kind of safe and effective solutions, can be applied to other material level measurement under the bad environment.Street lamp lighting system is indispensable to the road traffic Facilities, design a kind of intelligent street light control system, right Increase induced by road, improve the driving safety at night And comfort, effectively prevent criminal activity, beautify the environment, Save power resources, has a certain practical significance and can be Development value.References[1], truth, science and technology. 8051 series single chip microcomputer C program design manual [M]. Completely People post and telecommunications press, 2006.[2] realistic technology. Microcontroller peripheral devices and applications [M]. Typical people Posts and telecommunications press, 2006, 2.[3] BianChunYuan, wang zhiqiang. MCS - 51 single chip microcomputer application development practical subroutine [M]. People's posts and telecommunications press, 2005, 9.[4] Shen Gongwei. Based on single chip microcomputer intelligent syste design and implementation [M]. Electronic Industrial press, 2005. m[5] Wan Guangyi, nine sun Ann, Cai Jianping. SOC SCM experiment, practice and should be With design - based on C8051F series [M]. Beijing university ofaeronautics and astronautics Publisher, 2006.[6] Xu Aijun Peng Xiuhua. Keil Cx51 V7.0 microcontroller programming in a high-level language and Mu Vision2 application practice [M]. Beijing: electronic industry press, 2004.[7] blockbuster, special expensive, were yu. Intelligent street light control system design and application research. The modern electronic technology, 2010. (1) : 207-207.[8] kang hua guang, Chen Taiqin. Analog part electronic technology foundation [M]. Beijing: higher education press, 2001.基于单片机的智能路灯控制系统【摘要】设计了一个路灯自动控制系统,具有时控、光控相结合的路灯开关控制功能;以及路灯故障检测并显示故障路灯编号的功能。
外文翻译--基于单片机的照明控制系统-精品

The Control System for Lighting Based onSingle–chip MicrocomputerWith the rapid development of electronic technology, the system of control based on Single-chip Microcomputer is widely applied in industry, agriculture, electric power, electron, intelligent building and so on. Microcomputer, as the subject and core of the embedded system of control, replaces the traditional system—electronic circuit. At the same time, the development and maturation of the intelligent building have established the substantial foundation for the popularization and application of the control system for lighting based on single-chip microcomputer.The paper expatiates on the designing theories and implementation method of the control system for lighting by wired or wireless communications. Taking the designing process as mainline, it describes the process of designing from two respects—hardware and software. In another word, the paper describes the process from the method of circuit designing to the software technology of realizing the demanded functions. The host controller of the control system for lighting is based on AT89C51 single-chip microcomputer, and the auxiliary ones are based on AT89C2051. The system can do many jobs, such as wired communication, wireless data transmitting, controlling and display. The paper describes the designing process of the circuit at length, including: keyboard and LED display circuit, RS485 communication circuit, wireless transmitting circuit, control circuit of lighting, watchdog circuit, etc. The designing of software mainly includes the several programming, such as wired communication, wireless data transmitting, lamplight controlling, timed controlling, keyboard scanning and LED displaying. The wired communication programming function is that through Master-slave communication method based on RS485 the host controller sends orders to the all auxiliary controllers or each one, including: turning on lighting, turning off lighting, regulating brightness of lighting, controlling timed lighting, etc. The wireless data transmitting programming function is that by wireless transmitter it realizes wireless controlling of the lighting, and achieves the functions identical to wired communication.Traditional building automatic controlling system only includes such subsystems: comprehensive wires, computer network, safe defending, fire defending and closed-circuits TV monitoring systems and so on. But in the recent years, with the economic development and the progress of the science and technology, people haveput forward more higher demands for energy-conservation of lighting lamps and scientific management, which makes the lighting control system of the classroom have such functions as energy-conservation, convenience, intelligence, etc. What’s more, it can improve the efficiency of the work and study, result in many kinds of lighting effects, and improve the management level.There are the design philosophy of this system, operation principle of every chip, and such relevant problems as the choice, making and debugging of the components and unit circuits about lighting control system of classroom, which regards the micro-control unit as the control core of the system. This control system is suitable for such occasions as various kinds of multimedia classrooms, station waiting rooms, offices, etc. It is mainly composed of lightening control unit, moving sensor unit, illuminative sensor unit, handed-control unit, and so on. The target of the design is intelligent lightening, scientific management, and energy-conservation and cost- conservation. The AT89C2051 with the feature of cheap cost has been used as the control unit in the whole design.The whole system not only has been introduced in the paper, but also has been successfully finished with series of the Dais micro-control unit. The experiment suggests that this design can easily come true if the users do as the thesis. So it can be used as the intelligent lighting control system of the university campus. What’s more, it will affect better if combining with other intelligent control systems.LED SummaryLED (Light Emitting Diode), light-emitting diode, is a solid state semiconductor devices, which can be directly converted into electricity to light. LED is the heart of a semiconductor chip, the chip is attached to one end of a stent, is the negative side, the other end of the power of the cathode, the entire chip package to be epoxy resin. Semiconductor chip is composed of two parts, part of the P-type semiconductor, it inside the hole-dominated, the other side is the N-type semiconductor, here is mainly electronic. But linking the two semiconductors, among them the formation of a "PN junction." When the current through the wires role in this chip, will be pushing e-P, P zone in the hole with electronic composite, and then to be issued in the form of photon energy, and this is the principle of LED luminescence. The wavelength of light that is the color of light, is formed by the PN junction of the decisions of the material.LED history50 years ago, people have to understand semiconductor materials can producelight of the basic knowledge, the first commercial diodes in 1960. English is the LED light emitting diode (LED) acronym, and its basic structure is an electroluminescent semiconductor materials, placed in a wire rack, then sealed with epoxy resin around, that is, solid package, Therefore, the protection of the internal batteries can play the role of line, so the seismic performance LED good.LED is the core of the P-type semiconductor and components of the N-type semiconductor chips, the P-type semiconductor and N-type semiconductor between a transition layer, called the PN junction. In some semiconductor materials in the PN junction, the injection of a small number of carrier-carrier and the majority of the extra time will be in the form of light energy to release, thus the power to direct conversion of solar energy. PN junction on reverse voltage, a few hard-carrier injection, it is not luminous. This use of injection electroluminescent diodes is produced by the principle of light-emitting diodes, commonly known as LED. When it in a positive state of the work (that is, at both ends with forward voltage), the current flows from the LED anode, cathode, semiconductor crystals on the issue from the ultraviolet to infrared light of different colors, light and the strength of the currents.Instruments used for the first LED light source instructions, but all kinds of light colored LED lights in traffic and large screen has been widely applied, have a very good economic and social benefits. The 12-inch red traffic lights as an example, is used in the United States have long life, low-efficiency 140 watt incandescent lamp as a light source, it produced 2,000 lumens of white light. The red filter, the loss-90 percent, only 200 lumens of red light. In the light of the new design, Lumileds companies have 18 red LED light source, including the loss of circuit, a total power consumption of 14 watts to generate the same optical effect. Automotive LED lights is also the source of important areas.For general lighting, people need more white light sources. The 1998 white LED successful development. This is the GaN LED chip and Yttrium Aluminum Garnet (YAG) package together cause. GaN chip of the Blu-ray (λ p = 465nm, Wd = 30nm), made of high-temperature sintering of the Ce3 + YAG phosphors excited by this Blu-ray after irradiating a yellow, the peak 550 nm. Blue-chip installed in the LED-based Wanxing reflection in the cavity, covered with a resin mixed with YAG thin layer, about 200-500 nm. LED-based tablets issued by the Blu-ray absorption part of the phosphor, the phosphor another part of the Blu-ray and a yellow light mixed,can be a white. Now, the InGaN / YAG white LED, YAG phosphor by changing the chemical composition of the phosphor layer and adjust the thickness of the 3500-10000 K color temperature can be colored white. This blue LED through the method by white, constructed simple, low-cost, high technology is mature, so use the most.In the 1960s, the use of science and technology workers semiconductor PN junction of The principle of developing a LED light-emitting diodes. At that time, the development of LED, the materials used are GaASP, its luminous color is red. After nearly 30 years of development, and now we are very familiar with the LED, has been sent to red, orange, yellow, green, blue, and other shade. However lighting necessary for white LED light only in recent years to develop, readers here to tell us about lighting with white LED.基于单片机的照明控制系统随着电子技术的飞速发展,基于单片机的控制系统已广泛应用于工业、农业、电力、电子、智能楼宇等行业,微型计算机作为嵌入式控制系统的主体与核心,代替了传统的控制系统的常规电子线路。
单片机外文文献翻译(2024)

引言:单片机(Microcontroller)是一种广泛应用于嵌入式系统中的小型计算机芯片。
它集成了处理器核心、存储器、外设接口和时钟电路等核心部件,可以独立运行。
随着全球化的发展,外文文献对于学习和研究单片机领域来说至关重要。
本文翻译的外文文献《MicrocontrollerbasedTrafficLightControlSystem》详细介绍了基于单片机的交通信号灯控制系统。
概述:交通信号灯控制是现代都市交通系统中至关重要的一环。
传统的交通信号灯控制系统通常由定时器控制,不能根据实际交通情况动态调整信号灯的时间。
而基于单片机的交通信号灯控制系统可以实现根据实时交通流量来动态调整信号灯的时间,优化交通效率。
本文将详细介绍该系统的设计和实现。
正文:一、单片机选型1.1.CPU性能:本文选择了一款高性能的32位单片机作为控制核心,它具有较高的处理能力和较大的存储器容量,可以同时处理多条交通路口的信号控制。
1.2.外设接口:该单片机具有丰富的外设接口,可以与交通信号灯、传感器和通信设备等进行连接,实现信号控制和数据交互。
1.3.低功耗设计:为了节约能源和延长系统寿命,在单片机选型时考虑了低功耗设计,降低系统运行的能耗。
二、硬件设计2.1.交通信号灯:在设计交通信号灯时,考虑了日夜可见性和能耗。
采用了高亮度LED作为信号灯光源,同时添加了光敏传感器控制信号灯的亮度,以满足不同时间段的亮度需求。
2.2.传感器:通过安装车辆感应器和行人感应器等传感器,可以在实时监测交通流量的基础上,智能调整信号灯时间,提高路口的交通效率。
2.3.通信设备:在交通信号灯控制系统中引入了通信设备,可以实现各交通路口之间的信息交互和协调控制,提高整体交通系统的效率。
三、软件设计3.1.程序架构:采用了多任务的实时操作系统,将交通信号灯控制、传感器数据处理和通信设备控制等功能分别封装成不同的任务,实现了系统的高效运行和任务调度。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
浙江师范大学本科毕业设计(论文)外文翻译译文:基于AT89C2051的多路舵机控制器设计作者:吴华波钱春来摘要舵机是机器人、机电系统和航模的重要执行机构。
舵机控制器为舵机提供必要的能源和控制信号。
本文提出一种以外部中断计数为基础的 PWM 波形实现方法。
该方法具有简单方便,成本低,可实现多路独立 PWM 输出的优点。
关键词: AT89C2051;舵机;控制器;外部中断;PWM引言:舵机是一种位置伺服的驱动器。
它接收一定的控制信号,输出一定的角度,适用于那些需要角度不断变化并可以保持的控制系统。
在微机电系统和航模中,它是一个基本的输出执行机构。
1 舵机的工作原理以日本 FUTABA S3003型舵机为例,图1是 FUTABA-S3003 型舵机的内部电路。
舵机的工作原理是:PWM 信号由接收通道进入信号解调电路BA6688L 的12 脚进行解调,获得一个直流偏置电压。
该直流偏置电压与电位器的电压比较,获得电压差由BA6688 的 3 脚输出。
该输出送入电机驱动集成电路BAL6686,以驱动电机正反转。
当电机转速一定时,通过级联减速齿轮带动电位器 Rw1旋转,直到电压差为0,电机停止转动。
舵机的控制信号是PWM 信号,利用占空比的变化改变舵机的位置。
2 舵机的控制方法标准的舵机有 3 条导线,分别是:电源线、地线、控制线,如图 2 所示。
电源线和地线用于提供舵机内部的直流电机和控制线路所需的能源,电压通常介于 4~6 V ,一般取5 V。
注意,给舵机供电的电源应能提供足够的功率。
控制线的输入是一个宽度可调的周期性方波脉冲信号,方波脉冲信号的周期为 20 ms(即频率为50 Hz)。
当方波的脉冲宽度改变时,舵机转轴的角度发生改变,角度变化与脉冲宽度的变化成正比。
某型舵机的输出轴转角与输入信号的脉冲宽度之间的关系可用图3来表示。
3 舵机控制器的设计(1)舵机控制器硬件电路设计从上述舵机转角的控制方法可看出,舵机的控制信号实质是一个可调宽度的方波信号(PWM)。
该方波信号可由 FPGA、模拟电路或单片机来产生。
采用 FPGA 成本较高,用模拟电路来实现则电路较复杂,不适合作多路输出一般采用单片机作舵机的控制器。
目前采用单片机做舵机控制器的方案比较多,可以利用单片机的定时器中断实现 PWM。
该方案将20 ms 的周期信号分为两次定时中断来完成: 一次定时实现高电平定时 Th ;一次定时实现低电平定时Tl 。
Th 、Tl的时间值随脉冲宽度的变换而变化但 Th + Tl =20 ms。
该方法的优点是,PWM 信号完全由单片机内部定时器的中断来实现,不需要添加外围硬件缺点是一个周期中的 PWM 信号要分两次中断来完成,两次中断的定时值计算较麻烦;为了满足20ms 的周期,单片机晶振的频率要降低;不能实现多路输出。
也可以采用单片机+8253 计数器的实现方案。
该方案由单片机产生计数脉冲(或外部电路产生计数脉冲)提供给8253 进行计数,由单片机给出8253 的计数比较值来改变输出脉宽该方案的优点是可以实现多路输出,软件设计较简单;缺点是要添加 1 片 8253 计数器,增加了硬件成本。
本文在综合上述两个单片机舵机控制方案基础上,提出了一个新的设计方案,如图4 所示。
该方案的舵机控制器以 AT89C2051 单片机为核心,555 构成的振荡器作为定时基准,单片机通过对555 振荡器产生的脉冲信号进行计数来产生 PWM 信号。
该控制器中单片机可以产生 8 个通道的 PWM 信号,分别由AT89C2051 的 P1.0~P1.7(12~19 引脚)端口输出。
输出的8 路 PWM 信号通过光耦隔离传送到下一级电路中。
因为信号通过光耦传送过程中进行了反相,因此从光耦出来的信号必须再经过反相器进行反相。
方波信号经过光耦传输后,前沿和后沿会发生畸变,因此反相器采用CD40106 施密特反相器对光耦传输过来的信号进行整形,产生标准的 PWM 方波信号。
笔者在实验过程中发现,舵机在运行过程中要从电源吸纳较大的电流,若舵机与单片机控制器共用一个电源,则舵机会对单片机产生较大的干扰。
因此,舵机与单片机控制器采用两个电源供电,两者不共地,通过光耦来隔离,并且给舵机供电的电源最好采用输出功率较大的开关电源。
该舵机控制器占用单片机的1个SCI串口。
串口用于接收上位机传送过来的控制命令,以调节每一个通道输出信号的脉冲宽度。
MAX232 为电平转换器,将上位机的 RS232 电平转换成 TTL 电平。
(2)实现多路 PWM信号的原理在模拟电路中,PWM 脉冲信号可以通过直流电平与锯齿波信号比较来得到。
在单片机中,锯齿波可以通过对整型变量加1 操作来实现,如图5 所示。
假定单片机程序中设置一整型变量其值变化范围为~。
SawVal , 0 N 555振荡电路产生的外部计数时钟信号输入到 AT89C2051 的INT0脚。
每当在外部计数时钟脉冲的下降沿,单片机产生外部中断,执行外部中断INT0的中断服务程序。
每产生一次外部中断,对 SawVal 执行一次加1 操作,若 SawVal 已达到最大值 N ,则对 SawVal 清 0。
SawVal 值的变化规律相当于锯齿波,如图5 所示。
若在单片机程序中设置另一整型变量 DutyVal ,其值的变化范围为 0~N。
每当在SawVal 清 0 时,DutyVal 从上位机发送的控制命令中读入脉冲宽度系数值,例如为 H(0 ≤H ≤N)。
若DutyVal ≥SawVal,则对应端口输出高电平;若 DutyVal <SawVal ,则对应端口输出低电平。
从图 5 中可看出,若改变 DutyVal的值,则对应端口输出脉冲的宽度发生变化,但输出脉冲的频率不变,此即为 PWM波形。
设外部计数时钟周期为 TINT0 ,锯齿波周期(PWM 脉冲周期)为TPWM ,PWM 脉冲宽度占空比为 D,由图5 可得出如下关系:由式(3)可知,PWM 波形的周期 TPWM一旦确定下来,只须选定计数最大值 N,就可以确定外部时钟脉冲所需周期(频率)。
外部时钟脉冲周期 TINT0 显然是 PWM 脉冲宽度变换的最小步距,即调节精度。
由式(4)可知,N 越大,步距所占 PWM 周期的百分比越小,精度越高。
例如,若8采用8 位整型变量,最大值 N = 2 - 1 =255,则精度为1/16(255 +1) =1/256;若采用16 位整型变量,最大值 N = 2- 1 =65 535,则精度为1/65 536。
文中计数变量 SawVal 采用8 位整型变量,因此 N =255。
对于一般应用,其精度已足够。
就舵机而言,要求 TPWM = 20 ms,则可算得外部时钟周期为:因此,设计555 振荡电路时,其输出脉冲的频率应为:当有多个变量与 SawVal 比较,将比较结果输出到多个端口时,就形成了多路 PWM 波形。
各个变量的值可以独立变化,因此各路 PWM 波形的占空比也可以独立调节,互不相干。
多路 PWM 波形的产生如图6 所示。
图中以3 路 PWM 波形为例。
4 舵机控制器软件的设计舵机控制器的控制核心为单片机 AT89C2051。
文中,程序用 C51 编写,工作方式为前后台工作方式。
单片机程序包括系统初始化程序、串口通信程序、上位机命令解释与 PWM 脉宽生成程序和多路 PWM 波形输出程序。
串行通信程序和多路 PWM 波形输出程序采用中断方式。
串口通信格式为波特率 9 600 bps、8 位数据位、1 位停止位、无校验、ASCII 码字符通信。
串口通信程序用于接收上位机发送过来的控制命令。
控制命令采用自定义文本协议,即协议内容全部为ASCII码字符。
通信协议格式如图7 所示。
例如,要控制通道 1 的 PWM 脉宽,脉宽系数为25,则通信协议内容为“#”“1”“0”“2”“5”“!”这6 个字符。
这时通道1 的 PWM 占空比为25/256 =0.098。
一个通道号对应一个 PWM 脉冲输出端口。
本设计为8 个通道,号码为1~8,对应单片机的 P1.0~P1.7。
起始符和终止符起到帧同步的作用。
串口通信程序流程如图8 所示。
图8 中,CHNo 存放的是 PWM 通道号 ASCII 码,Duty100、Duty10、Duty1 分别存放的是脉宽系数的百位数、十位数和个位数的 ASCII 码(注意,若高位数为 0,则该位的字符应为“0”,不能省略。
如25,完整字符应为“0”“2”“5”)。
CharNo 为信号量,用于对串口接收的字符顺序以及串口中断与上位机命令解释程序之间进行同步。
5 舵机控制器实验图9 为舵机控制板输出的其中一路 PWM 波形(带舵机负载)。
从图9 中可看出,舵机控制器输出的 PWM 波形稳定、干净,符合设计要求。
6 结论本文提出的多路舵机控制器设计方法,以单片机AT89C2051 为核心,由外部振荡电路提供 PWM 脉冲的定时基准,控制部分与舵机驱动部分由两个电源供电,两者电气隔离。
这种设计方案的优点是:①PWM 波形由外部振荡电路提供定时基准,与单片机内部振荡器的频率无关,不影响串口通信、定时器等参数的配置。
②PWM波形的调整精度可任意确定。
③本设计思路可应用于任意多路的 PWM 输出,只要单片机能提供足够多的输出端口,例如将AT89C2051换成AT89S51,就可以提供至少24 路的 PWM 输出(P0、P1、P2)。
④控制参数由 SCI串口输入,适应面广,上位机可以是 PC机、单片机或是 PLC。
⑤本方法具有一般性,任何单片机只要能提供 SCI中断、外部中断就可以应用本方法。
参考文献[1] 求是科技.单片机典型模块设计实例导航.北京:人民邮电出版社,2004.[2] 利用单片机PWM 信号进行舵机控制. www. vip998. com/Article/ mcu/ mcuyj/200603/ 237. html.原文:Based on The AT89C2051 Servo Controller DesignAuthor:Huabo Wu Cunlai QianAbstractSteering robot, electrical system, and is the important actuators hog. The controller for steering gear to provide the necessary energy and control signals. This paper proposes a kind of external interruption to count on the basis of PWM waves method. This method is simple and convenient, low cost, can achieve more independent PWM output advantages of road.Keywords: AT89C2051 steering PWM controller external interruptionIntroduction:Steering gear is a kind of position servo drive. It receives some control signal output and certain Angle,applicable to those who need Angle and can keep the control system.In microelectromechanical system and rc, it is one of the basic output actuators.1.The working principle of steering gearIn Japan S3003 FUTABA type steering gear, for example, the figure 1 is the FUTABA - S3003 type steering internal circuitry.The working principle of PWM signal is: by receiving signal demodulating circuit BA6688L channel into 12 feet were demodulated, get a dc bias voltage. The dc bias voltage and comparison, the voltage potentiometer voltage difference of three feet by BA6688 output. The output into motor drive IC BAL6686 to drive motor rotation. When the motor speed through a certain cascade reduction gear drive Rw1 potentiometer, until the voltage difference for 0, the motor stopped rotating. Servo control signal is using PWM signal, SHCH changes of steering gear.2.the steering gear control methodStandard of steering gear with three wires, respectively is: power, ground, line, as shown in figure 2. Power and ground for the internal control circuit of dc motor and the energy needed, voltage usually between 4 ~ 6 V, one As take 5 V. Note that the power supply for steering gear should provide enough power to. Line of input is a pulse width can be adjusted periodically pulse signal, the square of the pulse signal for 20 to 50 ms (i.e. frequency speed). When the pulse width of the pulse change, steering shaft Angle of view, change with the changes of the pulse width is proportional to the change.A type of steering Angle and the input signal output shaft of the relationship between pulse width is available to figure 3.3. the controller design(1)the controller hardware circuit designFrom the Angle of steering gear control method can see, steering gear control signal is an adjustable width of the pulse signal ( PWM ). The pulse signal by the FPGA, analog circuits or microcontroller. Adopted FPGA cost is higher, with analog circuit is complicated circuit to realize multiple output, are generally made of steering gear adopts single-chip microcomputer controller. Now do the one-chip computer controller, can use more scheme of microcontroller timer interrupt realize PWM. The plan will be 20 ms periodic signal is divided into two regularly interrupted: a regular realize high-level timing Th, A regular realize low level timing Tl. Th, the time value of Tl with pulse width of transformation and change but Th + Tl = 20 ms. The advantage of this method is completely by MCU, PWM signal inside the timer interruption to realize, need not add peripheral hardware faults is a cycle of PWM signal to interrupt, two for calculating the interruption twice as a trouble, In order to satisfy the cycle, 20 ms chip to reduce the frequency of crystals, Not realizing multi-way output. Can also adopts singlechip + 8253 counter scheme. The scheme of microcomputer produce counting pulse (or an external circuit counting pulse) to count by MCU, 8253 is compared to the count 8253 output pulse-width change the advantages of the plan is to achieve more ways of output, software design is simple, Defect is to add 1 piece 8253 counter, increase the cost of hardware. Based on the combination of the two microcontroller steering gear control scheme is proposed, based on a new design scheme, as shown in figure 4.The scheme of the controller to AT89C2051 singlechip, consisting of a regular 555 oscillator, SCM based on the pulse signal generated 555 oscillator to generate PWM signal count. This control The SCM can produce eight PWM channels signal, the P1.0 ~ P1.7 by AT89C2051 (12-19 pin) ports output. The eight PWM signal output by light-coupler to lower level isolation circuit. Because the signal transmitted through light-coupler process, so the signals from light-coupler to inverter reverse phase. Pulse signal transmission through light-coupler, frontier and the distortion, so will happen CD40106 schmidt inverter adopts inverter of optical coupling transmission signals, produce plastic PWM signal. Standard torque-current In the process of experiment, steering gear in the operation process of absorbing from power steering gear and current, if share a microcomputer controller, servo will to power of chip. Therefore, the microcomputer controller and power supply, two by two, not to isolate light-coupler through, and the power supply for steering the output power of switch power. The steering gear controller chip occupy 1 SCI serial port. Serial transmission come to accept a PC control commands, to adjust the output signal of each channel pulse width. MAX232 for level of PC converter, will convert TTL multilevel RS232 level.(2)multi-way PWM signal principleIn analog circuits, PWM pulse signal can be through with the sawtooth wave signal dc level compared to get. In the SCM, sawtooth wave can be based on an integer 1 operation to realize, as shown in figure 5. Assuming microcontroller program Set a variable in the value of a range of ~. SawVal, 0 N 555 oscillating circuit of external clock signal input to count the feet. INT0 AT89C2051 Whenever in the external counting down the clock pulse, the microcontroller generate external interruption along, INT0 external interruption of an interrupt service routine. Each time to generate external interruption, SawVal execution time plus 1 operation, if SawVal has reached the maximum N, to SawVal qing 0.SawVal value change rule of the equivalent of sawtooth wave, as shown in figure 5. If the microcontroller program in the whole set of DutyVal variables, the range of 0 ~ N. Whenever SawVal in qing dynasty, from the upper DutyVal 0In order to send machine control input pulse width coefficient values, such as H ( 0 acuities H acuities N ). If DutyVal SawVal p, corresponding to the high power lost ports; If DutyVal < SawVal, the corresponding ports output low level. Can see from figure 5, if change DutyVal value, the corresponding ports output pulse width changes, but the output pulse frequency, this is for PWM waves.Set the clock cycle count for external TINT0, sawtooth wave period ( PWM pulse cycle ) for TPWM PWM pulse width, SHCH as D, figure 5 can draw as follows:By type ( 3 ), TPWM cycle of PWM waves, only once selected counting maximum N, can determine the external clock pulse frequency required cycle ( Frequency ). External clock cycle TINT0 apparently PWM pulse width transform interval, namely, the minimum regulation accuracy. By type(4), N, is occupied the smaller percentage of PWM cycle, higher accuracy. For example, if the eight using 8-bit integer variables, the maximum N = 2-1 = 255, accuracy of 1/16 ( 255 + 1 ) = 1/256, If using 16-bit an integer value, N = 2-1 = 65 535, precision for 1/65 536. The counter variable SawVal using 8-bit integer variables, N = 255. In general, the accuracy of the application is enough. Just as TPWM requirements, steering gear = 20 ms, can calculate external clock cycle for:Therefore, when the oscillating circuit design 555, the output pulse frequency should be:When more than one variable and SawVal comparison, comparing to multiple outputs, formed port multi-channel PWM waves. Variables can be independent of value, so each change of PWM SHCH can also independent regulation, each other. Multiple PWM waves generated as shown in figure 6. Graph 3 road of PWM waves, for example.4. the controller of software designSteering gear control core controller for a single chip microcomputer AT89C2051. This program written by C51 and way of working for QianHouTai way to work. Microcontroller program including system initialization procedures, serial communication program, PC and ordered a PWM pulse-width generating procedures and multi-channel PWM output process. Serial communication program and multiple output program using PWM interruption. Serial communication format for baud rate and 600 BPS, 8 bits of data bits, and stop bits, calibration, ASCII characters. Serial communication program for receiving PC to send over control commands. Control command by custom text content, in which the protocol agreement for the ASCII characters. Communication protocol format, as shown in figure 7.For example, to control the PWM channels 1 pulse width, pulse width coefficient for 25, communication protocol for "#" content "1", "2", "0", "5"!" The six characters. This passage 1 PWM SHCH as 25/256 = 0.098. A channel number corresponds to a PWM pulse output port. This design for 8 channels, the number is 1-8, corresponding to the P1.0 ~ P1.7 chip. Starting and termination of the role play frame synchronization. Serial communication processes as shown in figure 8.Figure 8, CHNo deposit is PWM channels, Duty100, Duty10 ASCII code, and stored Duty1 respectively the pulse width of the coefficient is 100 digits, ten digits and single-digit ASCII ( note, if high digits 0, then it should be "0" the character, not omit. 25, complete characters should be "0" "2" and "five" ). CharNo for signal, used to receive the characters and serial interrupt and superordination machine serial order process between the synchronization.5 .the controller experimentFigure 9 for steering gear control panel output of PWM waves along with servo load ( . ). Can see from figure 9 PWM controller outputs, steering stability, clean, wave meet the design requirement.6 ."theoryIn this paper the steering gear controller design method, as the core, with a single chip microcomputer AT89C2051 by external oscillating circuit provides PWM pulse timing benchmark,control and steering gear drive by two power supply, both electrical isolation. This kind of design scheme is:1 PWM waves from external oscillating circuit chip, and provide timing benchmark internal oscillator frequency, do not affect serial communication, timer and other parameters of the configuration.2 accuracy of PWM waves can be arbitrary.3 this design can be applied to any number of PWM output, as long as SCM can provide enough output port, for example, can change AT89C2051 AT89S51 provide at least 24 PWM output ( P2 ) P0, P1.4 by SCI serial input control parameters, wide adaptability, PC can be PCS, SCM or PLC.This method possesses 5, any microcontroller as long as can provide SCI interrupt and external interruption, this method can be applied.References[1] facts technology. The typical examples of navigation module design chip. Beijing: people's press,2004.[2] microcontroller PWM signal for steering gear control. WWW. /right/MCU McUyj / 200603/237. / HTML.。