I have used 74595 to extend output pin and 74165 to extend input pin of my micro-controller separately. In micro-controller we can use same pin as input or output. Is there any way, I can do to my extended pins same as in microcontroller
I have used 74595 to extend output pin and 74165 to extend input pin of my micro-controller separately. In micro-controller we can use same pin as input or output. Is there any way, I can do to my extended pins same as in microcontroller
I am not quite sure I understand the last part correctly. You are using shift registers to expand your I/Os. Are you using the hardware SPI with MISO and MOSI pins? If so, then those are the pins you can use for hardware SPI. MOSI for outputs and MISO for inputs (since the MCU is the master). You could place more shift registers in series to add more I/Os.
If you are bit banging SPI, that is produce data and clock by software as well as serial data reading, then you can use any MCU GPIO pin for this purpose. Still you can add more shift registers in series to get more I/Os.
I think bhattaroshan is asking if the extended inputs and outputs can be made to be bidirectional, like the pins on the microcontroller are. So, the additional i/o's could be programmed to be either input or output as required.