You can usually set up both the transmitters and the receivers in the light barriers in two matrices. One matrix turns on a LED while the other senses a phototransistor. Using 24 pins (8x8 + 8x8) you should be able to read 64 barriers. Be sure to make the read pulses long enough, phototransistors used with low light are dog slow. Peter -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.