欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    EM235,温度传感器,RS485通信.pdf

    • 资源ID:46682464       资源大小:627.42KB        全文页数:52页
    • 资源格式: PDF        下载积分:30金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要30金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    EM235,温度传感器,RS485通信.pdf

    ?PLC?PLC?PLC?EM235?PLC?AD?RS485?PLC?EM235?RS485?www.PLC益益AbstractIn the scientific research and production practice in many fields,Temperature controlhas very important position.Especially in food,awning greenhouse,metallurgy,chemicalindustry,building materials,machinery,petroleum and other industrial and agriculturalproduction that plays an important role.Along with the development of electronic andcomputer technology,by original simple logic quantity control,and gradually has thecomputer control system of the function,because in the computing power,anti-interferenceability,response speed,communication networking ability,flexibility and maintainability,and other aspects of the many other advantages,PLC in temperature control system got a lotof use,this paper introduces the design of multi-channel based on PLC temperaturegathering system.In PLC control as the core of multi-channel temperature gathering device,temperaturevoltage signal analogue into the digital quantity through the EM235.PLC is carries on thedata processing for the transformation of the digital by AD.And then by RS485communication to a single chip microcomputer temperature display modules of the display.Key words?PLC?EM235?Temperature sensor?RS485 communicationswww.PLC?.11?.31.1?.31.2?.31.3?.32?.52.1?.52.2 PLC?S7-226CPU.52.2.1 CPU?.52.2.2 CPU?.62.2.3 CPU226?.62.3 EM235?.82.3.1 EM235?.82.3.2 EM235?.82.3.3 EM235?.92.3.4 EM235?.112.4?.132.4.1 Pt100?.132.4.2?.132.4.3?.142.5?.162.5.1?.162.5.2?.162.5.3?.172.5.4?.192.5.5?.192.6?.19www.PLC益药2.6.1Atmega16?.192.6.2 74HC595?.202.7 RS485?.212.7.1 RS485?.212.7.2 S7-200CPU?.223?.233.1?.233.1.1 PLC?.233.1.2?.243.2?.243.2.1?.253.2.2?.263.3?.273.3.1?.273.3.2 PLC?.273.3.3?.284?.30?.32?.33?A?.34?B?.35?C PLC?.36?D?.43www.PLC干?PLC?PLC?Programmable Logic Controller?80?90?PLC?www.PLC?特M往悉成?2?PLC?DCS?PLC?PLC?PLC?PLC?PLC?PLC?PLC?,?;?PLC?,?,?4?48?LED?,?PLC?,?S7-200?EM235?RS485?www.PLC悉度?度子度?S7-200PLC?Pt100?RC?OP07?EM235?AD?PLC?S7-226CPU?RS485?Atmega16?度子形?1.1?素t干嵌嵌?特M往悉成?S7-226CPUAtmega16?JTAGLED?置耦想整成?素t干嵌嵌?干完干?Fig.1.1 Block diagram of the whole system度子总?SIEMENS?S7-200?PLC?A/D?EM235?4?1?A/D?D/A?12?Atmega16?74HC595?LED?www.PLC?特M往悉成?4PLC?CPU?RS485?www.PLC成形?形子度?PLC?S7-226CPU?EM235?RS485?形子形 P示C?S摘-形形择CPUS7-200?PLC?4?6?S7-200?2.1?2.1S7-200?PLC?CPU22X?Tab.2.1 The basic unit of the CPU22X in the series S7-200 PLC?耦操?往嵌嵌点素色往往干接想嵌耦操?往嵌嵌点素色往往往整接往?耦操?往嵌嵌点素色往往想往想干嵌操?耦操?往嵌嵌点素色往往想蓝素往想干接操?耦操?往嵌嵌点素色往往接往想干接操?形子形子度 CPU?往完干 点素色?衰干往解Fig.2.1 CPU configurationPLC?S7-200 CPU226?24?/16?40?I/O?7?248?I/O?35?I/O?26K?6?30kHz?2?20kHz?PID?2?RS485?/?PPI?www.PLC?特M往悉成?6?MPI?I/O?CPU226?2.1?(1)CPU?35mm?(2)?RUN?CPU?CPU?STOP?CPU?TERM?RUN?TERM?Micro/WIN?CPU?形子形子形 CPU?往完往 点素色?Fig.2.2 CPU power supply mode?CPU?2.2?CPU?AC220V?CPU?24V DC?24V DC?CPU?24V DC?24V DC?24V DC?EM235?CPU?24V DC?CPU?220VAC?24V DC?CPU?24V DC?CPU?形子形子总 CPU形形择?2.2 CPU226?Tab.2.2 Performance parameters of CPU226?点素色点素色点素色点素色 往往接往往接往往接往往接 热点尺热点尺热点热点尺热点尺热点热点尺热点尺热点热点尺热点尺热点接特耦操接特耦操接特耦操接特耦操 往干接?往湘热往悉?嵌蓝滤嵌往干接?往湘热往悉?嵌蓝滤嵌往干接?往湘热往悉?嵌蓝滤嵌往干接?往湘热往悉?嵌蓝滤嵌点素色点素色点素色点素色 往往接往往接往往接往往接 湘点尺热点尺湘点尺热点尺湘点尺热点尺湘点尺热点尺?接特耦操接特耦操接特耦操接特耦操 往干接?往滤热往悉?嵌蓝滤嵌往干接?往滤热往悉?嵌蓝滤嵌往干接?往滤热往悉?嵌蓝滤嵌往干接?往滤热往悉?嵌蓝滤嵌www.PLC操益尺精益尺精益尺精益尺精?益尺精?益尺精?益尺精?往想?干接?往成接(干往整?尺干往整?)接想(悉往?尺悉往?)操?操?往想接?接?悉嵌频由z想?往嵌频由z往?往嵌频由z(?热点?)往想?干接?往成接(干往整?尺干往整?)接想(悉往?尺悉往?)操?操?往想接?接?悉嵌频由z想?往嵌频由z往?往嵌频由z(?热点?)?干骚s干嵌骚s干嵌嵌骚s?往成接?想?干接?往悉接?往成接(?)往成接(?)干干往(?特特素置精M)往?干骚s?想?尺?想?往?整?嵌完往往s?往成接?想?干接?往悉接?往成接(?)往成接(?)干干往(?特特素置精M)往?干骚s?想?尺?想?往?整?嵌完往往s?素素益壳 热素尺能?(素素益?)M素益?往?置耦?想整成?晶完接壳 干晶完往?干整操完成频车au里干完往频车au里?干干成完往频车au里?干整操完成频车au里?干嵌嵌嵌?悉整完想频车au里?干往嵌嵌?成嵌?悉往?干往接?悉往?(竟特能置 尺 竟特能蒙)?想?往?往?置耦?想整成?晶完接壳 干晶完往?干整操完成频车au里干完往频车au里?干干成完往频车au里?干整操完成频车au里?干嵌嵌嵌?悉整完想频车au里?干往嵌嵌?成嵌?悉往?干往接?悉往?(竟特能置 尺 竟特能蒙)?想?往?www.PLC?特M往悉成?8(干?素瑞?干?精素)(干?素瑞?干?精素)?往嵌完想?往整完整 药热点干成嵌骚湘(?点素色?往想 药热点)干嵌成嵌骚湘(?往想 药热点)干往湘?往整完整 药热点?整成?往接想 药湘点(想操?接悉 由z)整嵌尺想嵌骚湘(?点素色?干往嵌尺往想嵌 药湘点)悉往嵌尺干接嵌骚湘(?壳干往嵌尺往想嵌 药湘点)形子总 E种形总扩?EM235?4?1?形子总子度 E种形总扩?EM235?2.3?2.3 EM235?Tab.2.3 Technical specification of EM235?想?嵌?干嵌药 嵌?成药 嵌?干药嵌?成嵌嵌骚药嵌?干嵌嵌骚药 嵌?成嵌骚药?干嵌药 成药 往完成药 干药成嵌嵌骚药往成嵌骚药 干嵌嵌骚药 成嵌骚药往成骚药?嵌?往嵌骚湘?悉往嵌嵌嵌?境悉往嵌嵌嵌?嵌?悉往嵌嵌嵌?干往?湘尺热?干?干嵌药?嵌?往嵌骚湘?悉往嵌嵌嵌?境悉往嵌嵌嵌?嵌?悉往嵌嵌嵌?干往?干干?形子总子形 E种形总扩?EM235?2.3?www.PLC晶?往完悉 特M往悉成?衰干往解Fig.2.3 Interconnection diagram of EM235?2.3?X?X?RX?X?X?X?X?A?B?C?D?形子总子总 E种形总扩?(1)?2.4?DIP?EM235?1?6?/?2.4 EM235?1Tab.2.4 Switch installation 1 of EM235特M往悉成?尺?耦蒙干耦蒙往耦蒙悉耦蒙想耦蒙成耦蒙接精竟?精环环?精环环精环环蓝干精环环精竟蓝干嵌www.PLC?特M往悉成?10精竟精环环蓝干嵌嵌精竟精竟?精竟精环环精环环嵌完整精环环精竟精环环嵌完想精环环精环环精竟嵌完往?2.4?DIP?SW6?SW6?ON?SW6?OFF?SW4?SW5?SW1?SW2?SW3?2.4?6?DIP?2.5?2.5 EM235?2Tab.2.5 Switch installation 2 of EM235?耦蒙干耦蒙往耦蒙悉耦蒙想耦蒙成耦蒙接精竟精环环精环环精竟精环环精竟嵌?成嵌骚药干往完成药精环环精竟精环环精竟精环环精竟嵌?干嵌嵌骚药往成药精竟精环环精环环精环环精竟精竟嵌?成嵌嵌骚药干往成u湘精环环精竟精环环精环环精竟精竟嵌?干药往成嵌药精竟精环环精环环精环环精环环精竟嵌?成药干完往成骚药精竟精环环精环环精环环精环环精竟嵌?往嵌骚湘成湘精环环精竟精环环精环环精环环精竟嵌?干嵌药往完成骚药?耦蒙干耦蒙往耦蒙悉耦蒙想耦蒙成耦蒙接精竟精环环精环环精竟精环环精环环往成骚药干往完成药精环环精竟精环环精竟精环环精环环成嵌骚药往成药精环环精环环精竟精竟精环环精环环干嵌嵌骚药成嵌药精竟精环环精环环精环环精竟精环环往成嵌骚药干往成药精环环精竟精环环精环环精竟精环环成嵌嵌往成嵌药精环环精环环精竟精环环精竟精环环干药成嵌嵌药精竟精环环精环环精环环精环环精环环往完成药干完往成骚药精环环精竟精环环精环环精环环精环环成药往完成骚药精环环精环环精竟精环环精环环精环环干嵌药成骚药www.PLC干干6?DIP?EM235?0-10V,?6?DIP?SW1?OFF,SW2?ON,SW3?OFF,SW4?OFF,SW5?OFF,SW6?ON?(2)?OFFSET?GAIN?干?往?CPU?15?悉?想?CPU?成?OFFSET?接?CPU?操?GAIN?32000?整?形子总子?E种形总扩?1?EM235?2.4?12?CPU?ADC?12?0?3?0?ADC?1?8?4?0?1?16?2.4 EM235?Fig.2.4 AIW form of EM235?往?EM235?www.PLC?特M往悉成?12?2.5?12?CPU?DAC?12?0?2.5 EM235?Fig.2.5 AQW form of EM235?悉?AIW0?AIW2?AIW4?AQW0?AQW2?AQW0,?AQW4?2.6?CPU224?4?/4?8?4?/1?8?4?/1?2.6?Fig.2.6 Address of anolog extended blockwww.PLC干悉形子?形子?子度 Pt度00?,?,?(-200?650?)?Pt100?-50 600?Pt?EEPROM?AD?形子?子形?-?,?,?,?,?,?(2.1)?:()001ttRRtt+=(2.1)?,0t?0tR?,?1?,?Pt100,?t=0?,tR=100?t=1t?,tR=1tR,?()111100tRt+=(2.2)?t?PT100?(2.2)?110011=tRt(2.3)?2.7?tR?1R?2R?3R?A?1R?2R?3R?tR?3R?321RRRRt=(2.4)?1R=2R?3R=tR?3R?www.PLC?特M往悉成?14?1t?110031=Rt(2.5)?2.7?Fig.2.7 Platinum resistance temperature measuring principle diagram?2.7?,?()()oaobtRRRRRR+=+321(2.6)?a?b?c?o?obR=ocR=oaR?LR?形子?子总?Pt100?2.4.2?1mA?Pt100?1.5mA?2.8?www.PLC干成Q15CS9014D112V300kR41Res22kR45Res2+5V12P12Pt100104C20Cap14523678U9ADOP07DH1kR42Res21kR39Res250kR46Res2+12V-12V20KR44RPot+5V50kR38Res2?2.8?Fig.2.8 Constant current source type temperature measurement circuit?CS9014?5V?Pt100?OP07?10?EM235?Pt100?1mA?CS9014?Ic?9014?IeIc=(2.7)?D2?2V?Re/UbeIe=(2.8)IbIc=(2.9)RcbUbeVccIb/)(=(2.10)?VVcc5=?mAIeIc1=?VUbe2=?=K2Re?=KRcb300?Re?mAIc1=?0?PT100?100?100?PT100?140?RIU=(2.11)?100-140 mV?CD4051?0-10V?OP07?+U?U?outU?www.PLC?特M往悉成?16()+=UURRUout3946(2.12)?KR5046=?KR139=?()+=UUUout50(2.13)?50?5-7V?形子扩?形子扩子度?10kHz?30MHz?150MHz?形子扩子形?3?1?www.PLC干操?2?3?EMI?形子扩子总?OP07?1?OP07?OP07?OP07?OP07A?25V?OP07?OP07?OP07A?2nA?OP07A?300V/mV?OP07?150V?1.8nA?0.5V/?www.PLC?特M往悉成?18?2V/month?3V?22V?2?+12V75kR40Res2220UFC18Cap2104C19CapAIW014523678U8ADOP07DH-12V20KR43RPot+5VUoUp?2.9?Fig.2.9 Active low pass filtering?RC?1.=ioupUUU(2.14)?RCjCjRCjUUAiou+=+=1111.(2.15)?RCfp2121=?puppuffjAffjA+=+=111.(2.16)?pU.?RC?oU.=pU.?(2.16)?pf=0.01Hz?C=220uF?R=72.34K?75K?www.PLC干晶?0.0096Hz?104?13?形子扩子?EM235?EM235?形子扩子扩?AC-DC?:(1)?(2)?(?0.01HZ)?(3)?形子择?LED?LED?Atmega16?74HC595?LED?形子择子度 Atme铂身度择?AVR?Atmel?RISC?ReducedInstruction Set Computer?CISCwww.PLC?特M往悉成?20?Complicated Instruction Set Computer?AVR?Flash?/?/?AVR?ATmega16?AVR RISC?8?CMOS?CPU?I/O?/?16K?Flash?8?/?16?/?ATmega16?2.10?PB0(XCK/T0)1PB1(T1)2PB2(AIN0/INT2)3PB3(AIN1/OC0)4PB4(SS)5PB5(MOSI)6PB6(MISO)7PB7(SCK)8RESET9PD0(RXD)14PD1(TXD)15PD2(INT0)16PD3(INT1)17PD4(OC1B)18PD5(OC1A)19PD6(ICP)20PD7(OC2)21XTAL212XTAL113GND11PC0(SCL)22PC1(SDA)23PC2(TCK)24PC3(TMS)25PC4(TDO)26PC5(TDI)27PC6(TOSC1)28PC7(TOSC2)29AREF32AVCC30GND31PA7(ADC7)33PA6(ADC6)34PA5(ADC5)35PA4(ADC4)36PA3(ADC3)37PA2(ADC2)38PA1(ADC1)39PA0(ADC0)40VCC10U4ATmega16L-8PI22pFC2Cap Semi22pFC3Cap Semi12Y18MX1X2X1X2S1SW-PBD11N41481KR15Res310uFC4Cap Pol1VCCPB0PB1PB2PB3PB4PB5PB6PB7RESETRESETPD0PD1PD2PD3PD4PD5PD6PD7PA0PA1PA2PA3PA4PA5PA6PA7PC0PC1PC2PC3PC4PC5PC6PC7VCCVCC?2.10Atmega16?Fig.2.10Atmega16 Minimum system形子择子形 摘?HC扩显扩?74HC595?8?SHcp?STcp?www.PLC往干?Ds?Q7?,?8?OE?74HC595?74HC595?2.11?OE13RCLK12SER14SRCLR10SRCLK11QA15QB1QC2QD3QE4QF5QG6QH7QH9VCC16GND8U2SN74HC595N1KR11KR21KR31KR41KR51KR61KR71KR8VCCPB5PB6PB7PB4Q12N3904Q22N3904Q32N3904Q42N3904VCCVCCVCCVCC4.7KR94.7KR104.7KR114.7KR12PA3PA2PA1PA0VCC4.7KR13PA4Q52N3904A11B7C4D2E3F10G5H1W114W213W312W498.8.8.8.8.W58U1DPY_7-SEG5?2.11?Fig.2.11Digital tube drive principle diagram形子摘 RS?数扩?RS485?32?1200m?1200 m?100kb/s?形子摘子度 RS?数扩?1?RS-485?1?+?2-6?V?0?-?2-6?V?RS-232-C?TTL?TTL?2?RS-485?10Mbps?3?RS-485?4?RS-485?4000?3000?RS-232-C?1?RS-485?128?,?RS-485?www.PLC?特M往悉成?22?5?RS-485?RS485?RS485?RS485?DB-9?9?RS485?DB-9?RS485?DB-9?MAX485?2.12?234VCC8167GND5DRABU3MAX485CPAVCCPD0PD1PD7PD71234567891110J1D Connector 90.1uFC11KR14?2.12 RS485?Fig.2.12 RS485 interface circuit形子摘子形 S摘-形00CPU?S7-200?CPU226?2?RS485?PPI?MPI?2.6?2.6 S7-200?Tab.2.6 S7-200 communications mouth pin distribution?素置精环益滤色耦?嵌尺?干干?往往想药?悉置耦?想整成?滤置耦?想整成?滤想?置能耦?能能L?成成药?接境成药境成药?干嵌嵌?操境往想药境往想药整置耦?想整成?湘置耦?想整成?湘晶?干嵌?www.PLC往悉总?EM235?PLC?RS485?PLC?LED?总子度?总子度子度 P示C?PLC?3.1?EM235?PLC?8?3.1 PLC?Fig.3.1 PLC Lord program flow chartwww.PLC?特M往悉成?24总子度子形?PLC?3.2?3.2?Fig.3.2 Main program flow chart of MCU总子形?www.PLC往成?总子形子度?11?1?N?ix(i=1?N)?y?y?()=21minNiixyE(3.1)?=NiixNy11(3.2)?N?N?N?1/N?mmYRYRYRYRY+=221100?2?m?(m?3)?:?m?m?3?y(n)?yH?y(n)=yH(?)?y(n)?yL?y(n)=yL(?)?yL?y(n)?yH?y(n)?www.PLC?特M往悉成?26?(?)?|y(n)-y(n-1)|?y0?y(n);?|y(n)-y(n-1)|?y0?y(n)=y(n-1)?y0?y0?T?y?y0?yH?yL?4?RC?sTsxsyf+=11)()(3.3)?RCTf=?fT?RC?)()()1()(nxnyTnynyTsf=+(3.4)?)1()()1()1()()(+=+=nynxnyTTTnxTTTnysffss(3.5)?0=VD0,VD4/?MOVDVD8,VD12www.PLC往晶/DVD0,VD12/?MOVD+0,VD8/?MOVD+0,VD0/?Network 4LDSM0.0DTIVD12,VW200/?-IVW252,VW200/?0?DIVVW250,VD198/?1?MUL+10,VD196/?10DIVVW250,VD196/10?/1?=1?MOVWVW198,VW160/?10MOVW+0,VW198/?VW198?MUL+10,VD198/?10+IVW160,VW200/?10+?10www.PLC?特M往悉成?30?EM235?PLC?Pt100?OP07?EM235?CPU226?RS485?,?PID?50?PLC?PLC?80?90?PLC?PLC?DCS?PLC?20?50?PID?www.PLC悉干?LabVIEW?LabVIEw?PID?PID?www.PLC?特M往悉成?32?www.PLC悉悉?1?.?PLC?2?.?,2008.2?.?(?2?)M.?:?,2009,1.3?,?,?.?3?.?,2009.4?.?S7-200PLC?.?,2011,25?92-93.5?,?.?.?,2007.6Yung-Hsiang Lu.Comparing System-Level Power Management PoliciesJ.2001 IEEE P10-P18.7?,?.?.?,1998.8?,?.?M.?,2008.9?.?PLC?.?,2006,19(8):29-30.10?,?.?C?M.?,2003.11?,?,?,?.?2?M.?:?,2009,9.12?SIMATIC S7200?2004.13?,?M.?:?,2000.14 Simodrive 611 universal control components for closed-loop speed control and positioning functionmanual Z.SIEMENS AG,2008.15 Atmel?Atmega16?2004.16?.Protel DXP?M.?:?,2002.17?,?.?.?,2010,2(18):59-63.18 Ostrirov,VN.Experience of design and application of the complete energy saving electric drives insystems of towns water supply and feculence water pumpJ.Elektrichestvo,2003(4):68-71www.PLC?特M往悉成?34?A?X62X41X3X74VCC16X55EN6X013VEE7GND8X312C9B10A11X215X114U6CD4051BCVCC12VEEX0X1X2X3X4X5X6X7220UFC7Cap2104C8CapVEEQ0.0Q0.1Q0.2Q0.3AIW275kR21Res2+12V14523678U9ADOP07DH-12V20KR24RPotVCC1234P3Header 4Q6CS9014D22V300kR192kR25+5V12P4Pt100+12V75kR18220UFC5104C6104C9AIW014523678U7ADOP07DH-12V20KR22+5V14523678U8ADOP07DH1kR201kR1750kR26+12V-12V20KR23+5V50kR16Q8CS9014D42V300kR332kR40+5V12P6Pt100104C1114523678U11ADOP07DH1kR341kR3050kR39+12V-12V20KR36+5V50kR28X0Q7CS9014D32V300kR312kR38+5V12P5Pt100104C1014523678U10ADOP07DH1kR321kR2950kR37+12V-12V20KR35+5V50kR27X1www.PLC悉成?B?PB0(XCK/T0)1PB1(T1)2PB2(AIN0/INT2)3PB3(AIN1/OC0)4PB4(SS)5PB5(MOSI)6PB6(MISO)7PB7(SCK)8RESET9PD0(RXD)14PD1(TXD)15PD2(INT0)16PD3(INT1)17PD4(OC1B)18PD5(OC1A)19PD6(ICP)20PD7(OC2)21XTAL212XTAL113GND11PC0(SCL)22PC1(SDA)23PC2(TCK)24PC3(TMS)25PC4(TDO)26PC5(TDI)27PC6(TOSC1)28PC7(TOSC2)29AREF32AVCC30GND31PA7(ADC7)33PA6(ADC6)34PA5(ADC5)35PA4(ADC4)36PA3(ADC3)37PA2(ADC2)38PA1(ADC1)39PA0(ADC0)40VCC10U3ATmega16L-8PI22pFC3Cap Semi22pFC4Cap Semi12Y18MX1X2X1X2S1SW-PBD11N41481KR14Res310uFC2Cap Pol1VCC234VCC8167GND5DRABU4MAX485CPAVCCPB0PB1PB2PB3PB4PB5PB6PB7RESETRESETPD0PD1PD2PD3PD4PD5PD6PD7PA0PA1PA2PA3PA4PA5PA6PA7PC0PC1PC2PC3PC4PC5PC6PC7OE13RCLK12SER14SRCLR10SRCLK11QA15QB1QC2QD3QE4QF5QG6QH7QH9VCC16GND8U2SN74HC595N1KR11KR21KR31KR41KR51KR61KR71KR8VCCPB5PB6PB7PB4Q12N3904Q22N3904Q32N3904Q42N3904VCCVCCVCCVCC4.7KR94.7KR104.7KR114.7KR12PA3PA2PA1PA0VCCVCCTCK1GND2TDO3VCC4TMS5RST6VCC7NC8TDI9GND10P1JTAGPC2PC4PC3PC5VCCGNDGNDVCCPD0PD1PD7PD71234567891110J1D Connector 90.1uFC11KR15VCC4.7KR13PA4Q52N3904A11B7C4D2E3F10G5H1W114W213W312W498.8.8.8.8.W58U1DPY_7-SEG5123P?Header 3FG3N2L1+5V4COM15-5V6+12V7COM28湘点?热点?-12V91010U?AC-DCGNDGND+5V-5V-12V+12Vwww.PLC?特M往悉成?36?C P示C?www.PLC悉操www.PLC?特M往悉成?38www.PLC悉晶www.PLC?特M往悉成?40www.PLC想干www.PLC?特M往悉成?42www.PLC想悉?D?main.c#include config.h/?volatile uint tvalue=0;/?,?volatile uchar flag=0;/?volatile uchar rece_data3=0;/?volatile uchar disp_data5=0;/?unsigned char n=0;/?const uchar LedData=0 xc0,0 xf9,0 xa4,0 xb0,0 x99,0 x92,0 x82,0 xF8,0 x80,0 x90,0 x88,0 x83,0 xc6,0 xa1,0 x86,0 x8e;/?0-F?const uchar LedData1=0 x40,0 x79,0 x24,0 x30,0 x19,0 x12,0 x02,0 x78,0 x00,0 x10,0 x08,0 x03,0 x46,0 x21,0 x06,0 x0e,0 x87;/?0-F,t?/*/?#pragma interrupt_handler usart_rx_isr:12/?12?void usart_rx_isr(void)rece_datan=UDR;/?n+;if(n=3)flag=1;/?n=0;tvalue=(rece_data1 8)|rece_data2;/?/*void port_init(void)/?PORTA=0 x00;/PA?DDRA=0 xff;www.PLC?特M往悉成?44PORTB=0 x00;DDRB=0 xff;/PB?PORTC=0 xff;/?DDRC=0 x00;PORTD=0 xff;DDRD=0 x02;/?/*void init_devices(void)/?MCUCLI();/?MCUCR=0 x00;MCUCSR=0 x80;/?JTAGGICR=0 x00;port_init();/?usart_init();/?SEI();/?/*void identifier_judg(void)/?switch(rece_data0)case 0 xff:disp_data0=16;disp_data1=0;break;case 0 xf1:disp_data0=16;disp_data1=1;break;case 0 xf2:disp_data0=16;disp_data1=2;break;case 0 xf3:disp_data0=16;disp_data1=3;break;case 0 xf4:disp_data0=16;disp_data1=4;break;case 0 xf5:disp_data0=16;disp_data1=5;break;case 0 xf6:disp_data0=16;disp_data1=6;break;case 0 xf7:disp_data0=16;disp_data1=7;break;case 0 xf8:disp_data0=16;disp_data1=8;break;default:break;/*www.PLC想成void extract(void)/?disp_data2=tvalue/100;/?disp_data3=tvalue%100/10;/?disp_data4=tvalue%10;/?/*void display(void)/?PORTA=0 x01;hc595send(LedData1disp_data0);/?thc595store();/?delay_ms(5);PORTA=0 x02;hc595send(LedData1disp_data1);hc595store();/?delay_ms(5);PORTA=0 x04;hc595send(LedDatadisp_data2);hc595store();/?delay_ms(5);PORTA=0 x08;hc595send(LedData1disp_data3);hc595store();/?delay_ms(5);PORTA=0 x10;hc595send(LedDatadisp_data4);hc595store();/?delay_ms(5);/*void main(void)www.PLC?特M往悉成?46init_devices();/?while(1)if(flag=1)void identifier_judg();/?extract();/?flag=0;display();/?uart.c#include config.h/?void usart_init(void)/?UCSRB=0 x00;/?UCSRA=0 x00;UCSRC=BIT(URSEL)|0 x06;/?:8?,1?,?/?UBRRL=(FOSC/BAUD/16-1)%256;/?9600BITUBRRH=(FOSC/BAUD/16-1)/256;UCSRB=0 x98;/?/*void uart_transmit(unsigned char input_char)/?while(!(UCSRA&(1UDRE);/?UDR=input_char;/?/*unsigned char uart_receive(void)/?www.PLC想操while(!(UCSRA&(1RXC);return UDR;74hc595.c#includeconfig.h/?.c?config.h?void hc595send(uchar x)/HC595?uchar n,temp;for(n=0;n8;n+)/?8?temp=x&0 x80;/?if(temp!=0)/?0PORTB|=(1PB5);/PB5?1hc595shift();/?else/?0PORTB&=(1PB5);/PB5?0hc595shift();/?x=1;/?7?/*void hc595store(void)/?PORTB|=(1PB4);/?PB4?PB4?/?PORTB&=(1PB4);/?void hc595shift(void)/?PORTB|=(1PB7);/?PB7?PB7?www.PLC?特M往悉成?48/?PORTB&=(1PB7);/?/?config.h#ifndef _config_H_/?#define _config_H_#include/?#include#include delay.h/?#include us

    注意事项

    本文(EM235,温度传感器,RS485通信.pdf)为本站会员(赵**)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开