中文字幕无码不卡一区二区三区_少妇被又大又粗又爽毛片久久黑人_91精品国产在热久久无毒不卡_久久久久久亚洲综合网站

技術(shù)熱線(xiàn): 4007-888-234

專(zhuān)注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命

提供開(kāi)發(fā)工具、應(yīng)用測(cè)試 完善的開(kāi)發(fā)代碼案例庫(kù)分享

從全面的產(chǎn)品導(dǎo)入到強(qiáng)大技術(shù)支援服務(wù) 全程貼心伴隨服務(wù),創(chuàng)造無(wú)限潛能!

技術(shù)支持

串口驅(qū)動(dòng)繼電器

更新時(shí)間: 2019-03-23


串口驅(qū)動(dòng)繼電器

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
返回首頁(yè) |  返回上一頁(yè)
油尖旺区| 温州市| 元谋县| 秭归县| 新源县| 揭东县| 教育| 九龙城区| 陵川县| 达孜县| 屏山县| 石泉县| 林周县| 开平市| 潜江市| 防城港市| 探索| 镇坪县| 罗江县| 日土县| 康马县| 盖州市| 昌吉市| 盐亭县| 长治市| 康马县| 多伦县| 泸州市| 宾阳县| 德令哈市| 马鞍山市| 贺兰县| 阜新| 磐石市| 辉南县| 平果县| 福海县| 高平市| 义乌市| 桦川县| 潢川县|