Hi,
Firstly, I would like to congratulate all those involved in creating the MagPi. The magazine reminds me of the computer magazines from my youth, and I look forward to the next one!
Now for the (hopefully not too) dumb question. One of my main uses for the Pi is to start learning some more about electronics and experimenting with interfacing, so I am enjoying the In Control articles. This month's piece talks about digital logic states, and the need for a pull-up resistor to tie the IO port to 3.3V. This makes sense to me however my question is why is the separate 10K resistor necessary - is the connection not already present through the LED and the 470 resistor?
My experiments seem to suggest it works without the separate resistor, but I am keen to understand if I am missing something?
Thanks,
Oh, and if anyone is looking for male:female jumper wires in Maplin, you can get some small (4.5cm) ones described as interconnect cables (A39GF).
MagPi - In Control
8 posts
- Posts: 2
- Joined: Wed Jun 06, 2012 10:34 pm
Yes you are correct the LED & 470Ω Resistor would provide a pull-up, so the separate resistor is not strictly necessary. As the LED is there just to provide a visual conformation that the switch is working it would probably be a bit confusing to explain the dual purpose of using it as a pull-up. It basically lays the groundwork for the next instalment where we turn the 470Ω resistor 90deg so it is in position D1-D5 and connecting a second GPIO to point E1 so that now you have an input and an output.
- Posts: 254
- Joined: Fri Oct 21, 2011 5:53 pm
- Location: UK
Hi,
Thanks for the response. The electronics side of things is fairly new to me (or refreshing things covered in school 15 years ago) so it is good to know that I wasn't missing anything.
Thanks for the response. The electronics side of things is fairly new to me (or refreshing things covered in school 15 years ago) so it is good to know that I wasn't missing anything.
- Posts: 2
- Joined: Wed Jun 06, 2012 10:34 pm
lemoncurd wrote:Oh, and if anyone is looking for male:female jumper wires in Maplin, you can get some small (4.5cm) ones described as interconnect cables (A39GF).
Thanks for that - I couldn't find these in my local Maplins. Now I know what to look for.
mark
- Posts: 400
- Joined: Sun Nov 20, 2011 11:37 am
The Tandy catalogue number is (276-156) but unfortunately out of stock at the moment 
- Posts: 254
- Joined: Fri Oct 21, 2011 5:53 pm
- Location: UK
I take it that you could use the circuit to drive the LED too as an output, effectively using one circuit as both input and output tester (without changing the wires).
Is there any issue with doing that? I guess that 1k resistor connected to the GPIO would protect it if the switch is pressed even when driving an output.
Is there any issue with doing that? I guess that 1k resistor connected to the GPIO would protect it if the switch is pressed even when driving an output.
_________________________________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.
Released at the start of each month.
Meltwater's Pi Hardware - pihardware.com
Like the MagPi? @TheMagP1 @TheMagPiTeam
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.
Released at the start of each month.
Meltwater's Pi Hardware - pihardware.com
Like the MagPi? @TheMagP1 @TheMagPiTeam
You could use a single GPIO as both input and output but it would need a slightly different circuit. The resistor that is in-line with the GPIO connection would prevent there being sufficient current to drive the LED. It was deliberately created with the resistor being the first thing connected to the GPIO to avoid damage in case someone made a mistake connecting things on the breadboard.
- Posts: 254
- Joined: Fri Oct 21, 2011 5:53 pm
- Location: UK
Looks like my LED is a very low powered one, so it still lights up.
It should do for what I have in mind, as long as there are no other issues with it.
It should do for what I have in mind, as long as there are no other issues with it.
_________________________________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.
Released at the start of each month.
Meltwater's Pi Hardware - pihardware.com
Like the MagPi? @TheMagP1 @TheMagPiTeam
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.
Released at the start of each month.
Meltwater's Pi Hardware - pihardware.com
Like the MagPi? @TheMagP1 @TheMagPiTeam