<div dir="ltr">Legal, que estou com um problema gravíssimo provavelmente por fuga de corrente em algum lugar. Como colocamos muita eletrônica, tá dificil saber onde está a fuga de corrente.<div><br></div><div>A questão principal é a seguinte: Algum fenomeno eletrônico está influindo no microcontrolador de alguma forma que o Clock do processador fica maluco, do nada estou gerando um clock de 1ms (que é muito) e isso cai para nano segundos repentinamente quando vou receber dados de outro componente (uma memória flash), depois normaliza quando estou enviando dados pelo SPI (SPI em software).</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-07 11:19 GMT-03:00 Leonardo Baracat <span dir="ltr"><<a href="mailto:lbaracat@gmail.com" target="_blank">lbaracat@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Eu achei esse post. Achei bastante interessante.<div><br></div><div><p style="color:rgb(34,34,34);font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:19px">Default state of output 0-5 is input! You see, without knowing what kind of circuit you've got hooked up, the CPU doesn't know whether it should leave things turned off by outputting +3.3V or turned off by outputting 0V. So it doesn't source or sink any current at all. It leaves the pin in a third state -- neither on nor off, but tristated.</p><p style="color:rgb(34,34,34);font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:19px">Once you turn the pin into an output pin, then it will sink current (that is, it will let current go to ground) when you output a zero, and source current (send your circuit current from the +3.3V supply) when you output a one. Note, though, that there is a limit to the amount of current that the chip can source or sink. You should check the specifications on your coil and the Bean to see if it can source or sink enough current. Note that it's likely that it can sink more current than it can source. If that's the case, then you want to connect one end of the relay coil to +3.3V and the other to the output pin. Then, when you send the pin a ZERO, it turns the relay ON.</p><p style="color:rgb(34,34,34);font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:19px"><br></p><p><font color="#222222" face="Helvetica, Arial, sans-serif"><span style="font-size:14px;line-height:19px"><a href="http://beantalk.punchthrough.com/t/output-pin-state-during-power-up/965/4" target="_blank">http://beantalk.punchthrough.com/t/output-pin-state-during-power-up/965/4</a></span></font><br></p><p><br></p><p>Abs!!</p></div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Thu, Apr 7, 2016 at 10:25 AM Alejandro Mesias <<a href="mailto:ale.mesias@gmail.com" target="_blank">ale.mesias@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Alta impedância faria muito sentido.</div><div class="gmail_extra"><br><div class="gmail_quote">Em 7 de abril de 2016 09:54, Marcelo Campos <span dir="ltr"><<a href="mailto:marcelo.camposs182@gmail.com" target="_blank">marcelo.camposs182@gmail.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">do momento do Reset até você mandar definição dela, fica no 3o estado / alta impedância</div></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><br><br>Em quinta-feira, 7 de abril de 2016 09:39:51 UTC-3, Mesias  escreveu:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Procurei muito na internet mas não encontrei uma resposta clara, estou usando um Arduino mega 2560. Qual seria o estado inicial dos pinos digitais, pwm e analógicos antes que execute comando neles ?<div><br></div><div>As possibilidades são:</div><div>-- Em alta (seria 5v mas acho pouco provável), </div><div>-- em baixa (0v ou terra).</div><div>-- alta impedância (o que ocorre em modo leitura).</div><div><div><br></div>-- <br><div>======================================<br>Alejandro Mesias André Nebra Perez<br>Java/Python/Js/Something else Developer<br>Twitter: @meszias<br>Linux User #442506<br>Campinas - SP - Brasil - South America<br>======================================</div>
</div></div>
</blockquote></div></div></div></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><font color="#888888">

<p></p>

-- <br>
-... . . -..- -.-. . .-.. .-.. . -. - - --- . .- -.-. .... --- - .... . .-.<br>
Regras da Lista: <a href="https://garoa.net.br/wiki/Lista:LeiaAntesDeClicarNoSend" target="_blank">https://garoa.net.br/wiki/Lista:LeiaAntesDeClicarNoSend</a><br>
Para mais informações sobre o Garoa Hacker Clube acesse  <a href="https://garoa.net.br" target="_blank">https://garoa.net.br</a><br>
Maiores opções sobre o Google Groups, visite: <a href="https://groups.google.com/group/hackerspacesp" target="_blank">https://groups.google.com/group/hackerspacesp</a><br>
.--. .- .-. .- -- .- .. ... .. -. ..-. --- .-. -- .- . ... .- -.-. . ... ... . --- .-- .. -.- .. <br>
Epoch 0 <=> Fundação: 1298244863 s ~ 2.408064*10^52 tP  (tempos de Planck)<br>
</font></span></blockquote></div></div><div class="gmail_extra"><br><br clear="all"><div><br></div>-- <br><div>======================================<br>Alejandro Mesias André Nebra Perez<br>Java/Python/Js/Something else Developer<br>Twitter: @meszias<br>Linux User #442506<br>Campinas - SP - Brasil - South America<br>======================================</div>
</div>

<p></p></div></div><span class="HOEnZb"><font color="#888888">

-- <br>
Você recebeu essa mensagem porque está inscrito no grupo "ArduInRio" dos Grupos do Google.<br>
Para cancelar inscrição nesse grupo e parar de receber e-mails dele, envie um e-mail para <a href="mailto:arduinrio+unsubscribe@googlegroups.com" target="_blank">arduinrio+unsubscribe@googlegroups.com</a>.<br>
Para mais opções, acesse <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888">

<p></p>

-- <br>
Você recebeu essa mensagem porque está inscrito no grupo "ArduInRio" dos Grupos do Google.<br>
Para cancelar inscrição nesse grupo e parar de receber e-mails dele, envie um e-mail para <a href="mailto:arduinrio+unsubscribe@googlegroups.com" target="_blank">arduinrio+unsubscribe@googlegroups.com</a>.<br>
Para mais opções, acesse <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">======================================<br>Alejandro Mesias André Nebra Perez<br>Java/Python/Js/Something else Developer<br>Twitter: @meszias<br>Linux User #442506<br>Campinas - SP - Brasil - South America<br>======================================</div>
</div>