A partiular four bit counter

Discussion in 'The Projects Forum' started by bading, Apr 27, 2012.

  1. bading

    Thread Starter New Member

    Jan 18, 2012
    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:
  2. WBahn


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


    Oct 2, 2009
    You can do this with a 4017 or 4022 counter chip.