Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Read 16 digital inputs using a PC's serial port

Contributing Author  |   ED Online ID #6404  |   May 12, 1997


Illustrated is an interface circuit that allows a PC to read 16 channels of digital inputs (see the figure). The circuit is connected to the PC’s COM1 serial port directly. The same serial port also powers the circuit so that no additional power supply is needed.

There are four directly accessible input lines (pin 1, 6, 8, and 9) in a RS-232 serial port. These four lines are expanded by two dual four-input multiplexers (IC-1 and IC-2) to accept 16 inputs. The inputs can be on/off switches or open-collector/drain transistors between each input line and ground. Each of the input lines has a 100k pullup resistor to set logic high when the switch is off.

Two output lines (pins 4 and 7) control the selection of the input channels. Each line condition allows the PC to read four input channels under the control of the C program (see the listing). Output pin 4 also provides the power supply for ICs through diode D3. C1 holds the energy to power ICs when pin 4 is low. Once pin 4 is high, C1 will be charged up again. Because the serial port provides both positive and negative current outputs, two Zener diodes (D1 and D2) are used to limit the voltage range of output lines within −0.6 and +5.1 V.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?



POST YOUR COMMENTS HERE
Name:

Email:
Your Comments:

Enter the text from the image below


Please refresh the page if you have trouble reading this text.

Search Electronic Design
     
  
 
Email Newsletter
Sponsored By:
Electronic Design UPDATE provides readers with late-breaking news, opinions from industry experts, and timely technology stories. It's a unique opportunity to get your product message in front of engineers, engineering managers, and corporate managers while they're reading about critical information online.

Enter Email to Subscribe
  
Sponsored By:
 

Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources