<div dir="ltr">JP,<div><div>My key reference ON was the Vcc, like yours, and when a key was open, in your case an RA, the pin was very noise, possibly interpreted as "1" (some keys to 0.5 meters). With pull down the noise reduced considerably.</div><div><br></div><div>In the case of Key On being read RAX = 0, then Key Off = 1, pullup. In this case reverse diodes and LED.</div></div><div><br></div><div>In your drawing, when Key Off, the pullup pull RAx to +5V, the ON condition.</div><div><br></div><div>VB</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 7, 2015 at 11:57 AM, Jean-Pierre Desrochers <span dir="ltr"><<a href="mailto:jpdesroc@oricom.ca" target="_blank">jpdesroc@oricom.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Vinicius,<br>
<br>
Can you clarify what a difference pull down or pull up makes here ?<br>
Each final pin input impedance is the same here ?<br>
Unless you want all your wiring ground related.. (??)<br>
JP<div><div class="h5"><br>
<br>
Le 2015-10-07 10:46, Vinicius Brazil a écrit :<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi Jean-Pierre,<br>
I did something similar but put a 10k pull down resistor on the "Rx In" due to distances of the keys to the PIC.<br>
<br>
Vinicius Brazil<br>
<br>
On Wed, Oct 7, 2015 at 11:32 AM, Jean-Pierre Desrochers <<a href="mailto:jpdesroc@oricom.ca" target="_blank">jpdesroc@oricom.ca</a>> wrote:<br>
Hi Tom,<br>
<br>
The PIC has no internal pullups on port A.<br>
You were right. I uploaded a corrected picture<br>
on the same link shown.<br>
And yes the 100 ohms is for the LED's current limiting.<br>
The voltage drop of the led + the series diode gives around<br>
2.2 + .7 = 2.9v leaving 2.1v (@ 5vdc) for the limiting resistor.<br>
At 20mA that gives around 100R.<br>
Thanks for your good reply (as usual).<br>
JP<br>
<br>
Le 2015-10-07 10:07, Tom Wiltshire a écrit :<br>
What does the 100R do? Is that a current limiting resistor for the LED?<br>
What about pull-ups for the buttons? Does the 16F88 have internal<br>
pull-ups on Port A?<br>
<br>
Aside from those questions, it looks fine to me, JP. Nice and simple.<br>
<br>
Personally, I'd have done it with serial-parallel and parallel-serial<br>
chips, but that's because I've got code for that already. 74HC594/595<br>
and 74HC166/165 can both be driven from 6 pins total (or even five if<br>
you use the same clock for both in and out), and you can extend the<br>
chain as long as you want.<br>
<br>
Your way saves the six(!) other chips I'd have used though, so it's<br>
probably to be preferred.<br>
<br>
Tom<br>
<br>
On 7 Oct 2015, at 14:52, Jean-Pierre Desrochers <<a href="mailto:jpdesroc@oricom.ca" target="_blank">jpdesroc@oricom.ca</a>> wrote:<br>
<br>
I'm about to build a MIDI foot controller<br>
using around 20 normally open footswitches<br>
with there respective state LEDs.<br>
I have a bunch of PIC16F88 micros and want<br>
to use one for this project using as less pins as possible.<br>
(9 pins for the matrix)<br>
I figured out a way to read and feed all switches<br>
and LEDs this way:<br>
<br>
</div></div><a href="http://www.arcenson.com/public/PIC16F88_5x4_matrix.JPG" rel="noreferrer" target="_blank">http://www.arcenson.com/public/PIC16F88_5x4_matrix.JPG</a> [1]<span class=""><br>
<br>
All the switches and LEDs will be processed one after each other<br>
in an endless loop..<br>
RB5 will send the MIDI data.<br>
<br>
Does anybody see something I forgot in that drawing ?<br>
I'm not home and will try it tonight.<br>
<br>
Thanks. JP<br>
_______________________________________________<br>
Synth-diy mailing list<br>
<a href="mailto:Synth-diy@dropmix.xs4all.nl" target="_blank">Synth-diy@dropmix.xs4all.nl</a><br>
</span><a href="http://dropmix.xs4all.nl/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://dropmix.xs4all.nl/mailman/listinfo/synth-diy</a> [2]<br>
</blockquote><span class="">
_______________________________________________<br>
Synth-diy mailing list<br>
<a href="mailto:Synth-diy@dropmix.xs4all.nl" target="_blank">Synth-diy@dropmix.xs4all.nl</a><br></span>
<a href="http://dropmix.xs4all.nl/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://dropmix.xs4all.nl/mailman/listinfo/synth-diy</a> [2]<br>
<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="http://www.arcenson.com/public/PIC16F88_5x4_matrix.JPG" rel="noreferrer" target="_blank">http://www.arcenson.com/public/PIC16F88_5x4_matrix.JPG</a><br>
[2] <a href="http://dropmix.xs4all.nl/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://dropmix.xs4all.nl/mailman/listinfo/synth-diy</a><br>
</blockquote></div><br></div>