Need help understanding outputs
Hello again,
···· I've spent hours trying to figure out how to get the SX28 chip to send an output current to the base of my BJT. In my code I set RB.7 to an output then I ran it. I expected to get Vdd coming out of that pin, but nope nothing.
Im using PortB since portC is taken up by a keypad and Im using RA.0 to control my LCD.
·
···· I've spent hours trying to figure out how to get the SX28 chip to send an output current to the base of my BJT. In my code I set RB.7 to an output then I ran it. I expected to get Vdd coming out of that pin, but nope nothing.
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
·
Comments
Use a 150 ohm resistor.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
Ohms law says that Voltage = Current times Resistance, or V=IR where V=Voltage, I=Current (in amps) and R=Resistance (in ohms)
To solve for resistance (because you know voltage and current), you would use R=V/I.
Thus:
30ma = 0.030 Amps
R = 5 / 0.030 = 166.7
The closest resistance value (and allowing for resistors that are not all that close to their published values) would probably be 150 ohms.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
Yes, I should have explained how I got 150 ohms.
I was actually accounting for the 0.6 volt drop in the BJT.
So I used (5.0 - 0.6) / 0.030 = 146.66 Ohms.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·