机电类毕业论文1.doc_第1页
机电类毕业论文1.doc_第2页
机电类毕业论文1.doc_第3页
机电类毕业论文1.doc_第4页
机电类毕业论文1.doc_第5页
已阅读5页,还剩32页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

毕业设计(论文)报告题 目 基于单片机数字时钟制作的研究院 (系)别 中德机电学院.专 业 机电一体化 .班 级 机电0902 .学 生 姓 名 沙 勇 .学 号 10091580 .指 导 教 师 唐 亦 敏 . 2012年4 clue of 1.1 introduction in the current single chip has penetrated into every field of life, almost hard to find any area of single chip no footprints. missile navigation device, the plane on various kinds of instrument control, computer network communication and data transmission, industrial automation process real-time control and data processing, the extensive use of all kinds of intelligent ic card, civilian luxury car security system, video, video camera, automatic washing machine control, and spc toys, electronic pets, all of these cannot leave the microcontroller. not to mention the automatic control system of intelligent instruments, robot, medical equipment. therefore, the study of single chip, the development, and the application will create a number of computer application, and intelligent control of the engineers and scientists. the more advanced the science and technology, the intelligent the more things. seems learning mcu is the inevitable result of social development needs. scm namely single chip computer, also known as micro controller, its small size, the function is strong, good reliability and cheaper, become traditional industrial technology innovation and new products renewal ideal varieties, has broad prospects for development, one of the most representative is the 8051 series single chip intel company. in this paper based on the study of the single chip microcomputer to at89c51 as the core control chip, to digital electric clock for the design and application of its theory through thorough analysis and study the at89c51 single-chip microcomputer constitutes the realization method of digital electric clock and introduced the design principle and method, give a digital clock software design. considering the disturbance to the existence of the influence of the system, the software and hardware design from two aspects are analyzed, and the corresponding measures to improve the anti-interference ability of the system. 1.2 to choose a background now on the market sell digital electric clock and its main function is dependent on digital circuit the function module combination to fulfill. these digital clock chip combination and connections can be difficult, and welding process is more complex, relative cost is higher, in order to overcome these shortcomings, and can fit a variety of situations, so the graduation design chose to use on the single chip computer programming based digital electric clock to meet the needs of more people. this is mainly through software programming to complete, so you reduce the complexity of the hardware circuit, and the cost is reduced, get rid of the digital circuit design of complex bring circuit, the welding process is complicated, the higher cost disadvantage. to design digital electric clock fully mining of the single chip computer resources and operation control ability. has the function is much, show the advantages. . 2 single chip structure the single chip microcomputer 8051 include the central processor, program memory (rom), data memory (ram), time/counter, parallel interface, serial interface and interrupt system and so on several big unit and the data bus, the address bus and control bus, the three big bus, now respectively to illustrate: the central processor: the central processing unit (cpu) is the core component of the single chip microcomputer, is 8 bits of data wide command and scheduling the whole unit degrees processor, can deal with eight binary data or code, the cpu is responsible for control, coordinate system work, complete the operation and control of input and output functions and other operational 2. data memory (ram) : 8051 internal has 128 eight user data storage unit and 128 special register units, which is unified addressing, special register can only be used to store data control instruction, users can only access, and cannot be used to store data, so customers can use ram only 128, can deposit, speaking, reading and writing data, the middle of the operation result or user defined word list. program memory (rom) : 8051 4096 eight mask exposure rom, used to store the user program, the raw data or form. timing/counter (rom) : 8051 has two 16 bit programmable timing/counter, in order to achieve timing or count for control program to produce interrupt. parallel input/output (i / 0) mouth: 8051 altogether 4 group eight i / 0 mouth (p0, p1, p2 and p3), used for external data transmission. full-duplex serial mouth: 8051 built-in a full-duplex serial communication mouth, used to with other equipment serial data transfer between the, the serial port can be used for both the asynchronous communication transceiver, also can when synchronous shift implement use. interrupt system: 8051 has the perfect interrupt function, two external interruption, two time interrupt, can meet different control requirements, and has a level 2 priority level of choice. the clock circuit: 8051 built-in highest frequency up to 12 mhz clock circuit, used to produce the whole scm operation of the pulse timing, but 8051 single chip microcomputer to external oscillation capacitance. the structure of the single chip microcomputer there are two kinds, one kind is program memory and data storage separate form, namely harvard (harvard) structure of the 8051 series microcontroller. intel by the harvard of the form, the structure of the subsequent product 16 8096 series single chip used the princeton structure. mcu is a kind of integrated circuit chip, using the technology with large scale data processing ability (such as arithmetic operations, logic operations, data transfer, interrupt handling) of the microprocessor (cpu), random access data memory (ram), read only memory (rom) program, input/output circuit (i / 0 mouth), may also include timing counter, serial communication mouth (sci), display driver circuit (lcd or led drive circuit), pulse width modulation (pwm), circuit (simulated road converter and more than a/d converter circuit such as integrated into a single chip, constitute a minimum however perfect computer system. these circuit in software can under the control of the accurate, rapid and efficient program designers set to complete the task of this view, scm. a microprocessor doesnt have function, it can complete modern industrial control alone for the intelligent control function, this is the biggest single chip features. however microcontroller is different from single trigger, chip in no development, it just before the strong function have very large scale integrated circuit, if give it specific procedures, it is one of the smallest, complete micro computer control system, its single trigger or personal computer (pc) the distinction that having essence, the application of the single chip microcomputer chip level application, need to belong to the structure of the single chip microcomputer chip users understand the instructions and system, and other applications of integrated circuits technology and system the needs of design theory and the technology, with such specific chip design application, so that the chip has a specific function 3. different scm has different hardware features and software features, which is that they are not the same technical characteristics, hardware features depends on the single chip microcomputer chip, the internal structure of the user to use a single chip microcomputer, must know this type of product meets the need of the function and application system requirements of the characteristic parameters. heres a technical features include the functional characteristics, control characteristic and electrical characteristics and so on, these information from manufacturers need to get the technical manuals. software features is refers to the instruction system characteristics and development support environment, instructions that we are familiar with single-chip characteristics of addressing mode, data processing and logical process method, input/output characteristics and the requirements, etc. development support environment including instruction of compatible and portability, support the software (including can support the development of the application software resources) and hardware resources. to use a certain type of single chip microcomputer develop their own application system, to master its structure characteristics and technical features is a must. single-chip microcomputer control system can be replaced by complex electronic circuit or before digital circuit consists of the control system, the software control can to achieve, and to realize intelligent, now single-chip microcomputer control category is everywhere, such as communication products, household appliances, intelligent instruments, process control and special control device and so on, the application field of single chip microcomputer more and more widely. admittedly, the single chip microcomputer application meaning far not limited to its application category or with the economic benefit from this, more important is it has fundamentally changed the traditional control method and design thought. control technology is a revolution, is an important milestone. 2.2.1 program memory 8051 has 64 kb program storage addressing space, it used to store the user program, data and form and other information. for without the rom 8031 single chip inside, it must be external program memory address space for 64 kb, at this time of the single chip microcomputer ea must be grounded and forced from outside the cpu program memory read program. for the rom 8051 single chip microcomputer and normal operation will need to meet high level, make the cpu first from the interior of program storage read the program, when the pc value more than internal rom capacity, they will turn to external program memory read program. there were 8051 pieces of the storage unit 4 kb program, its address for ooooh-offfh, microcontroller start reduction, the content of the program counter for ooooh, so the system will begin to carry out the program from ooooh unit 4. but in some of the special program storage unit, this in use should take note: one group of special unit is ooooh-0002 h unit, the system restoration, pc for ooooh, microcontroller ooooh unit from begin to carry out the program, if the program is not from ooooh unit started, should be in the three units for a unconditional jump instruction, let the cpu go directly to execute user specified programs. another group of special unit is 0003 h-002 ah, this 40 units each have use, they are evenly divided into five sections, they are defined as follows: 0003 h-000 ah external interruption 0 break address area ooobh-0012 h time/counter 0 interrupt site area. 0013 h-001 ah external interruption 1 break address area 001 bh-0022 h time/counter 1 interrupt site area. 0023 h-002 ah serial break address area more than 40 unit of visible is used exclusively for the interrupt handlers address unit, the interrupt response, according to interrupt type automatic transfer to their interrupt area to the execution procedures. therefore the above address unit cannot be used to store the other program content, only for the interrupt service routine. generally, each segment of only eight address unit is cant save complete the interrupt service routine, and thus the general also in response to address area was interrupted a unconditional jump instruction, pointing to the other real program memory store the interrupt service routine space to perform, such interruption after response, the cpu read this transfer instructions article, turned to other place to continue the interrupt service routine. 2.2.2 data storage data storage is also known as random access memory data 2. of 8051 single chip computer data storage in physics are points and logic for two address space, a is the internal data storage area and an external data storage area. 8051 128 256 or internal ram byte of user data storage, they are used to store the execution of the intermediate results and process data. 8051 data storage are both, part of the unit can be a addressing. 8051 internal ram there are 256 units, the 256 units is divided into two parts. one is from ooh-7 fh address unit (a total of 128 bytes) for user data ram. from the 80 h-ffh address unit (and 128 bytes) for special register (sfr) units. in ooh-1 fh of 32 elements of is evenly divided into four pieces, each containing eight eight registers, all with ro-r7 to name, often say these registers for general-purpose registers. internal ram 20 h-2 fh unit for a addressing area, either as general unit with byte addressing, may also to their bit addressing. a addressing area there are 16 bytes, 128 bits, a address ooh-7 fh. 2.2.3 special function registers special function registers (sfr), also known as special register, special function registers reflect the single chip microcomputer 8051 operation. many functions also through the special function registers to define and control 7 8. 8051 there are 20 special function registers, they are discrete distribution within the ram in 80 h-ffh address, the hosting of function has made the special stipulation, the user cant modify the structure. the program counter pc (program counter) : it does not belong to the special internal data memory piece of pc is a 16 bit counter, used to store a command to run address, addressing scope for 64 kb pc has to be automatic add 1 function, which finished the execution of an instruction, its content to be automatic plus one. pc itself and no address, and therefore not addressing, users can, speaking, reading and writing, but can be by transfer, calls, return to change its content and instructions, to control procedures according to the requirement to carry out. accumulators acc (accumulator) : is a the most commonly used special register, most of the single operation instruction of a number of operation from accumulators, a lot of operation instruction of a number of operating number also taken from accumulators. add, subtract, multiply and divide operation instruction, operation results are stored in an accumulator a or ab accumulators to. most of the data operation will be through a accumulators 8051 single chip microcomputer instruction 2.2.4 timing timing is use to describe the timing of the unit, the unit of the succession of the 8051 there are four, they were beats, and state, machine cycle and the instruction cycle, the next explained respectively. the beat and state: the oscillation pulse cycle is defined as the beat (for the convenience of description, with p says), oscillation frequency pulse after dichotomy is then get the whole scm systems of work the clock signal, put the clock signal cycle defined as state (in s said), such a state have two beat, the first half of the cycle of the corresponding beat defined as 1 (p), half a cycle after the corresponding beat defined as 2 (p). machine cycle: 8051 have fixed machine cycle, regulations, a machine cycle has six state, respectively, said s1- s6 . and a state contains two beat, so a machine cycle will have 12 beat, can remember sip2, sip2. s6p1, s6p2, a machine cycle of these 12 oscillation pulse, namely machine cycle is oscillation pulse frequency 12 points, obviously, if use 6 mhz clock frequency, a machine cycle that is 2 us, and such as the use of 12 mhz clock frequency, a machine cycle is lus. the instruction cycle: to execute a directive need time is called an instruction cycle, 8051 instructions single-byte, double byte and three bytes of, so their instruction cycle is not the same, that they are the machine cycle is not same, may include one to four vary machine cycle. 8051 the instructions of the timing: 8051 command system, according to their length can be divided into single-byte instructions, double byte instructions and three bytes instructions. the time needed to carry out these instructions is different, also is the machine cycle for them is different, have the following form: single-byte order machine cycle; single-byte command double machine cycle; double byte order machine cycle; double byte command double machine cycle; three bytes command double machine cycle; single-byte instructions four machine cycle (such as single-byte mentalistic method instruction). single-byte single cycle instructions: single-byte single cycle instructions just once read operation instructions, when the second ale signal effectively, the pc is not add 1, read or the original instructions, belong to an invalid read operation. double byte single cycle instructions: these instructions two ale signal are effective, just the first ale is effective signal read operation codes, the second ale signal when the operation is effective read several. single-byte double cycle instructions: two machine cycle to read operation instructions four times, but only once read operation is effective, the last three of read operation are invalid operation. single-byte double cycle instructions have a special kind of situation, like movx these instructions, perform these instructions, first read the instructions in rom, then external data memory read or write operation, head of a machine cycle first read the instructions for the effective operation codes, and the second reading instruction is invalid operation. in the second the instruction cycle, the external data memory access, at this moment, ale its operations without signal effects, which wont have read instructions operation action. external program memory (rom) read timing: 8051 external program memory read sequence chart po mouth when provide low eight address, p2 mouth provide high e

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论