I'm using a Shift Register (actually a MIC5891 driver with integral shift register) with an Arduino and I'm looking for a way to force the Enable pin on the 5891 to HIGH (all outputs off) during the Arduinio's bootup sequence until my program can take control of it. I found some references to a Power-On-Reset circuit (see attached image), but I'm having some trouble figuring out the proper component values to use to account for the Arduino's several second boot time. Any assistance would be greatly appreciated. The Arduino is a 5V version.
-K
Force Enable pin on Shift Register HIGH during Arduino bootu
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- professor k
- Posts: 59
- Joined: Sun Mar 18, 2012 7:33 pm
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Force Enable pin on Shift Register HIGH during Arduino b
The simplest option would be to control the EN pins with one of the Arduino's GPIO pins.
Connect all the EN pins to a pull-down resistor so the chips are disabled by default, and also connect a GPIO pin. Use a digitalWrite() in setup() to send that pin high, enabling all the chips at once.
The ATmega family of microcontrollers put their pins in a high-impedance state while they boot, so the EN line can't go high until the Arduino has booted and is running code.
Connect all the EN pins to a pull-down resistor so the chips are disabled by default, and also connect a GPIO pin. Use a digitalWrite() in setup() to send that pin high, enabling all the chips at once.
The ATmega family of microcontrollers put their pins in a high-impedance state while they boot, so the EN line can't go high until the Arduino has booted and is running code.
- professor k
- Posts: 59
- Joined: Sun Mar 18, 2012 7:33 pm
Re: Force Enable pin on Shift Register HIGH during Arduino b
Mike,
I think you've got the enable mechanism backwards. When the enable pin is HIGH, the output pins are disabled. When the enable pin is LOW, the output pins are enabled. My problem is that from the time the system is powered on to the time the Arduino is fully booted and I can set the pin HIGH (thereby shutting off all the outputs) via the GPIO pin that is already connected to it, the output pins are enabled and float randomly. I need to force the enable pin HIGH during that time frame to keep the relays that the MIC5891 is attached to from coming on.
-Keith
I think you've got the enable mechanism backwards. When the enable pin is HIGH, the output pins are disabled. When the enable pin is LOW, the output pins are enabled. My problem is that from the time the system is powered on to the time the Arduino is fully booted and I can set the pin HIGH (thereby shutting off all the outputs) via the GPIO pin that is already connected to it, the output pins are enabled and float randomly. I need to force the enable pin HIGH during that time frame to keep the relays that the MIC5891 is attached to from coming on.
-Keith
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Force Enable pin on Shift Register HIGH during Arduino b
Use a pull-up resistor, and send the GPIO pin low in setup().
The mechanics are the same. The resistor controls the pin voltage while the GPIO pin is tristated, no matter where the resistor's other end is connected. The GPIO pin controls the pin voltage once it's configured for output, whether it's high or low.
The mechanics are the same. The resistor controls the pin voltage while the GPIO pin is tristated, no matter where the resistor's other end is connected. The GPIO pin controls the pin voltage once it's configured for output, whether it's high or low.
- professor k
- Posts: 59
- Joined: Sun Mar 18, 2012 7:33 pm
Re: Force Enable pin on Shift Register HIGH during Arduino b
Thanks Mike, that did the trick.
-K
-K
Please be positive and constructive with your questions and comments.