Also when all the switches are open the input to the analog pin will be floating/undefined (not driven) tristated..
You need a pull up or pull down to take care of that.
Because 3v0 said toOriginally Posted by 3v0
Also when all the switches are open the input to the analog pin will be floating/undefined (not driven) tristated..
You need a pull up or pull down to take care of that.
Please post questions to the forums. PM's are for personal communication.
BCHS/3v0's PIC C18 Tutorials
Mondo Tech's Super Probe
Brian Schmalz's USB Bit Whacker
Yes but you set it up as a current limiting resistor.Originally Posted by AtomSoft
See the schematic I added to my XXXX second post. And I am not sure what value would be best. At least 10K. I would try the 100K if it works.
Please post questions to the forums. PM's are for personal communication.
BCHS/3v0's PIC C18 Tutorials
Mondo Tech's Super Probe
Brian Schmalz's USB Bit Whacker
oh oh so it must return a value so we close the circuit no matter what and just care if the voltage is one of mines.
Like
found the switches:
![]()
Last edited by AtomSoft; 4th March 2008 at 03:22 AM.
Sort of. A pullup resistor is used to maintain a small, stable voltage on an input pin. If you left it off, your circuit MIGHT work correctly, but the pin's voltage may fluctuate, causing unwanted false inputs.Originally Posted by AtomSoft
Hey we went from 3 to 4 switches![]()
You have the basic idea.
Please post questions to the forums. PM's are for personal communication.
BCHS/3v0's PIC C18 Tutorials
Mondo Tech's Super Probe
Brian Schmalz's USB Bit Whacker
I am not an EE. But I would have said steady voltage and small current?Originally Posted by IČR
Please post questions to the forums. PM's are for personal communication.
BCHS/3v0's PIC C18 Tutorials
Mondo Tech's Super Probe
Brian Schmalz's USB Bit Whacker
ok cool. So there is no definite way to calculate the divided voltages right? Like i would have to place resistors and manually check each one to determine drop ?
All i know in ohms law is how to get 1 value from 2 others. I don't know how to subtract like 100k ohms from 5v to determine the drop on the resistor.
yeah the concept is in the head but the head doesnt know how to draw lolHey we went from 3 to 4 switches
You have the basic idea.
EDIT: Found this
Last edited by AtomSoft; 4th March 2008 at 03:36 AM.
It's simple. Consider a 20 kOhm resistor in series with a 5 kOhm resistor, with 10 V applied across them. You want to determine the voltage at the point between them. First thing you do is calculate the current through the resistors:
I = V / R
I = 10 / (15 k + 5 k)
I = .5 mA
Now that you know that, you can calculate the voltage drop across each resistor:
V = I x R
V1 = .5 mA x 15 k
V1 = 7.5 V
V2 = .5 mA x 5 k
V2 = 2.5 V
Reality check: the two voltages should sum to the total supply voltage. 7.5 + 2.5 = 10. If you have more than two resistors, you can just extend this process. Now, work out your voltage drops.
A negligible current. The inputs are high impedance and measure voltage, not current.Originally Posted by 3v0
| Tags |
| Similar Threads | ||||
| Thread | Starter | Forum | Replies | Last Post |
| PIC Switch Management Techniques | Mike, K8LH | Microcontrollers | 12 | 25th March 2011, 12:08 PM |
| Good Electronic Supply's Sites, Everyone Come On In! :P | Electric Rain | General Electronics Chat | 44 | 27th August 2007, 11:06 PM |
| 6 momentary switches 6 LEDs | Digger7 | Electronic Projects Design/Ideas/Reviews | 20 | 22nd February 2007, 12:16 PM |
| Analog Switches v Relays for EPROM programmer | Tickled_Pink | Electronic Projects Design/Ideas/Reviews | 0 | 12th March 2004, 10:13 AM |
| Multiplex circuit question... | Rescue1 | Electronic Projects Design/Ideas/Reviews | 3 | 9th November 2003, 09:28 AM |