版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、 2007 級畢業(yè)(設(shè)計)論文 信息工程學(xué)院 系(院) 電子信息工程 專業(yè) 中英文獻(xiàn)翻譯 題 目 基于超聲波檢測的倒車?yán)走_(dá)設(shè)計(硬件設(shè)計) 學(xué) 生 姓 名 班 級 2007電子信息工程 學(xué) 號 指 導(dǎo) 教 師 日 期 2011 年 03 月 21 日 教 務(wù) 處 訂 制at89c2051 microcontroller instructions1.1 features· compatible with mcs-51 products· 2 kbytes of reprogrammable flash memoryendurance: 1,000 write/erase cy
2、cles· 2.7 v to 6 v operating range· fully static operation: 0 hz to 24 mhz· two-level program memory lock· 128 x 8-bit internal ram· 15 programmable i/o lines· two 16-bit timer/counters· six interrupt sources· programmable serial uart channel· direct led
3、drive outputs· on-chip analog comparator· low power idle and power down modes1.2 descriptionthe at89c2051 is a low-voltage, high-performance cmos 8-bit microcomputer with 2 kbytes of flash programmable and erasable read only memory (perom). the device is manufactured using atmels high dens
4、ity nonvolatile memory technology and is compatible with the industry standard mcs-51 instruction set and pinout. by combining a versatile 8-bit cpu with flash on a monolithic chip, the atmel at89c2051 is a powerful microcomputer which provides a highly flexible and cost effective solution to many e
5、mbedded control applications.the at89c2051 provides the following standard features: 2 kbytes of flash, 128 bytes of ram, 15 i/o lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock ci
6、rcuitry. in addition, the at89c2051 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. the idle mode stops the cpu while allowing the ram, timer/counters, serial port and interrupt system to continue functioning. the power down
7、 mode saves the ram contents but freezes the oscillator disabling all other chip functions until the next hardware reset.1.3 pin configuration 1.4 pin descriptionvcc supply voltage.gnd ground.port 1port 1 is an 8-bit bidirectional i/o port. port pins p1.2 to p1.7 provide internal pullups. p1.0 and p
8、1.1 require external pullups. p1.0 and p1.1 also serve as the positive input (ain0) and the negative input (ain1), respectively, of the on-chip precision analog comparator. the port 1 output buffers can sink 20 ma and can drive led displays directly. when 1s are written to port 1 pins, they can be u
9、sed as inputs. when pins p1.2 to p1.7 are used as inputs and are externally pulled low, they will source current (iil) because of the internal pullups.port 1 also receives code data during flash programming and program verification.port 3port 3 pins p3.0 to p3.5, p3.7 are seven bidirectional i/o pin
10、s with internal pullups. p3.6 is hard-wired as an input to the output of the on-chip comparator and is not accessible as a general purpose i/o pin. the port 3 output buffers can sink 20 ma. when 1s are written to port 3 pins they are pulled high by the internal pullups and can be used as inputs. as
11、inputs, port 3 pins that are externally being pulled low will source current (iil) because of the pullups. port pin alternate functionsp3.0rxd (serial input port)p3.1txd (serial output port)p3.2int0 (external interrupt 0)p3.3int1 (external interrupt 1)p3.4t0 (timer 0 external input)p3.5t1 (timer 1 e
12、xternal input)port 3 also serves the functions of various special features of the at89c2051 as listed below:1.5 oscillator characteristicsxtal1 and xtal2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in figure 1.
13、either a quartz crystal or ceramic resonator may be used. to drive the device from an external clock source, xtal2 should be left unconnected while xtal1 is driven as shown in figure 2. there are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking
14、 circuitry is through a divideby-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.1.6 special function registersa map of the on-chip memory area called the special function register (sfr) space is shown in the table below. note that not all of the addr
15、esses are occupied, and unoccupied addresses may not be implemented on the chip. read accesses. to these addresses will in general return random data, and write accesses will have an indeterminate effect.user software should not write 1s to these unlisted locations, since they may be used in future
16、products to invoke new fea tures. in that case, the reset or inactive values of the new bits will always be 0.1.7 restrictions on certain instructionsthe at89c2051 and is an economical and cost-effective member of atmels growing family of microcontrollers. it contains 2 kbytes of flash program memor
17、y. it is fully compatible with the mcs-51 architecture, and can be programmed using the mcs-51 instruction set. however, there are a few considerations one must keep in mind when utilizing certain instructions to program this device.all the instructions related to jumping or branching should be rest
18、ricted such that the destination address falls within the physical program memory space of the device, which is 2k for the at89c2051. this should be the responsibility of the software programmer. for example, ljmp 7e0h would be a valid instruction for the at89c2051 (with 2k of memory), whereas ljmp
19、900h would not.1. branching instructions:lcall, ljmp, acall, ajmp, sjmp, jmp a+dptrthese unconditional branching instructions will execute correctly as long as the programmer keeps in mind that the destination branching address must fall within the physical boundaries of the program memory size (loc
20、ations 00h to 7ffh for the 89c2051). violating the physical space limits may cause unknown program behavior.cjne ., djnz ., jb, jnb, jc, jnc, jbc, jz, jnz with these conditional branching instructions the same rule above applies. again, violating the memory boundaries may cause erratic execution.for
21、 applications involving interrupts the normal interrupt service routine address locations of the 80c51 family architecture have been preserved.2. movx-related instructions, data memory:the at89c2051 contains 128 bytes of internal data memory. thus, in the at89c2051 the stack depth is limited to 128
22、bytes, the amount of available ram. external data memory access is not supported in this device, nor is external program memory execution. therefore, no movx . instructions should be included in the program.a typical 80c51 assembler will still assemble instructions, even if they are written in viola
23、tion of the restrictions mentioned above. it is the responsibility of the controller user to know the physical features and limitations of the device being used and adjust the instructions used correspondingly.1.8 program memory lock bitson the chip are two lock bits which can be left unprogrammed (
24、u) or can be programmed (p) to obtain the additional features listed in the table below:lock bit protection modes(1) program lock bitslb1lb2protection type1uuno program lock features.2pufurther programming of theflash is disabled.3ppsame as mode 2, also verifyis disabled.note: 1. the lock bits can o
25、nly be erased with the chip erase operation1.9 idle modein idle mode, the cpu puts itself to sleep while all the on-chip peripherals remain active. the mode is invoked by software. the content of the on-chip ram and all the special functions registers remain unchanged during this mode. the idle mode
26、 can be terminated by any enabled interrupt or by a hardware reset.p1.0 and p1.1 should be set to 0 if no external pullups are used, or set to 1 if external pullups are used.it should be noted that when idle is terminated by a hardware reset, the device normally resumes program execution, from where
27、 it left off, up to two machine cycles before the internal reset algorithm takes control. on-chip hardware inhibits access to internal ram in this event, but access to the port pins is not inhibited. to eliminate the possibility of an unexpected write to a port pin when idle is terminated by reset,
28、the instruction following the one that invokes idle should not be one that writes to a port pin or to external memory.1.10 power down modein the power down mode the oscillator is stopped, and the instruction that invokes power down is the last instruction executed. the on-chip ram and special functi
29、on registers retain their values until the power down mode is terminated. the only exit from power down is a hardware reset. reset redefines the sfrs but does not change the on-chip ram. the reset should not be activated before vcc is restored to its normal operating level and must be held active lo
30、ng enough to allow the oscillator to restart and stabilize.p1.0 and p1.1 should be set to 0 if no external pullups are used, or set to 1 if external pullups are used.1.11 programming the flashthe at89c2051 is shipped with the 2 kbytes of on-chip perom code memory array in the erased state (i.e., con
31、tents = ffh) and ready to be programmed. the code memory array is programmed one byte at a time. once the array is programmed, to re-program any non-blank byte, the entire memory array needs to be erased electrically.internal address counter: the at89c2051 contains an internal perom address counter
32、which is always reset to 000h on the rising edge of rst and is advanced by applying a positive going pulse to pin xtal1.programming algorithm: to program the at89c2051, the following sequence is recommended.1. power-up sequence:apply power between vcc and gnd pins set rst and xtal1 to gndwith all ot
33、her pins floating, wait for greater than 10 milliseconds2. set pin rst to h set pin p3.2 to h3. apply the appropriate combination of h or l logic levels to pins p3.3, p3.4, p3.5, p3.7 to select one of the programming operations shown in the perom programming modes table.to program and verify the arr
34、ay:4. apply data for code byte at location 000h to p1.0 to p1.7. 5. raise rst to 12v to enable programming.6. pulse p3.2 once to program a byte in the perom array or the lock bits. the byte-write cycle is self-timed and typically takes 1.2 ms.7. to verify the programmed data, lower rst from 12v to l
35、ogic h level and set pins p3.3 to p3.7 to the appropiate levels. output data can be read at the port p1 pins.8. to program a byte at the next address location, pulse xtal1 pin once to advance the internal address counter. apply new data to the port p1 pins.9. repeat steps 5 through 8, changing data
36、and advancing the address counter for the entire 2 kbytes array or until the end of the object file is reached.10. power-off sequence: set xtal1 to l set rst to lfloat all other i/o pins turn vcc power offdata polling: the at89c2051 features data polling to indicate the end of a write cycle. during
37、a write cycle, an attempted read of the last byte written will result in the complement of the written data on p1.7. once the write cycle has been completed, true data is valid on all outputs, and the next cycle may begin. data polling may begin any time after a write cycle has been initiated.ready/
38、busy: the progress of byte programming can also be monitored by the rdy/bsy output signal. pin p3.1 is pulled low after p3.2 goes high during programming to indicate busy. p3.1 is pulled high again when programming is done to indicate ready.program verify: if lock bits lb1 and lb2 have not been prog
39、rammed code data can be read back via the data lines for verification:1. reset the internal address counter to 000h by bringing rst from l to h.2. apply the appropriate control signals for read code data and read the output data at the port p1 pins.3. pulse pin xtal1 once to advance the internal add
40、ress counter.4. read the next code data byte at the port p1 pins. 5. repeat steps 3 and 4 until the entire array is read.the lock bits cannot be verified directly. verification of the lock bits is achieved by observing that their features are enabled.chip erase: the entire perom array (2 kbytes) and
41、 the two lock bits are erased electrically by using the proper combination of control signals and by holding p3.2 low for 10 ms. the code array is written with all "1"s in the chip erase operation and must be executed before any non-blank memory byte can be re-programmed.reading the signat
42、ure bytes: the signature bytes are read by the same procedure as a normal verification of locations 000h, 001h, and 002h, except that p3.5 and p3.7 must be pulled to a logic low. the values returned are as follows.(000h) = 1eh indicates manufactured by atmel (001h) = 21h indicates 89c2051programming
43、 interfaceevery code byte in the flash array can be written and the entire array can be erased by using the appropriate combination of control signals. the write operation cycle is self-timed and once initiated, will automatically time itself to completion.all major programming vendors offer worldwi
44、de support for the atmel microcontroller series. please contact your local programming vendor for the appropriate software revision.ultrasonic ranging system designpublication title: sensor review. bradford: 1993. vol. abstract:ultrasonic ranging technology has wide using worth in many fields,such a
45、s the industrial locale,vehicle navigation and sonar engineeringnow it has been used in level measurement,self-guided autonomous vehicles, fieldwork robots automotive navigation,air and underwater target detection,identification,location and so onso there is an important practicing meaning to learn
46、the ranging theory and ways deeply. to improve the precision of the ultrasonic ranging system in hand,satisfy the request of the engineering personnel for the ranging precision,the bound and the usage,a portable ultrasonic ranging system based on the single chip processor was developedkeywords:ultra
47、sound r,ranging system,single chip processor1.introductivewith the development of science and technology, the improvement of people's standard of living, speeding up the development and construction of the city. urban drainage system have greatly developed their situation is constantly improving
48、. however, due to historical reasons many unpredictable factors in the synthesis of her time, the city drainage system. in particular drainage system often lags behind urban construction. therefore, there are often good building excavation has been building facilities to upgrade the drainage system
49、phenomenon. it brought to the city sewage, and it is clear to the city sewage and drainage culvert in the sewage treatment system. comfort is very important to people's lives. mobile robots designed to clear the drainage culvert and the automatic control system free sewage culvert clear guarante
50、e robot, the robot is designed to clear the culvert sewage to the core. control system is the core component of the development of ultrasonic range finder. therefore, it is very important to design a good ultrasonic range finder.2. a principle of ultrasonic distance measurement 2.1 the principle of
51、piezoelectric ultrasonic generator piezoelectric ultrasonic generator is the use of piezoelectric crystal resonators to work. ultrasonic generator, the internal structure as shown, it has two piezoelectric chip and a resonance plate. when it's two plus pulse signal, the frequency equal to the in
52、trinsic piezoelectric oscillation frequency chip, the chip will happen piezoelectric resonance, and promote the development of plate vibration resonance, ultrasound is generated. conversely, if the two are not inter-electrode voltage, when the board received ultrasonic resonance, it will be for vibr
53、ation suppression of piezoelectric chip, the mechanical energy is converted to electrical signals, then it becomes the ultrasonic receiver. the traditional way to determine the moment of the echo's arrival is based on thresholding the received signal with a fixed reference. the threshold is chos
54、en well above the noise level, whereas the moment of arrival of an echo is defined as the first moment the echo signal surpasses that threshold. the intensity of an echo reflecting from an object strongly depends on the object's nature, size and distance from the sensor. further, the time interv
55、al from the echo's starting point to the moment when it surpasses the threshold changes with the intensity of the echo. as a consequence, a considerable error may occur even two echoes with different intensities arriving exactly at the same time will surpass the threshold at different moments. t
56、he stronger one will surpass the threshold earlier than the weaker, so it will be considered as belonging to a nearer object.2.2the principle of ultrasonic distance measurement ultrasonic transmitter in a direction to launch ultrasound, in the moment to launch the beginning of time at the same time,
57、 the spread of ultrasound in the air, obstacles on his way to return immediately, the ultrasonic reflected wave received by the receiver immediately stop the clock. ultrasound in the air as the propagation velocity of 340m / s, according to the timer records the time t, we can calculate the distance
58、 between the launch distance barrier (s), that is: s = 340t / 2 3.ultrasonic ranging system for the second circuit design system is characterized by single-chip microcomputer to control the use of ultrasonic transmitter and ultrasonic receiver since the launch from time to time, single-chip selection of 8751,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 網(wǎng)店運(yùn)營合同三篇
- 2025版物業(yè)財務(wù)管理合作協(xié)議范本3篇
- 二零二五年度個人貨車租賃合同范本(含車輛租賃合同附件清單)2篇
- 實現(xiàn)目標(biāo)的關(guān)鍵
- 部編版一年級語文下冊第19課《咕咚》精美課件
- 二零二五年度公共機(jī)構(gòu)行政車輛保養(yǎng)維修服務(wù)協(xié)議書2篇
- 二零二五年度某小區(qū)臨街門面租賃合作協(xié)議書3篇
- 風(fēng)險管理與企業(yè)戰(zhàn)略目標(biāo)的銜接培訓(xùn)
- 社區(qū)行業(yè)保安工作總結(jié)
- 二零二五年度創(chuàng)意市集攤位租賃運(yùn)營合同12篇
- 分割不動產(chǎn)的協(xié)議書(2篇)
- 2025理論學(xué)習(xí)計劃2025年理論中心組學(xué)習(xí)計劃
- 2025年醫(yī)美醫(yī)院公司組織架構(gòu)和業(yè)務(wù)流程
- 兒童流感診療及預(yù)防指南(2024醫(yī)生版)
- 教代會提案征集培訓(xùn)
- 高考語文復(fù)習(xí)【知識精研】《千里江山圖》高考真題說題課件
- 河北省承德市2023-2024學(xué)年高一上學(xué)期期末物理試卷(含答案)
- 山西省2024年中考物理試題(含答案)
- 春節(jié)節(jié)后收心安全培訓(xùn)
- 高中物理斜面模型大全(80個)
- 2025年高考物理復(fù)習(xí)壓軸題:電磁感應(yīng)綜合問題(解析版)
評論
0/150
提交評論