欢迎来到天天文库
浏览记录
ID:53127204
大小:176.50 KB
页数:10页
时间:2020-04-01
《基于单片机的智能路灯控制系统.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、元件清单名称型号数量(个)单片机AT89S521RS-232标准串口设计的接口电路MAX2321串口DB91光耦MOC30521双电压比较器LM3931稳压管LM78051变压器220V转9V1二极管IN40072三极管90131可控硅BTA081LED灯发光二极管1灯泡220V40W的白炽灯1滑动变阻器100K1光敏电阻LG44162电阻1001330110K51K1150K2电容103110421054电解电容10pF210uF11000uF/25F12200uF/25F1P1.01P1.12P1.23P1.34P1.45P1.5/MOSI6P
2、1.6/MISO7P1.7/SCK8RST9P3.0/RXD10P3.1/TXD11P3.2/INT012P3.3/INT113P3.4/T014P3.5/T115P3.6/WR16P3.7/RD17XTAL218XTAL119GND20A8/P2.021A9/P2.122A10/P2.223A11/P2.324A12/P2.425A13/P2.526A14/P2.627A15/P2.728PESN29ALE/PROG30EA/VPP31P0.7/AD732P0.6/AD633P0.5/AD534P0.4/AD435P0.3/AD336P0.2/A
3、D237P0.1/AD138P0.0/AD039VCC40U1AT89S52D3IN4007L1LEDR11KR21KC1104C2104C5104Vin1GND2Vout3U5LM7805R310KR8100R410KVCC213T1BTA081264U2MOC3052C10103R6330R7330VCCC1+1V+2C1-3C2+4C2-5V-6T2out7R2in8R2out9T2in10T1in11R1out12R1in13T1out14GND15VCC16U4MAX232C6105C7105C9105C8105162738495J1DB
4、9VCCVCCR510KS1SW-PBVCCC1230pFC1330pF12J29VVCCOUTPUTA1IUTPUTA+2IUTPUTA-3GND4IUTPUTB-5IUTPUTB+6OUTPUTB7VCC8J3LM393R1010KR14150KR910KR11150KVCC12J4220VR13100KR15100KC31000uF/25VC42200uF/25VY111.0592MU3LAMPC1110uFQ190135VR16LRR12LR1234J5K1PrivateDeclareSubSleepLib"Kernel32"(ByVald
5、wMillisecondsAsLong)'通信DimcommflagAsBooleanDimcommstr(0To3)AsByte'灯泡状态true亮false灭DimlightstateAsBoolean'故障指示灯状态true亮false灭DimerrorledstateAsBoolean'联机指示DimconnectionAsBooleanDimconfigAsString//当点击“联机”按钮时或动其他按钮时,如果计算机和硬件未连接,会出现”端口打开错误”的命令窗口;如果计算机和硬件连接了,会出现”系统已联机”的字样。PrivateSubC
6、ommand1_Click()OnErrorGoTooutIfNotconnectionThenMe.MSComm1.CommPort=Me.Combo1.ListIndex+1Me.MSComm1.PortOpen=TrueIfMe.MSComm1.PortOpen=FalseThenMsgBox"端口打开错误",vbOKOnly,"错误"Elseconnection=NotconnectionMe.Label8.Caption="系统已联机"Me.Label8.ForeColor=RGB(255,0,0)Me.Command1.Caption=
7、"断开"commstr(0)=&HFFcommstr(1)=&H1commstr(2)=&H0commstr(3)=commstr(0)Xorcommstr(1)Xorcommstr(2)commflag=TrueMe.MSComm1.Output=commstrEndIfElseconnection=NotconnectionMe.MSComm1.PortOpen=FalseMe.Label8.Caption="系统未联机"Me.Label8.ForeColor=RGB(255,255,255)Me.Command1.Caption="联机"li
8、ghtstate=Falseerrorledstate=FalseMe.lederror(0).FillColor=RGB
此文档下载收益归作者所有