Randie Ohtsji [4555] wrote (quoting Rob Bristow): >> I have been advised by a local contractor to use the MC14094 shift >> register for the output multiplexer as I need to latch the values on >> the port. He also advised the 74HC597A as an input multiplexer. The >> idea Yeah, fine, but I would be looking at the 74HC4094 version to ensure the clocking speed. You don't want the higher voltage range of the 4000 series part with a PIC system. The HC versions also have much greater drive capability. On consideration however, neither of these is likely to be an interface problem to a 4MHz PIC. > How about using 74HC589s for the input multiplexer. The 74HC589's > serial output can be tri-stated. The 74HC165 is also a parallel to > serial shift register that can be used for the inputs. These parts appear to differ only in the provision of extra little functions; clock enables, complement outputs, double-buffering, register clear lines and tri-state function which both the 4094 and the HC589 (specs of this latter chip not on the SGS-Thompson site: http://www.st.com/stonline/books/pdf/menu/06040100.htm ) have. All of these are superfluous. You may think that it would be useful to have the output tri-stated but in fact it isn't. The catch-22 is that you need an extra PIC pin to control the tri-state function. In which case, it is just as easy to dedicate that extra pin to the data input function from the shift register, which is simpler, and then you have no need for the tri-state function anyway! In practice, a resistor allows a common data pin to be used both for input and output with no action other than setting the TRIS register. > For the outputs, the 74HC164 is a serial to parallel shift register. > A better device is the 74HC595 (serial to parallel shift register with > latched 3-state outputs). I have spent some time explaining to Randie that for HIS application, he appears neither to NEED or WANT the HC595 latch function, as all the devices to which he is interfacing have their own input latches. Certainly, if you require pure latched outputs for LEDS or such, the HC595 is the way to go. Again I have to wonder why having gone to the trouble of latching the outputs, you would want to UN-latch them with a tri-state function. Seems to me one or the other, but very rarely both! > I'm in the similar situation where I need more I/O pins than the PIC > I am using (16F84) can supply. I'm using 74HC589s to multiplex the > inputs and 74HC595s to multiplex the outputs. I suspect the HC165 would be cheaper than the HC589. Either Randie or myself could forward you our previous communication of course. Perhaps I should put it all into a diagram. Perhaps I should write a book. Hang on! Hasn't someone written it already? Cheers, Paul B.