How about a 3 pin solution? It'll cost you a few external chips, but its expandable (and cheap). Ok - all detector inputs come through a bunch of OR gates (small signal diodes) to ONE input. One output pin clocks through cascaded decade counters, each output of which fires up an LED in your light barriers one-at-a-time. The third output resets the counters for guaranteed synchronisation at the start of each cycle. Your software resets the external counter chips and an internal counter is set to 0. You wait a small settling time then read in the value of light barrier #0. Next you pulse the counter clock, increment the internal counter and wait for light barrier #1 to settle. Read #1 and move on to the next . . . Rise time for LEDs is pretty fast, so this would probaly be Ok for around 20 light barriers. For more just parallel the clock and reset to each decade counter and dedicate an input to each set of 10 light barriers connected to each decade counter. Pin count is 2 + (light barriers / 10). You read each input after the settle time then clock all the paralleled counters together. Bye. -----Original Message----- From: Thomas Graf [mailto:piclist@JPYNET.DYNDNS.ORG] Sent: 29 May 2001 08:19 To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]: To few pins Hi! I have the problem that i need about 60 i/o-pins, but i just have a 16c67 and so i just have 33... I have to check a lot of light barriers, so is there something with multiplexing or something? What is a usual way to manage this? ciao -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics