<div dir="ltr">Something to be aware of is that the <span style="font-family:arial,sans-serif;font-size:13px">MCP23017 is a 5V device not a 3.3V device. It seems to work without a level converter, but could fail on some occasions like when adding more than one load to the output pins of the RPi, so it's best practice to always use a level converter between the RPi and a </span><span style="font-family:arial,sans-serif;font-size:13px">MCP23017.</span><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Carl</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 9:31 AM, Bill Farrow <span dir="ltr"><<a href="mailto:bill@arrowsreach.com" target="_blank">bill@arrowsreach.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was wondering if there is a "tricky" way you could do this using<br>
only a single pin, a capacitor, and a resistor.<br>
<br>
When the push button connects it charges the capacitor. The MCU pin,<br>
configured as an input, can read the state of the capacitor. When the<br>
MCU wants to reset the latch it can change the pin to an output and<br>
set it to 0 (low) which discharges the capacitor to ground via the<br>
resistor.<br>
<br>
Let's see how bad my ascii art is:<br>
<br>
mcu pin --- resistor --- switch --- 3.3v<br>
                             |<br>
                       capacitor<br>
                             |<br>
                           GND<br>
<span class="HOEnZb"><font color="#888888"><br>
Bill<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<a href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>-------------------------------------------------------------------------------<br>Carl J. Nobile (Software Engineer)<br><a href="mailto:carl.nobile@gmail.com">carl.nobile@gmail.com</a><br>
-------------------------------------------------------------------------------
</div>