How do I use an Arduino to switch another IC's pin (reset) to ground?

I am trying to turn an IC's reset pin to ground with an Arduino.  It is a 5 LED array that has an IC controlling several flashing modes. I need to reset the IC to change modes and I want to use an Arduino Nano. I have seen an explanation setting an digital pin to input and then making it low and then setting the pin to output but I don't understand the process.  Supposedly it simulates a momentary push button switch using an Arduino.

I guess I need a very thorough explanation for someone from the slide rule era.

Thanks in advance.

Murphy

sort by: active | newest | oldest
MurphySquint (author) 4 years ago
Yes, I have it working but as I am new to Arduino, it contradicts what I have been reading. Have no idea what it is actually doing.

The digitalWrite(X, LOW); looks to me to be out of place when it is placed ahead of the pinMode(X, OUTPUT); command.
Steve is correct but I think the short answer can be understood here:
   http://arduino.cc/en/Tutorial/DigitalPins

Let me try to explain:
pinMode(X, INPUT);  // this sets the PIN to a tri-state (high impedance)
....
digitalWrite(X, LOW); // Ensures the pin's internal pullup is not enabled
// When the pinMode is set to OUTPUT the pin state will be LOW
pinMode(X, OUTPUT);// sets the pin from tri-state to LOW
delay(100);
pinMode(X, INPUT);// returns the pin to tri-state

Note that the pin is never actually set to HIGH, only changed from high impedance to LOW and back to high impedance.

This code is 'wierd' in that it is relies on specific features of the ATMEL AVR processor pins and makes assumptions about other components driving the connected IC's reset pin that are not discussed/revealed here.  The fact that the code works leads me to believe that there is other circuitry driving the IC reset pin HIGH and the Arduino's pin needs to be placed into a high impedance state so as to not interfere with the other circuitry.

Best Wishes
Its playing fast and loose with the hardware. It'd take a major essay to explain the port hardware structure of the AVRs. Live with it.
Connect the pin to a digital out pin on the Arduino, drive it low to ground the pin.
MurphySquint (author)  steveastrouk4 years ago
This does not work. Someone suggested the following code but I do not understand it.

pinMode(X, INPUT);
....
digitalWrite(X, LOW);
pinMode(X, OUTPUT);
delay(100);
pinMode(X, INPUT);
That tristates the pin, ie makes it float, then forces it high., waits a bit, then lets it float again.

Have you actually tried it ?