Sir, i want to connect 13 relays to microcontroller nd i hav only 4 pins to connect these relays.... so i am using decoder ic to connect the outputs.... so please tell me how to program for this...
Other pins are already utilized by other input output devices like lcd,keyboard,sensor thats why only 4 pins are there for relays output
and i want 5 combinations of 12 relays for different power factors settings
You could daisy chain a couple of shift registers, clock the new pattern through the chain, and then latch it.
there are '51 devices with 64 pins, why Mickey Mouse it?
But SPI-driven shift registers are quite practical. Especially since some of them have very powerful, sometimes current-controlled, outputs or open-collector outputs able to directly handle 12V relays (at least if the relays have freewheel diodes).
Cause it's a Steamboat Willie type development effort?