GOGOGO高清完整国语,GOGOGO在线观看免费观看完整版高清,GOGOGO免费高清完整,GOGOGO高清在线观看免费视频,GOGOGO日本高清国语完整,GOGOGO免费高清完整版

技術熱線: 4007-888-234

技術支持

串口驅動繼電器

更新時間: 2019-03-23


串口驅動繼電器

Parallel Port Relay Interface



           Below are three examples of controlling a relay from the PC's parallel printer port (LPT1 or LPT2). Figure A shows a solid state relay controlled by one of the parallel port data lines (D0-D7) using a 300 ohm resistor and 5 volt power source. The solid state relay will energize when a "0" is written to the data line. Figure B and C show mechanical relays controlled by two transistors. The relay in figure B is energized when a "1" is written to the data line and the relay in figure C is energized by writing a "0" to the line. In each of the three circuits, a common connection is made from the negative side of the power supply to one of the port ground pins (18-25).



           There are three possible base addresses for the parallel port You may need to try all three base addresses to determine the correct address for the port you are using but LPT1 is usually at Hex 0378. The QBasic "OUT" command can be used to send data to the port. OUT, &H0378,0 sets D0-D7 low and OUT, &H378,255 sets D0-D7 high. The parallel port also provides four control lines (C0,C1,C2,C3) that can be set high or low by writing data to the base address+2 so if the base address is Hex 0378 then the address of the control latch would be Hex 037A. Note that three of the control bits are inverted so writing a "0" to the control latch will set C0,C1,C3 high and C2 low.

404
返回首頁 |  返回上一頁
欢迎光临: 云和县| 岳西县| 桦川县| 汉阴县| 仙桃市| 林西县| 吉隆县| 和政县| 沧州市| 河南省| 阳新县| 郧西县| 孙吴县| 安义县| 抚州市| 高密市| 漯河市| 永吉县| 疏勒县| 宁乡县| 新平| 汤阴县| 奎屯市| 宣汉县| 当涂县| 丹棱县| 关岭| 盐山县| 竹溪县| 麻江县| 体育| 新乡县| 兴海县| 张家港市| 水富县| 体育| 余庆县| 澄江县| 隆昌县| 石嘴山市| 平陆县|