8-bit register power-on unknown state issue - Page 1
Forum section: electronics / projects

author: John Anderson
author_rank: Contributor
timestamp: July 15, 2017, 02:38:57 pm
content: Hello,I am working with a project using several 74HC574 8-bit registers. All the register inputs are connected to uC buses (from an Arduino). All the Output Enable inputs are tied to ground to enable permanent outputs (they drive some subsequent circuitry). It seems that when powering the system at once, the registers randomly establish their states, most of the time getting High from the beginning, but not always. I was expecting all the initial outputs be Low.I have been investigating around and suspect this is a problem related with the power-on, so for that I ask to you. I think a power-on-reset circuit will help, isn't it? If it is, my question then is: which do you think should be the best implementation of a power-on-reset in this particular application (for the 74HC574s)? Only passive components? Hysteresys? Arrangement? I look for the best-room solution, because PCB (through hole) room is critical in my application.Thank you very much.

author: tggzzz
author_rank: Super Contributor
timestamp: July 15, 2017, 02:51:10 pm
content: Quote from: John Anderson on July 15, 2017, 02:38:57 pmThat can never be relied on with a flip-flop; always assumeeveryflip-flop (in any circuit) is in a random state until set to a known state.QuoteThat cannot be answered, since we don't know the rest of your circuit nor how it will respond.One general approach is to have some form of "this data is valid" signal, and to ensure it is carefully initialised during turn-on.Another is to have some form of global reset, but that presumes that all parts of the circuit will "recognise it" on the same clock cycle. That is particularly problematic with asynchronous resets, but can be better controlled with synchronous resets.

author: capt bullshot
author_rank: Super Contributor
timestamp: July 15, 2017, 03:30:46 pm
content: You cannot do that with the HC574, since they don't have a reset input.As an alternative, look at the HC273, these have the reset input instead of the output enable. You can reset them at power on with a simple R/C reset circuit. Alas, they have a completely different pinout than the HC574.Otherwise, you could use the output enable to keep the outputs in tri-state until the registers are written by the CPU. You'll have to supply some extra circuitry to do so, or tie the OE to a GPIO pin of the MCU (if you have one). While the outputs are tri-stated, use pull-up or pull-down resistors to keep the desired output state.

author: rstofer
author_rank: Super Contributor
timestamp: July 15, 2017, 03:43:15 pm
content: As suggested above, the proper way to do this is to control the Output Enable pin. Tie it to a uC pin with a pull-up resistor. Then do whatever you have to do to reset the D flops and then pull the OE pin to ground.Inside the uC, make sure the OE pin starts as floating input (which it will), set it to '1' before setting it as an output. This keeps the OE pin of the D-flops pulled high by the resistor on the pin until the uC logic takes over.Now, the circuitry downstream of the D-flops needs to be addressed. You need pull-up or pull-down resistors to get the floating outputs of the D flops in a proper state for whatever they are connected to. Not knowing what is downstream, it is pretty difficult to say if this is necessary or not but, based on your OP, I guess it is. It sounds like you want all the outputs to be '0' so just use pull-down resistors on all of the output pins.Or, come up with a way to control the downstream devices separately. Don't enable the power to the motor controllers until the logic is initialized - that kind of thing. This too gets messy.The 74HC273 is probably a better bet but 9 pin SIP resistor packages don't take much space.

author: John Anderson
author_rank: Contributor
timestamp: July 16, 2017, 10:05:27 am
content: Hi,Thank you for all your answers. Based on your suggestions, I will try this:1. Control OE pin with the uC and pulling-down the outputs, because I need inicial LOW states (sorry, I should mention the first time that these outputs drive the Enables of a L298 2x Half-Bridge drivers, so in the datasheet mentions that is a must to have enable LOW both before power-on and power-off).2. Alternatively, change the 74HC574 for 74HC273, but in this case I have a major redesign, because I need to both add the power-on-reset circuit for the MR input, and rearranging all the traces of the pins, which could be almost impossible due to the very small room available in the PCB. With the 74HC574 I worked in terms of layout because all the inputs are in one side, and all the outputs at the other. Final question for you: is there al alternative to 74HC273 with aligned inputs and outputs at each side of the IC?Thank you again!

author: capt bullshot
author_rank: Super Contributor
timestamp: July 16, 2017, 12:30:47 pm
content: As far as I remember, there's no '273 alike with '574 pinout.If you want to save space and the driven signals aren't too time critical, you might consider using the HC595. Since this is a shift register with serial in and parallel out, it saves quite a lot of wires from your MCU, and it's a 16 pin package. Many of these can be cascaded and still driven by 4 Pins from the MCU (serial data, clock, latch and OE). A fifth pin (serial data in) in conjuction with the HC597 gives you a possibly endless I/O expander driven by a SPI port.