A partiular four bit counter

Thread Starter

bading

Joined Jan 18, 2012
10
I have to create a circuit to control four relays in a cyclic manner, ie each time they change or the status of each pulse on the output you must turn on and off the previous one. The input signal is 0/5Vdc and comes from a PIC. The relays have a coil at 5 volts DC. When I turn on the circuit must be admitted in one of four configurations (for example, state 1).
I was thought of using a 4-bit counter, giving the input of the appropriate sequences of pulses that can be created by software so that the output ports only in the following states:
0001 to 1 - state 1
0010-2 - 2 was
0100-4 - State 3
1000-8 - 4 was
But, for example, to go from state 3 to state 4 I have to go through the configuration of the unintended output relay excited as I am, I do not think this solution is elegant, and I think the flip flop by connecting the problem could be solved , but I honestly do not know how!:confused:
thanks
 

WBahn

Joined Mar 31, 2012
29,979
Look into rotate left/right commands or, if not supported (I think at least one is), look at the shift left/right commands.
 
Top