基于单片机与PLC智能家居系统设计报告

上传人:206****923 文档编号:90397310 上传时间:2019-06-11 格式:DOC 页数:11 大小:950.01KB
返回 下载 相关 举报
基于单片机与PLC智能家居系统设计报告_第1页
第1页 / 共11页
基于单片机与PLC智能家居系统设计报告_第2页
第2页 / 共11页
基于单片机与PLC智能家居系统设计报告_第3页
第3页 / 共11页
基于单片机与PLC智能家居系统设计报告_第4页
第4页 / 共11页
基于单片机与PLC智能家居系统设计报告_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《基于单片机与PLC智能家居系统设计报告》由会员分享,可在线阅读,更多相关《基于单片机与PLC智能家居系统设计报告(11页珍藏版)》请在金锄头文库上搜索。

1、relationship, established equivalent relationship 14, and subject: application problem (4)-scores and percentage application problem review content overview answers scores, and percentage application problem of key is: according to meaning, (1) determine standard volume (units 1) (2) find associate

2、volume rate corresponds to relationship, Then in-line solution. Category fraction multiplication word problem score Division applications engineering problem problem XV, a subject: review of the measurement of the amount of capacity, measurement and units of measurement of common units of measuremen

3、t and their significance in rate 1, currency, length, area, volume, unit size, volume, weight and rate. (Omitted) 2, commonly used time units and their relationships. (Slightly) with a measurement units Zhijian of of poly 1, and of method 2, and poly method 3, and of method and poly method of relati

4、onship measurement distance of method 1, and tool measurement 2, and estimates 16, and subject: geometry preliminary knowledge (1)-line and angle review content line, and segment, and Ray, and vertical, and parallel, and angle angle of classification (slightly) 17, and subject: geometry preliminary

5、knowledge (2)-plane graphics review content triangle, and edges shaped, and round, and fan axisymmetric graphics perimeter and area combination graphics of area subject : Preliminary knowledge (3)-review of solid content category 1-d shapes are divided into: cylinder and cone 2, column is divided in

6、to: cuboid, square 3, cone cone of the features of cuboids and cubes relationship between characteristics of circular cone is slightly solid surface area and volume 1, size 2, table .和 PLC课程设计基于单片机与PLC智能家居系统设计与实现一、课题设计目的: 1、家居控制的自动化,智能化; 2、此设计对于家居生活能达到省事又省心的目的; 3、进一步加深对PLC的熟练应用,并有效地与单片机结合运用。 二、课题所用主

7、要元件及作用: 1、光敏电阻:感测光照; 2、湿敏电阻:感测湿度; 3、温度传感器18B20:测量温度; 4、遥控器:遥控窗帘、收衣杆等; 5、单片机:采集并处理传感器数据,予PLC输入信号; 6、PLC:控制家里的一些设备,这里主要用于控制窗户与收衣杆; 三、课题设计功能: 1、晚上自动把衣服收存起来,将窗户及窗帘关上Y9; 2、要是天气下雨,自动把衣服收存起来Y9; 3、白天自动把衣服晾出去Y10; 4、本系统可以遥控调式和自动调式; 5、温度的测试并由数码管显示,当温度高于上限或低于下限时,自动开启空调使室内温度达到一个合适的值。四、课题设计的主要内容:1、梯形图:2、系统示意图:3、原

8、理图:4、单片机程序: 单片机C主要程序程序:#include #include #define uchar unsigned char#define uint unsigned int#define delayNOP() ; _nop_() ;_nop_() ;_nop_() ;_nop_() ; ;uchar code word=0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20;uchar code ditab16=0x00,0x01,0x01,0x02,0x03,0x03,0x04,0x04,0x05,0x06,0x06,0x0

9、7,0x08,0x08,0x09,0x09;uchar code light2=G:,shui3=S:%,tem4=T:.C;uchar code mytab8 = 0x0C,0x12,0x12,0x0C,0x00,0x00,0x00,0x00 ;uchar data display5=0x00,0x00,0x00,0x00,0x00;uchar data temp_data2=0x00,0x00;uint temp;bit presence;uchar a1,a2,a3;sbit ARDA=P10; sbit ARDB=P11;sbit ARDC=P12;sbit EOC=P13;sbit

10、ST=P14;sbit OE=P15;sbit CLK=P16 ;sbit LCD_RS = P20 ; sbit LCD_RW = P21;sbit LCD_EN = P22 ;sbit DQ=P23;sbit jdq0=P24;sbit jdq1=P25;sbit jdq2=P26;sbit beep=P27;void delayms(int ms) unsigned char y ; while(ms-) for(y = 0 ; y250 ; y+) _nop_() ; _nop_() ; _nop_() ; _nop_() ; /*1602*/ bit lcd_busy() bit r

11、esult ; LCD_RS = 0 ; LCD_RW = 1 ; LCD_EN = 1 ; delayNOP() ; result = (bit)(P0&0x80) ; LCD_EN = 0 ; return(result) ; void lcd_wcmd(uchar cmd) while(lcd_busy() ; LCD_RS = 0 ; LCD_RW = 0 ; LCD_EN = 0 ; _nop_() ; _nop_() ; P0 = cmd ; delayNOP() ; LCD_EN = 1 ; delayNOP() ; LCD_EN = 0 ; void lcd_wdat(ucha

12、r dat) while(lcd_busy() ; LCD_RS = 1 ; LCD_RW = 0 ; LCD_EN = 0 ; P0 = dat ; delayNOP() ; LCD_EN = 1 ; delayNOP() ; LCD_EN = 0 ; void lcd_init() delayms(15) ; lcd_wcmd(0x01) ; lcd_wcmd(0x38) ; delayms(5) ; lcd_wcmd(0x38) ; delayms(5) ; lcd_wcmd(0x38) ; delayms(5) ; lcd_wcmd(0x0c) ; delayms(5) ; lcd_w

13、cmd(0x06) ; delayms(5) ; lcd_wcmd(0x01) ; delayms(5) ;void lcd_pos(uchar pos) lcd_wcmd(pos | 0x80) ; /*1602*/void Delay(unsigned int num) while( -num ) ;/*ds18b20*/Init_DS18B20(void) DQ = 1 ; Delay(8) ; DQ = 0 ; Delay(90) ; DQ = 1 ; Delay(8) ; presence = DQ ; Delay(100) ; DQ = 1 ; return(presence) ;

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 中学教育 > 其它中学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号