Page last updated: 21/10/2012
Clocked Serial I/O 16 Opto Inputs
Provide parallel inputs via a serial port.
Low software / firmware overhead.
Simple design using readily available components.
Low power consumption.
A small and compact design.
Circuit descriptionHere is shown the basic concept in block diagram form for 8 bits of input derived from 3 bits of I/O on the associated microcontroller, to add a further bits of input (as with the final design shown later) at no additional cost in terms of I/O on the microcontrollers part, further shift registers are simply cascaded. In practise there are three primary factors limiting how many devices that can be cascaded, increasing drive requirements, increasing capacitance, and software overhead as more devices are added - reducing the possible data transfer rate, thus taking more time to move data between the microcontroller and shift registers.
Now onto the inputs. If the input signals are TTL compatible the they can be connected directly to thee data inputs of the shift register, however be aware of potential problems arising from a circuit running on a different power supply. One of the better option is shown opposite, an opto coupler. There are numerous devices available, from individual devices in a 4 pin package, to larger packages containing multiple devices. In my design shown later I have used several TL191's for no other reason than I had a tube full of them, were I buying new devices I might have chosen a quad opto package.
Serial 16 Opto Inputs schematic:
Serial 16 Opto Inputs component placement / layout:
Serial 16 Opto Inputs PCB bottom trace:
Included here are some drivers I wrote for the PIC12F509 microcontroller. Three versions, the original in which both input and output devices were implemented, and two cut down versions one for input devices only and one for output devices only. The original realised 32 bits of input and 32 bits of output from five lines I/O on the microcontroller.
Combined I/O driver CKSIO.ASM
Input only driver CKSIOinput.ASM
Output only driver CKSIOoutput.ASM
Further to the details of the pages above - the original CAD files created using EAGLE PCB Design software are included below, along with associated PDF files of both schematics and PCB layouts suitable for printing directly.
To use the original CAD files, they must be opened with EAGLE. Visit the CADsoft web site for more details, the software (including a freeware version), part libraries, tutorials, for EAGLE are available.
Serial 16 Opto Inputs schematic PDF
Serial 16 Opto Inputs PCB component layout PDF
Serial 16 Opto Inputs PCB bottom track layout PDF
Serial 16 Opto Inputs EAGLE schematic
Serial 16 Opto Inputs EAGLE board