单片机毕业设计外文翻译---基于 AT89S51 单片机的微型土壤湿度检测仪设计
- 格式:doc
- 大小:219.00 KB
- 文档页数:15
附录附录A: 英文文献与中文参考译文At89S51 monolithic integrated circuit is the low power loss which ATMEL Corporation promotes, the high performance CMOS8 position monolithic integrated circuit, internal including the 4K bytes programmable Flash read-only program memory, the component uses the ATMEL Corporation's high density, the non-volatility storage technology production, compatible standard 8051 command systems and pin, and already may use the online programming (ISP), also the available conventional routes carry on the programming and the general 8 microprocessors in the monolithic integrated circuit chip, the ATMEL Corporation's function is formidable, the low end AT89S51 monolithic integrated circuit provides many high performance-to-price ratios the application situations, but applies nimbly in each kind of control domain, the debugging is convenient.The sensor marched the automobile, medical, the industry and astronautics application domain on a large scale. Perhaps you not yet saw any changes . In safe, convenient, aspect day by day aggregate demands and so on entertainment as well as efficiency factor, in addition from all over the world politics the government office's law will enablesensor's application to obtain the unprecedented inflation.Besides estimated that sensor in wireless and consumable domain application sudden inflation, you will also understand why passed on the feeling producer to finish the rapid development huge market and the application domain hopefully before 2010. In these sensors the majority will be microcomputer electrical system series (MEMS) and the micro system technology (MST) type, as well as application prospect very broad micro sensor. regarding the automobile system, the sensor producer may discover the massive sensing application very easily, not only includes the survey to pass on the feeling pressure, moreover including through sensing system survey inertia, position, proximity, temperature, speed of flow, strength strong , tensity, torque, vibration and inclined condition. Uses in surveying these parameters the sensing technology to be various. Passes to believe with automobile technology center technical personnel Alex Cade that “the automobile domain's sensing demand is assuming the caper type to increase to be long.”He enumerated the chassis control, the vehicles localization/position, the object survey, the vision to strengthen, the automobile environment to heat up , well ventilated, sensor's and so on air conditioning as well as engine and transmission control growth domains. The enhancement vehicles stability is only in numerous example one which his enumerates. US National highway Transportation Administrative bureau (NHTSA) vehicle increased recentlyabout the side collision security aerocyst's proposition request in each steam on the two to six sensors. Although this proposition has not been forced the request use, but American, European and date the this automobile producer indicated that stemming from the security concern, they will finish before 2010 leans for all vehicles installment the surface collision security aerocyst. Certain automobile supplier, like TRW and Delphi ( the latter reaction rate the former quick) apply group of accelerometers and the pressure transmitter in the side collision security aerocyst. the automobile inertia sensing has become other hot spot. In fact, Motorola and Analog Devices () proposed that the use inertia sensor element group will manage massive will use in the vehicles tendency, guidance , the security and the electron steering application sensing function (illustration 1). “the anti-lock braking system, the electronic braking force distribution system, follow the mark control system and of the initiative yaw control system interaction enable the automobile to have the dynamic stability,” Analog Devices said high-level using Engineer Harvey Weinberg. Motorola John P. Schuster adds: “the part group method may use core platform support many kinds of applications. It take astronautics gyroscope as the foundation, and the cost is low, the volume is small, may apply in the automobile.” light sensing technology budding the one kind used in the survey engine pressure by the Optrand development the new method using one kind ofmulti-purpose equipment, this equipment loaded one based on the optical fiber technology's pressure transmitter to use in diesel engine's preheating plug. Forced induction the preheating plug by one induction, a fiber optics and many signal control electronic component is composed, when the pressure surpasses 5 Pakistan , it refers to the frequency changer to be able water-cooled to provide 62% precisions, when the pressure is lower than 5 Pakistan, the error is lower than 0.2 Pakistan. this company estimated that will use this equipment for the first time in 2007. the Honeywell plan uses the light sensing technology in low cost's non-key input's passive system, the part uses this technique the technique the product to be possible to insert automobile's door knob. This sensor will contain one to be loaded with transceiver key shape optics Yuan . In order to enter in the vehicle, the vehicle owner has laid aside a key shape part between the vehicle door knob and the automobile body. the Hall effect sensor will find in the numerous automobile functions applies the place, including induction deceleration and brake pedal's position, cam shaft position and rotational speed, barometric pressure as well as branch pipe absolute pressure (MAP). Infineon Technologies AG application Engineer Werner Roessler believed that active Hall effect sensor available in power transmission control as well as cam and crank and so on related application. “compares with the passive sensor, this has provided the higher accuracy, the better startstrategy, and has surveys the crank to start a position ability,” he said. Melexis the Inc. plan uses in this technology inducing the non-contact position. new induction model the electric field induction use electrode and between them the electric field works. Freescale Semiconductor believed that its may use for to substitute the security aerocyst and other use sensor. “this induction method is helpful in makes the security aerocyst to intellectualize, because had not only considered passenger's forehead position (i.e. forehead whether to move?), moreover had considered passenger's volume and the weight, the aerocyst premature will not open,” Freescale application Engineer Don Laybourn said. this kind of sensor may install, in the border or other places have on electrode's steering wheel, like this may determine that the steering wheel is is loosened otherwise (for example, when a pilot falls asleep or cripples when), will then send out the warning signal. This method type may also let the vehicles with the stop slowly down. the vehicles seat electrode may when the vehicles go determined that in the pilot position nobody's situation carries on the brake to the vehicles. this will prevent the vehicles to enter the out of control condition, for example, when the automobile anchors when the pitch. The glass rain water and accumulates the frost to induce is other one kind of application.参考译文:单片机是ATMEL公司推出的低功耗,高性能CMOS8位单片机,片内含4K bytes 的可编程的Flash只读程序存储器,器件采用ATMEL 公司的高密度、非易失性存储技术产生,兼容标准8051指令系统及引脚,并且既可采用在线编程(ISP),也可用传统方法进行编程及通用8位微处理器于单片机芯片中,ATMEL公司的功能强大,低价位的AT89S51单片机提供许多高性价比的应用场合,可灵活应用于各种控制领域,调试非常方便,使用也非常灵活。
【强烈推荐】基于51单片机的温湿度测量仪_毕业论文重庆邮电大学单片机应用课程设计课设题目:基于单片机的简易温湿度测量仪指导教师:黄老师工作量分数序号姓名班级学号性别(%)夏恒1男20发文女202翻罗春女15 3雪王男15 4琎刘女15 5艺李怡女15 6佳目录要…………………………………………………(1)第2章设计任务分析及方案论证 (1)2.1设计要求 (1)2.2设计方案及其论证 (1)2.3器件选定 (2)2.4 AT89C51单片机 (4)2.5显示部分 (5)第3章电路与程序设计 (6)3.1主控制电路和测温时控制电路 (6)3.2主要模块的电路 (7)3.2.1温湿度采集模块 (7)3.2.2报警模块 (7)3.2.3显示模块 (8)第4章测试方案与测试结果 (10)4.1测试方案及测试条4.2测试结果及其完整性 (10)4.3测试结果分析 (10)结论 (11)心得体会…………………………………………………………12参考文献…………………………………………………………12附录 (13)摘要本次设计是采用MSC-51系列单片机中的AT89C51和DHT11构成的低成本的温湿度的检测控制系统。
单片机AT89C51是一款低消耗、高性能的CMOS8位单片机,由于它强大的功能和低价位,因此在很多领域都是用它。
DHT11温湿度传感器是一款含有已校准数字输出的温湿度复合传感器,传感器包括一个电阻式感湿原件和一个NTC测温元件,该产品具有品质卓越、超快响应、抗干扰能力强、性价比极高等优点。
设计主要包括硬件电路的设计和系统软件的设计。
硬件电路主要包括单片机、温湿度传感器、显示模块、报警器以及控制设备等5部分。
其中由DHT11温湿度传感器及1602字符型液晶模块构成系统显示模块;测温湿度控制电路由温湿度传感器和预设温度值比较报警电路组成;用户根据需要预先输入预设值,当实际测量的温湿度不符合预设的温湿度标准时,发出报警信号(蜂鸣器蜂鸣),启动相应控制。
基于单片机的土壤温湿度检测计设计设计土壤温湿度检测是农业生产中常见的一个问题,可以帮助农民掌握土壤中的环境条件,从而更好地管理农作物的生长环境,提高农作物产量。
本文将基于单片机设计一个土壤温湿度检测计,在介绍设计方案之前,我们先来了解一下土壤温湿度检测的原理和要解决的问题。
1.土壤温湿度检测原理土壤温湿度检测的原理主要是利用温湿度传感器测量土壤温湿度的值。
温湿度传感器通常是通过变化的电阻来测量温湿度的。
当温湿度发生变化时,传感器内部的电阻也会发生相应的变化。
通过连接到单片机的模拟输入引脚,可以将传感器的输出电压转化为数字信号,从而获取温湿度的数值。
2.设计方案基于以上原理,我们可以设计一个基于单片机的土壤温湿度检测计。
设计主要包括以下几个部分:2.1 单片机选择:单片机是控制整个系统的核心部件。
在选择单片机时,首先要考虑单片机的性能和资源是否足够满足我们的需求。
同时,还要考虑单片机的价格和易用性。
常用的单片机有STM32系列和Arduino等。
我们可以根据具体需求选择适合的单片机。
2.2传感器选择:温湿度传感器是关键的部件。
我们可以选择适用于土壤温湿度检测的传感器,如DHT11或DHT22、传感器的选择要考虑到准确性、精度和稳定性等因素。
2.3电路设计:电路设计是整个系统的基础。
首先需要根据所选择的单片机和传感器,设计合适的电路连接,包括连接单片机的引脚、传感器的引脚和其他组件的引脚。
其次,还要设计相应的电源电路,以提供所需的电压和电流。
2.4 程序设计:程序设计是实现功能的关键。
通过编程,我们可以将传感器的输出信号转换为温湿度数值,并将其显示在LCD屏幕上。
在程序设计时,我们可以使用相应的编程语言,如C语言或Python等,根据单片机型号和开发环境选择合适的编译器和开发工具。
3.功能扩展除了基本的土壤温湿度检测功能,我们还可以对设计进行功能扩展,提供更多的便利和实用性:3.1数据存储:设计一个存储功能,可以将土壤温湿度数值存储到存储器中,以便后期分析和比较。
单片机湿度控制器摘要本系统采用AT89C51作为控制系统,通过模拟传感器把湿度信号采集后送给ADC0804,转换成数字信号后送入单片机,再通过LCD1602显示出来,同时独立键盘输入湿度上门限值和下门限值,当湿度值低于下门限值或上门限值时系统驱动蜂鸣器报警和控制电路进行湿度控制,当湿度再次回到两个门限值之间时消除报警和停止湿度控制,本系统实时刷新当前湿度和门限值,适用于大棚,花卉以及家庭湿度检测与控制。
目前工业自动化水平已成为衡量各行各业现代化水平的一个重要标志。
同时,控制理论的发展也经历了古典控制理论、现代控制理论和智能控制理论三个阶段。
智能控制的典型实例是模糊全自动洗衣机等。
关键词:AT89C51,LCD1602,ADC0804,湿度控制与检测Single-chip humidity controllerSummaryThis system used AT89C51 as control system, by simulation sensor to humidity signal collection Hou to ADC0804, conversion into digital signal Hou into single tablets machine, then by LCD1602 displayed out, while independent keyboard entered humidity door limited value and Xia threshold value, dang humidity value below Xia threshold value or door limited value Shi system drive buzzer alarm and control circuit for humidity control, dang humidity again returned to two a threshold value Zhijian Shi elimination alarm and stop humidity control, This system live and refreshes the current humidity threshold values, apply to greenhouse, flower and family and humidity measuring and controllingThe current level of industrial automation has become an important symbol of the measure of all walks of life the level of modernization. The same time, the development of control theory has experienced a classical control theory, modern control theory and the theory of intelligent control in three stages. The typical example of the intelligent control fuzzy automatic washing machine.Keyword:AT89C51,LCD1602,ADC0804,humidity controller目录第一章绪论 -------------------------------------------------------------------------------------- 11.1选题背景及目的----------------------------------------------- 11.2发展状况----------------------------------------------------- 11.3各章节主要内容----------------------------------------------- 3 第2章系统的方案与论证-------------------------------------------- 42.1系统选择论证------------------------------------------------- 42.1.1 单片机控制模块的选择论证------------------------------ 42.1.2 显示模块的选择与论证---------------------------------- 42.2 设计任务及要求--------------------------------------------- 42.3 系统的设计原则--------------------------------------------- 52.4 系统组成与框图--------------------------------------------- 6系统控制结构组成如图2-1 ------------------------------------- 62.5 系统原理设计----------------------------------------------- 62.5.1 AT89C51简介------------------------------------------ 62.5.2 AT89C51管脚说明-------------------------------------- 72.5.3 振荡器特性-------------------------------------------- 92.5.4 时钟电路---------------------------------------------- 92.5.5 复位电路--------------------------------------------- 102.5.6 AD转换电路------------------------------------------ 102.6 湿度传感器------------------------------------------------ 122.6.1 湿敏元件的特性---------------------------------------- 122.6.2 湿敏电阻---------------------------------------------- 122.6.3 湿敏电容--------------------------------------------- 122.6.3 湿度测量的名词术语----------------------------------- 122.7 LCD液晶显示器--------------------------------------------- 13 第三章硬件电路的设计--------------------------------------------- 163.1 湿度传感器与ADC0804连接电路------------------------------ 163.2 LCD电路图------------------------------------------------- 173.3 独立键盘与驱动电路---------------------------------------- 183.4 总体电路设计---------------------------------------------- 18 第四章程序流程图与代码------------------------------------------ 194.1 主要程序流程图-------------------------------------------- 194.2 主要程序-------------------------------------------------- 20 第五章系统的调试与总结------------------------------------------ 215.1 单片机测试------------------------------------------------ 215.2 硬件及软件调试-------------------------------------------- 215.3 整机的调试与测试------------------------------------------ 215.4 综合调试-------------------------------------------------- 22 总结--------------------------------------------------------------- 22 参考文献----------------------------------------------------------- 23 附录一------------------------------------------------------------- 24 附录二------------------------------------------------------------- 38第一章绪论1.1选题背景及目的在工农业生产和日常生活中,对湿度的测量及控制始终占据着重要地位。
附录I参考文献及译文英文资料AT89S51(8-bit Micro controller with 4K Bytes Flash)The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of In-System Programmable Flash memory. The device is manufactured using Atmel's high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with In-System Programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.Features:Compatible with MCS.-51 Products4K Bytes of In-System Programmable (ISP) Flash MemoryEndurance: 1000 Write/Erase Cycles4.0V to5.5V Operating RangeFully Static Operation: 0 Hz to 33 MHzThree-level Program Memory Lock128 x 8-bit Internal RAM32 Programmable I/O LinesTwo 16-bit Timer/CountersSix Interrupt SourcesFull Duplex UART Serial ChannelLow-power Idle and Power-down ModesInterrupt Recovery from Power-down ModeWatchdog TimerDual Data PointerPower-off FlagFast Programming TimeFlexible ISP Programming (Byte and Page Mode)Green (Pb/Halide-free) Packaging OptionThe AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a five-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S51 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 mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset.VCC:Supply voltage (all packages except 42-PDIP).GND:Ground (all packages except 42-PDIP; for 42-PDIP GND connects only the logic core and the embedded program memory).VDD:Supply voltage for the 42-PDIP which connects only the logic core and the embedded program memory.PWRVDD:Supply voltage for the 42-PDIP which connects only the I/O Pad Drivers. The application board MUST connect both VDD and PWRVDD to the board supply voltage.PWRGND:Ground for the 42-PDIP which connects only the I/O Pad Drivers. PWRGND and GND are weakly connected through the common silicon substrate, but not through any metal link. The application board MUST connect both GND and PWRGND tothe board ground.Port 0:Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs.Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode, PO has internal pull-ups.Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification.Port 1:Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (lip) because of the internal pull-ups.Port 2:Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (lip) because of the internal pull-ups.Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX@DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX@RI), Port 2 emits the contents of the P2 Special Function Register.Port 2 also receives the high-order address bits and some control signals duringFlash programming and verification.Port 3:Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (lip) because of the pull-ups.Port 3 receives some control signals for Flash programming and verification.Port 3 also serves the functions of various special features of the AT89S51,as shown in the following table.RST:Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.ALE/PROG:Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.PSEN:Program Store Enable (PSEN) is the read strobe to external program memory.When the AT89S51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPP:External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at OOOOH up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to Vcc for internal program executions.This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming.XTAL1:Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2:Output from the inverting oscillator amplifierSpecial Function Registers:Note that not all of the addresses 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 1 s to these unlisted locations, since they may be used in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0.Interrupt Registers:The individual interrupt enable bits are in the IE register. Two priorities can be set for each of the five interrupt sources in the IP register.Dual Data Pointer Registers:To facilitate accessing both internal and external data memory, two banks of 16-bit Data Pointer Registers are provided: DPO at SFR address locations 82H-83H andDP1 at 84H-85H.Bit DPS=0 in SFR AUXR1 selects DPO and DPS=1 selects DP1. The user should ALWAYS initialize the DPS bit to the appropriate value before accessing the respective Data Pointer Register.Power Off Flag:The Power Off Flag (POF) is located at bit 4 (PCON.4) in the PCON SFR. POF is set to "1”during power up. It can be set and rest under software control and is not affected by reset.Memory Organization:MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed. Program Memory:If the EA pin is connected to GND, all program fetches are directed to external memory. On the AT89S51,if EA is connected to Vcc, program fetches to addresses OOOOH through FFFH are directed to internal memory and fetches to addresses 1000H through FFFFH are directed to external memory.Data Memory:The AT89S51 implements 128 bytes of on-chip RAM. The 128 bytes are accessible via direct and indirect addressing modes. Stack operations are examples of indirect addressing, so the 128 bytes of data RAM are available as stack space. Watchdog Timer (One-time Enabled with Reset-out):The WDT is intended as a recovery method in situations where the CPU may be subjected to software upsets. The WDT consists of a 14-bit counter and the Watchdog Timer Reset (WDTRST) SFR. The WDT is defaulted to disable from exiting reset. To enable the WDT, a user must write 01 EH and OE1 H in sequence to the WDTRST register (SFR location OA6H). When the WDT is enabled, it will increment every machine cycle while the oscillator is running. The WDT timeout period is dependent on the external clock frequency. There is no way to disable the WDT except through reset (either hardware reset or WDT overflow reset). When WDT overflows, it will drive an output RESET HIGH pulse at the RST pin.Timer 0 and 1:Timer 0 and Timer 1 is a 16-bit Timer/Counter.中文翻译AT89S51 (8位微控制单片机,片内含4K bytes可系统编程的存储器)AT89S51是美国ATMEL公司生产的低功耗,高性能CMOS 8位单片机,片内含4k bytes的可系统编程的Flash只读程序存储器,器件采用ATMEL公司的高密度、非易失性存储技术生产,兼容标准8051指令系统及引脚。
基于AT89S52单片机便携式土壤湿度测试仪的设计
师永立;师卫
【期刊名称】《科技情报开发与经济》
【年(卷),期】2011(021)005
【摘要】介绍了一种便携式土壤湿度测试仪的设计方法,设计以单片机和模拟电路为基础的土壤湿度测试系统,阐述了其组成和工作原理.实验结果表明:测试系统具有测量精度高、显示直观、操作方便等特点,可以满足生产实践中的要求.
【总页数】3页(P204-206)
【作者】师永立;师卫
【作者单位】太原理工大学信息工程学院,山西太原,030024;太原理工大学信息工程学院,山西太原,030024
【正文语种】中文
【中图分类】S152.7+1
【相关文献】
1.基于单片机的便携式酒精浓度测试仪设计与实现 [J], 曾当兵
2.基于单片机的土壤湿度测试仪的设计 [J], 曹晴;贾芳;谷小青
3.基于AT89S52单片机的数字网线测试仪设计 [J], 王深
4.基于AT89S52单片机的便携式数字心率计设计 [J], 申玉宏
5.基于单片机AT89S52的网线断点测试仪设计 [J], 徐健
因版权原因,仅展示原文概要,查看原文内容请购买。
附录A 外文翻译——AT89S52/AT89S51技术手册AT89S52译文主要性能与MCS-51单片机产品兼容8K字节在系统可编程Flash存储器1000次擦写周期全静态操作:0Hz~33Hz三级加密程序存储器32个可编程I/O口线三个16位定时器/计数器八个中断源全双工UART串行通道低功耗空闲和掉电模式掉电后中断可唤醒看门狗定时器双数据指针掉电标识符功能特性描述AT89S52是一种低功耗、高性能CMOS8位微控制器,具有8K在系统可编程Flash 存储器。
使用Atmel公司高密度非易失性存储器技术制造,与工业80C51产品指令和引脚完全兼容。
片上Flash 允许程序存储器在系统可编程,亦适于常规编程器。
在单芯片上,拥有灵巧的8位CPU和在系统可编程Flash,使得AT89S52为众多嵌入式控制应用系统提供高灵活、超有效的解决方案。
AT89S52具有以下标准功能:8k字节Flash,256字节RAM,32位I/O口线,看门狗定时器,2个数据指针,三个16位定时器/计数器,一个6向量2级中断结构,全双工串行口,片内晶振及时钟电路。
另外,AT89S52可降至0Hz静态逻辑操作,支持2种软件可选择节电模式。
空闲模式下,CPU停止工作,允许RAM、定时器/计数器、串口、中断继续工作。
掉电保护方式下,RAM内容被保存,振荡器被冻结,单片机一切工作停止,直到下一个中断或硬件复位为止。
引脚结构方框图VCC : 电源GND :地P0口:P0口是一个8位漏极开路的双向I/O口。
作为输出口,每位能驱动8个TTL逻辑电平。
对P0端口写“1”时,引脚用作高阻抗输入。
当访问外部程序和数据存储器时,P0口也被作为低8位地址/数据复用。
在这种模式下,P0具有内部上拉电阻。
在flash编程时,P0口也用来接收指令字节;在程序校验时,输出指令字节。
程序校验时,需要外部上拉电阻。
P1口:P1 口是一个具有内部上拉电阻的8位双向I/O 口,p1 输出缓冲器能驱动4个TTL 逻辑电平。
基于单片机土壤温湿度检测计设计一、引言土壤温湿度是农业生产中非常重要的因素之一,对于农作物的生长和产量有着重要影响。
因此,设计一款能够快速、准确地测量土壤温湿度的检测仪器是十分必要的。
本文将介绍一种基于单片机的土壤温湿度检测计的设计方案。
二、设计方案1.硬件设计硬件设计包括传感器选型、模块连接、显示屏等方面。
传感器选型:土壤温湿度传感器是测量土壤温湿度的核心部件,需要选取性能稳定、精度高的传感器。
常用的土壤温湿度传感器有分布式温湿度传感器、阴极使导湿度传感器等,本设计选择分布式温湿度传感器。
模块连接:将传感器与单片机连接起来,可以通过模拟输入引脚将传感器的输出信号送入单片机进行处理。
同时,可以通过串口或者I2C总线等方式将单片机与显示屏连接,实时显示测量结果。
显示屏:设计中可以选择LED数码管显示屏或者液晶屏来显示温湿度数值。
数码管显示屏更为简单,但是显示效果较差;液晶屏显示效果好,但是需要额外的驱动电路。
2.软件设计软件设计主要是单片机程序的编写,包括传感器数据的读取、处理和显示等功能。
传感器数据的读取:通过单片机的模拟输入引脚读取传感器输出的模拟信号,然后进行模拟到数字的转换。
数据处理:对传感器读取到的数据进行处理,可以进行温度和湿度的校准,然后计算得到最终的温度和湿度数值。
数据显示:将处理后的温湿度数值通过串口或者I2C总线发送给显示屏,并在屏幕上实时显示。
3.功能设计土壤温湿度检测计可以设计以下功能:-实时显示土壤温度和湿度数值;-设置报警功能,当温湿度超过一定范围时,发出警报;-数据存储功能,可以将测量得到的温湿度数据保存到存储芯片中,方便后续分析;-数据通信功能,可以通过串口或者无线方式将测量数据传给上位机,实现数据的远程监测与管理。
三、总结本文介绍了一种基于单片机的土壤温湿度检测计的设计方案,包括硬件和软件设计。
通过选用适当的传感器,并将其与单片机和显示屏连接起来,可以实时、准确地测量土壤温湿度,并通过显示屏显示出来。
毕业设计(外文翻译材料)2011年6 月The design Based on AT89S51 miniature soil humidity detector designAbstract: facilitate master soil moisture conditions, design the miniature soil humidity detector. Its hardware system includes signal amplifier circuit, A/D circuit, SCM, micro LCD display and alarm circuit, etc.; Software system includes A/D conversion driver, LCD driver two modules. Proteus software platform based on the design of the system is simulated, and the results show that the system hardware and software design correct and reliable operation.Keywords: soil humidity; Detector; SCM; A/D conversion; simulationTP202 classification number: ChineseLiterature identification code: ASection 1 IntroductionAgricultural production in the economic development of our country has important position, for farmers Industry production to provide timely and reliablly technical service has become the heavily meteorological department To response one. Along with the national governments at all levels of agricultural production increasingly heavierDepende on the service, my unit also serve for agriculture, promote for increasing farmers' incomeMany studies, the various problems in agricultural production also widely adjustableInquiry. Research found that gardening cultivation, greenhouse flowers, awning vegetables oneSome valuable varieties of soil moisture, soil has a high requirement, humidityAt the time, not only seriously affecting its normal growth, and even cause planting product death Wu, causing serious damage. Farmers Therefore, engaged in this kind of agricultural production.Farmers very need a low cost, small volume and detection reliable soil .Soil humidity detector for water supply, provides the basis. In order to solve the above asked .Our problem, I unit combined with actual conditions of agricultural production, and the related units designedHome of high precision, to design the low cost of miniature soil moisture detection instrument.Along with the social life progress, people's quality of life is getting much more better, flowers has become a fashion. Flowers can not only enrich people's cultural lifeand is good for mental and bodily health ,but also can improve and purify air, improve health. Water is necessary for flower’s growth ,it influences the growthof flowers greatly. Too much water or too little, will affect the normal growth and the kind of flower is verious, Different flowers need different amount of water. The needful water, mostly from the soil, in order to control flowers moisture in the soil properly, using PRO - F soil humidity sensor design an automatic watering the flowers system, it may, automatically set for flowers watering according to the humidity limit, in order to meet the need of imperative water.Section 2 composition of the systemThe whole system consists of SCM, circuit of DAQ, keyboard input and digital display circuit, output controlling circuit etc. circuit of CAQ is made of 4 SRH and adc , SRH makes flower’s soil humidity convert into analog voltage output, adc makes the output of analog voltage convert into digital quantity and send to microcontroller. AT89S52 is adopted, the collectted value of soil humidity is compared with a preset limit soil moisture, and it makes corresponding judgement according to the compared results, to control the output controlling circuit’s action. Key-in is used to set the value of soil humidity’s limit, LED is used to display the current soil humidity’s value.Miniature soil detector signal processing system including soil humidity sensor Device, A/D acquisition circuit, SCM and micro LCD. Its work After cheng is: soil soil wet degrees preach sensor, will wet degrees letter sent to A/D adopt set electricity Road, the A/D conversion, income data digital signal into SCM Processing, finally will processing results sent to micro LCD display.Section 3 the hardware design of system3.1 the circuit’s working principleThe hard thing the original reason system graph as figure 2 shows. This article selects KSC -6V integrated relative humidity sensor, wait for after inserting the soil about 5s make sensorImplement fully contact with the soil, signal by integrated amp LM324 Vin the same phaseInput terminal. The sensor's relative humidity 0% ~ 100% RH, its correspondingOutput is 0 ~ 100mV [1]. According to the integrated amp with phase ratio amplification gain: Kf=R1+ Rf =1+ 47 =48Then the output amplification V0 = 48 analog signal voltage, so output analog, Vi, electric pressure fan letter surrounded is 0 ~ 4.8v. This mode, turn into A/D CH0 slice of replace core general way into line changeover place, have cut to several words AT89S51 single-chip letter Numbers again into data processing and the LCD.3.2 A/D conversion chip choice and controlling principle This article chooses A/D conversion chips for ADC0832, this chip is 8Pin double row straight insert dual channel A/D converter, can separately for both road simulation No real now believe d/a change, can use in the ocl lose into mode and bad points to loseUnder the way of DI server channel selected choose, several according to adopt sets and Data transfer [2].The work of ADC0832 do sequence as shown in figure 3. Root according to our web site, when covariance .ADC0832 did not work, must the piece selected in the high level, the CSWhen chip disabled. When should undertake A/D conversion shall be piece selected end CS offsetsIn low level and maintains to convert over. Chip began to work, still need to make Monolithic machine to core chips, when the clock CLK lose faith in the clock pulse blunt when lose,In the first clock pulse before the sinking DI end must be high electric flat, tablesAnd start signal. In the first 2, 3 pulse sinking DI end before should be lostInto two data used to select channels function. Channels are as follows:(1) the controlled conditionsIn accordance with The Times when DI lost with 1, 0, the only way to do CH0 tong general turned into single wordChange;(2) when DI ordinal input 1, 1, only for single CH1 channel onTao transformation;(3) when DI ordinal 0, 0, will CH0 as is, will CH0 input 0 as its negative input IN CH1 -, as are the input IN +3.3 microcontroller’s choiceMCU is the control of core, compared with the others ,we chose AT89S51 single-chip microcomputer. The advantages of this type of single-chip microcomputer is [3] :(1) The single-chip microcomputer and the 8051 series microcontroller is fully compatible, make it use easily, and into the ten points Cheap;(2)Internal memory can be repeated CaXie by the EEPRROM, be helpful for repeatting modify the program;(3) has the low consumption working methods and to be achieved Off electrical automatic protection;(4) has strong anti-jamming, greatly improving the worthRoyal external electromagnetic interference ability, so it is especially suitable for relatively tough in conditions Under the poor conditions of the job.3.4 The use of LCDUsing micro LCD display device, 1602LCD, its performance point is: workingvoltage only 4.5 ~ 5.5 V; Very low power consumption (work currentOnly 2.0 mA); And reliable work; Small volume (can show 16 x 2 words Operators). Its characters are displayed by internal special displacement function of HD44780 dynamic core slice [4]Quasi ASCII put into their number within department set into reservoir with deposit according to show and editor (DDRAM), inside the ministry accused of line of road will move will word from sheba operators preach send to show, Implement. Monolithic machine and the number of 1602LCD between general P0 into change had to enter line, resistance for P0 mouth R9 R2 ~ the pull-up resistorsSection 4 The software design of the control of systemThis recorder controlling software design adopts modular thought.According to the function,w emake the controlling system software devide into two big modules:(1) ADC0832 driver module, to control the collection of voltage signal;(2) 1602LCD driver module, show soil humidity. This system driver using CLanguage design, its main program is as followsMain (void){unsigned int AD_val;Convert the value after theunsigned int Int, Dec;The converted the integer part and the decimal part/ / storage save A/D/ / points don't store in existencechangeLcdInitiate ();/ / to be liquid crystal early beginning}2)the production of clockWhen the clock points frequency device (after it can have to 4.5 MHz in turn when the change in A/D clock) turn change when idle is empty, the hold after A state in ADCR is written to the START field immediately START 01 (conversion) or the selected edge appear in choice of signal sampling clock can immediately START. This feature can save power consumption. ADC conversion clock computation formula is as followsFADC=FPCK/(CLKDIV+1)Type: Fpclk - core slice; when the clock set After CLKDIV - points of ADC conversion clock frequency.3) interrupted.When DONE bits is 1, A/D conversion module to vector interrupt controller (VIC) issued an interrupt request in the VICIntEnable VIC, if Bit8 (A/D conversion interrupts enabled bits) make can, then can produce the interruption. Read ADDR will reset DONE bits. This paper mainly A/D acquisition C language driver section design is as follows:/***********************************Function: A/D acquisitionEntrance parameters: CH_i/***********************************void AD_Change(unsigned char CH_i){ADC0R = (1 < < CH_i) | / / choose channels I carry A/D acquisition ((Fpclk / 1,000, 000-1) < < 8 | / / set convert clock(0 < < 16)(0 < < 19)| / / BURST = 0, software control conversion operations| / / normal A/D acquisition modes(0 < < 27);| / / decrease along the startup conversionAD0DR; DO = / / read take ADC and fruit, and clear exceptDONE mark bitswhile (1)..}Section5 temperature measuring system of Proteus software simulationTo ensure system on the hardware and software system, reliable work the Proteus software simulation. The basic process is first draw HaoTu 3 illustrates the simulation Electricity by road after Keil soft thing, Ed into the translation and born of dynamic soft thing ec flooding (files) : LPC2131 loaded. And Proteus software environment The simulation results (" + 3V corresponding full amount 30Kpa) the process design of the software and hardware the results show that the system is correctTo ensure that the design of the software and hardware of soil detector is correct this paper designs proteus soft thing into line imitation true. The base this process is first draw had made good figure 2 shows simulation circuit, Keil software compiledby again and to create system driver (" *. Wen pieces ") load: the monolithic machine, and will figure 2 virtual dc voltage signal generator set to 45mV. Then the simulation of voltage: enlarge V0 = 48 x 0.045 = 2.16 V, soil relative humidity should be: RH = 2.16 by 100 = 45% RH. Start the simulation can see 1602LCD in figure 2The simulation results show that the 45.18% RH "(for" the calculation and existing tinyAccording to convert error). The results show that the system software and hardware design are right.Section6 conclusionThis paper introduces some machine oxygen pressure detection adjustment system design of the software and hardware square method. This set with set in A project into A/D turn changing mould pieces of high sexual can LPC2131 chip, tell the plus special A/D acquisition chip, simplified the peripheral circuit design. The system design is simple in structure, reliable in trial has obtained good effect.(1) this design using highly integrated humidity detector A/D conversion chip, SCM and LCD module, greatly simplifying the hardware circuit and significantly reduce the size and cost of A circuit board.(2) electric pressure letter in ADC0832, integrating core piece of work is really is. Ec The most important premise, to ensure reliable of the analog signal collection, collection need before use integrated amp sensor signal amplifier.(3) the loam soil by small, measuring devices body product by pure degree is high and measured this very low, suitable to use of agricultural first production line.(4) the system can shorten Proteus simulation designing cycle, managing hardware investment. The simulation results show that the system design is correct, reliable operationSection 7 References[1] 孙余凯,吴鸣山,项绮明.集成运算放大器实用电路识图[M].北京[2] 李赣平,邵惠鹤.基于ARM 的高精度智能流量变送器的设计[J][3] 冯伟,白瑞林,李祥伟.基于WinCE5.0 的数字式触摸屏驱动程序的开发[J].自动化仪表, 2009,9.[4] 张洪润. 传感器应用设计300 例(上册)[M].北京: 北京航空航天大学出版社, 2006.[5] 徐玮. C51 单片机高效入门[M]. 北京: 机械工业出版社, 2007.[6] 师宝山.基于AT89S51 的多参数气体检测仪的研制[J].微计算机信息, 2007, 7~1.[7] 周坚.单片机轻松入门[M].北京:北京航空航天大学出版社, 2004.基于AT89S51 单片机的微型土壤湿度检测仪设计摘要:为便于掌握土壤的湿度状况,设计了微型土壤湿度检测仪。