Analog Newbie
Nelson Chandler
Posts: 2
I just got "What's a Microcontroller?" along with the BASIC Stamp HomeWork Board. I've been going through the exercises and I'm at the pushbutton section.
What I want to know is how does the circuit designer know which size resistors to use?
The resistor used in conjunction with the LEDs is 470 Ohms and I realize that has something to do with not burning out the LED. But where is the LED rating specified?
In the Push Button example, where does 10k Ohm and 220 Ohm come from? I realize the path to Vss has to have higher resistance than the microcontroller, otherwise it would just create a short circuit when the button is pushed (right?), but how do I know it's supposed to be 10k Ohm and not 1k Ohm or something else?
Basically, where's the best place to look for the "why"s when it comes to the analog portion of these circuits? I'd like to experiment, but I don't want to fry my spiffy new learning tool due to ignorance.
What I want to know is how does the circuit designer know which size resistors to use?
The resistor used in conjunction with the LEDs is 470 Ohms and I realize that has something to do with not burning out the LED. But where is the LED rating specified?
In the Push Button example, where does 10k Ohm and 220 Ohm come from? I realize the path to Vss has to have higher resistance than the microcontroller, otherwise it would just create a short circuit when the button is pushed (right?), but how do I know it's supposed to be 10k Ohm and not 1k Ohm or something else?
Basically, where's the best place to look for the "why"s when it comes to the analog portion of these circuits? I'd like to experiment, but I don't want to fry my spiffy new learning tool due to ignorance.
Comments
Thanks for the link SRLM. I'll look into getting some of the books recommended.
Using Ohm's Law: 5V / 220 Ohm = 23mA
This limits short circuit current to under 25mA if an I/O pin set LOW is connected to +5V or an I/O pin set HIGH is connected to ground.
The Stamps have protective diodes that conduct current to the Vdd buss on the chip for I/O pin voltages greater than 5.6V or conduct current to the Vss buss on the chip for I/O pin voltages below -0.6V. These diodes can handle current up to 500uA. A 10K resistor will protect these diodes for voltages up to around +10V or down to roughly -5V (try Ohm's Law).