Searching \ for '[SX] SX20 Source current.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/power.htm?key=sx
Search entire site for: 'SX20 Source current.'.

Exact match. Not showing close matches.
PICList Thread
'[SX] SX20 Source current.'
2005\08\29@094036 by Electronegativityn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Electronegativity wrote:

Hi guys (gals?), I am planning to hook up an SX20AC/SS chip to Lumex LED display.
The display is rated for 25mA maximum continous current per segment or 150mA for < 10uS.


If I run the display cathode to ground and hook SX20 outputs directly to the segment pins will it fry the display?


What if I put a resistor between the cathode pin and ground?


I also noticed that the SX20 has 2 pins each for Vdd and Vss; do I need to hook all 4 of them up?


Thanks,
-Alexander
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@094539 by Chris Savagen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Chris Savage wrote:

Alexander,
  You should always have current limiting resistors in series with LEDs, especially when you're driving them directly from the I/O pins.  If you're going to do this, you should strobe the outputs at high speed so that they appear to be on at the same time when displaying a digit, but they would actually be lit one at a time.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86218
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@132027 by Electronegativityn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Electronegativity wrote:

Hi Chris:

What is the current limit for a particular resistor?

For example, what would be the current if I put a 10k resistor directly to ground from an output pin.

Would the above example damage an SX chip?

I have been thinking of doing something like the above example to detect if a dip-swich or jumper is set.
The pin would be pulled high, but would read low if connected to ground.

Thanks,
-Alexander
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86261
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@134243 by johncouturen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, johncouture wrote:

To find current for a circuit (If I understand Ohms Law correctly).

The chip will output up to 5 volts (assuming a 5VDC source), the resistor is 10K.  Using the formula I=V/R  (current = Volts / Resistance)
I = V / R
I = 5 / 10000
I = .0005 Amps (or 500uA, or .5mA)
However, Chris Savage or Jon Williams better weigh in on this because that is what they do for a living (I just teach computer sci .... and try not to touch both wires at the same time).

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86265
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@134652 by Coriolisn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Coriolis wrote:

Don't forget the forward diode drop Vf. The equation would be R=(Vdd-Vf)/I, then pick the next higher value for the resistor.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86267
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@140645 by Coriolisn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Coriolis wrote:

[Quoting: "Alexander"]
I also noticed that the SX20 has 2 pins each for Vdd and Vss; do I need to hook all 4 of them up?
yes.


[Quoting: "Alexander"]
What is the current limit for a particular resistor?

For example, what would be the current if I put a 10k resistor directly to ground from an output pin.

Would the above example damage an SX chip?

I have been thinking of doing something like the above example to detect if a dip-swich or jumper is set.
The pin would be pulled high, but would read low if connected to ground.

The current that flows through a resistor is the voltage across it's terminals divided by the value of the resistor, as John explained.
The max per pin on an SX is 20mA I believe (maybe 25?), but as a safty margin don't exceed 15mA. Also you will have to make sure that the total current of all I/O pins does not exceed the maximum for the chip, IOW you cannot drive all the pins at their individual maximums because you will exceed the overall maximum. You example would not fry your SX20. If you are simply trying to read a DIP switch, you would setup the pin as an input and have the following configuration:




 
  ^ Vdd
  |
  \
  /  10K Ohm
  \
  /
  |
  |  \ Switch
SX-+-- \---
          |
        __|__    
         ___  GND
          _
 
 

Since the SX pin is configured as input, the current flowing through the SX pin is negligable. If the switch is on the SX will see a 0, if it is off it will see a 1.

Now for LEDs, they have a voltage drop across them when they are turned on (V[sub]f[/sub]), so to calculate the correct value for your resistor, use: R=(V[sub]dd[/sub]-V[sub]f[/sub])/I, where I is the desired current, not to exceed the maximum current for the SX pin, then choose the closest value of resistor that is higher than the resistance you calculated. Never drive an LED without a current limiting resistor, even if you are doing switching to limit the overall current, if there is a bug in you program, or if you program hangs while the pin is on, you will fry your LED and perhaps even the SX. If the number of elements you have to drive requires more than the total current the SX20 can handle, you will have to use a driver for the LEDs such as a darlington array.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86270
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@143046 by Chris Savagen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Chris Savage wrote:

I think these gentlemen has summed this up pretty well for now.  Just remember, when LEDs are rated x amount of milliamps, that's what you need to adjust, not what it will use by default.  If you wire it directly to Vdd it will take what it can get.  The Resistor is there to limit the current to the specifications.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86277
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@154115 by Electronegativityn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Electronegativity wrote:

Hi all, thanks for the input.

John: Your calculation would be correct if the SX could source one amp per pin.

According to the documentation, the SX20 can source 30 milliamps per pin with an absolute maximum value of 45 milliamps per pin.

I read the entire document ( http://www.parallax.com/dl/docs/prod/datast/SX2028AC.pdf ) without seeing an explicit reference to a maximum total current sourced by all pins, but there is something in there that says the power dissapation is 700 milliamps. If this is the correct value then there is no need to worry since running all 12 output pins at their absolute maximum rating would only source 540 milliamps. At the normal output level the sum would be 360 milliamps.

Someone please correct me if the above calculation is wrong!

Paul: I am confused by your diagram; do you have one pin connected to both ground (through the switch) and Vdd?
It looks like throwing the switch would create a short circuit directly from Vdd to ground through the 10K resistor.
is there anything wrong with setting the pin as an output, pulling it high internally, then connecting it to ground through a resistor and a switch so the read command would give 1 if the switch is open and 0 if it is closed?


Would an output pin burn out if I pulled it high internally and then hooked it directly to ground with no resistor?
In order to use John's calculation I would have to know the maximum current that would actually come out of a pin if you pulled it high and connected it directly to ground.

Also, do I need to connect both Vdd pins of an SX20 to +5V and both Vss pins to ground?

I don't mean to be annoying with all the questions, but I burned out half the segments on 3 LED displays over the weekend and would like to avoid a similar fate for the next batch.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86291
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@174128 by johncouturen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, johncouture wrote:

================
LED:

An LED is basically a diode that emits light when power is going through it in the proper direction.  If you forget to put a resister in line it will draw too much current and you'll burn it out.  A light bulb is like an LED but with a resistor.  The light bulb filament has enough resistance built in that limits the amount of current that it draws.  Although a light bulb is rated in WATTS, that can be converted to Amps.  The summary: LED's need resistors in line.  470 ohm is ok but you can go down to 330 in some cases.  Much lower than that and you may draw too much current on the chip (MCU)  and cause the MCU to heat up and fry some internal circuitry.

A good discussion on this is available from What's a microcontroller? book (free Parallax download http://www.parallax.com/dl/docs/books/edu/wamv2_2.pdf).  This book is often referred to as "WAM" in the forums.  Specifically see page 40 through 45  in the manual (which is page 49-54 in the PDF)
=====================
Total Current for All LED's:

As was stated in earlier posts, if you need to drive many LED's at the same time, have the chip (MCU) lite them in sequence but at high speed.  That way they all look lit and yet it is not such a strain on the MCU.  The total amount of current allowed at any momemt in the Ubicom SX is stated on page 39 of the datasheet under section 17.1, "Absolute Maximum Ratings".  It states that "Max current out of Vss pin" is 130mA .... remember if you have a bunch of LED's lit at the same time the MCU has to GET that current from somewhere ... thus the restriction on how much current can travel through Vss (or Vdd for that matter).

==========================
Connection to both +5VDC and ground:

Paul's diagram does indeed connect the MCU pin to both +5vdc and ground.  However, there is a 10K resistor between the pin and +5vdc and a switch between the pin and ground.  This circuit implies two states: High (default) and Low (momentary).  The high state is because there is always a trickle of current coming through the resistor.  With a 10k resistor, only a very small trickle of current gets through.  When you press the button, you open up a huge drain (think of a dry river culvert).  The MCU thus reads the pin a being LOW.  
Chapter 4 in the WAM book referenced above has a great discussion about this.  The book is a excellent source of fundamental information on electricity and electronics.  I highly recommend going through it even if you only skim it.  I am embarassed to admit how much I learned about electricity and electronics by forcing myself to go through this tutorial but I am also grateful and indebted to Parallax for providing such an excellent resource.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86304
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@175105 by johncouturen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, johncouture wrote:

Oops, that was Chapter 3 in WAM is the discussion about connecting the pin to both +5 and ground through resistors and switches.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86306
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\29@192209 by Electronegativityn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Electronegativity wrote:

My printer is chugging ink and spewing paper  :cool:

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86319
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\30@052136 by Coriolisn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Coriolis wrote:

[Quoting: "Electronegativity"]
Hi all, thanks for the input.

Paul: I am confused by your diagram; do you have one pin connected to both ground (through the switch) and Vdd?
It looks like throwing the switch would create a short circuit directly from Vdd to ground through the 10K resistor.
is there anything wrong with setting the pin as an output, pulling it high internally, then connecting it to ground through a resistor and a switch so the read command would give 1 if the switch is open and 0 if it is closed?

Using R = (Vdd-Vf)/I with Vdd = 5V, Vf = 2.5V and I = 20mA, I would need a 125K resistor.
That seems a bit high, but I guess I can start with 125K and work my way down if it doesn't work or if it's too dim.


Would an output pin burn out if I pulled it high internally and then hooked it directly to ground with no resistor? YES
In order to use John's calculation I would have to know the maximum current that would actually come out of a pin if you pulled it high and connected it directly to ground. Dont do this, don't ever try to force a pin to two different values.

I don't mean to be annoying with all the questions, but I burned out half the segments on 3 LED displays over the weekend and would like to avoid a similar fate for the next batch. you aren't, your doing the right thing by asking questions rather than bullheadedly proceeding without understanding what is wrong.


John answered the question regarding the operation of the circuit I posted, a short is a low resistance path between Vdd and ground, since the 10k Ohm resistor is there (causing 0.1 mA to flow when the switch is on), this is not a short.



[Quoting: "Electronegativity"]
is there anything wrong with setting the pin as an output, pulling it high internally, then connecting it to ground through a resistor and a switch so the read command would give 1 if the switch is open and 0 if it is closed?



Configuring the pin as output will not accomplish what you think it will, because the resistor is there, the voltage at the pin will be high, meaning if you try to read the pin, it will be a 1. The only way the output will not agree with the input, is by forcing the voltage at the pin itself to be low (by tieing it directly to ground), and this is how you fry your SX.


Your calculation is wrong, the units of measure used in the equation are Volts, Amps and Ohms. So plugging in the values you gave R = (5-2.5)/0.02 = 125 Ohms or 1/1000[sup]th[/sup] the value you calculated.


There seems to be some fundamentals of circuit design that are escaping you, read the WAM text, it covers many of the basic principles. Because you are working with LEDs and they are sensitive devices, they are burning out because you are connecting them improperly. In a way, is very fortunate for you because when the LED burns out, your SX pin is protected from this improper hookup; but do this with a more robust device and you will fry your SX.


Diodes (including LEDs) are exponential devices, meaning a small change in the voltage across the device causes a large change in voltage. The equation is:

http://en.wikipedia.org/math/109c605701a37ae869c22ca9e2389ccc.png
don't work about what all those letters mean, just look at the V[sub]D[/sub] which is the voltage across the diode and how a a small change in it causes a change in current on the order of e(V[sub]D[/sub]), this is a huge change, so by forcing the voltage across the diode to be twice what it expects it to be, you are creating a current flowing through it that is way beyond what it can handle. This is why the current limiting resistor is nessesary.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86350
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\30@092637 by Electronegativityn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Electronegativity wrote:

Thanks Paul, I see now that I mixed up milliamps and microamps.  :blush:

What about a switch between two SX pins with one configured as input and the other as output?
Would the chip fry itself without a resistor in between?
If so then what value would you reccomend?

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86379
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\08\30@095607 by Coriolisn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Coriolis wrote:

[Quoting: "Electronegativity"]
What about a switch between two SX pins with one configured as input and the other as output?
Would the chip fry itself without a resistor in between?
If so then what value would you reccomend?

This would work, but if you are writing the value to the output, you already know its value (since you wrote the value), so this doesn't make sense to do, it just wastes two pins. Since one is input and the other is output, no resistor is needed, but if you want to prevent accidental mistakes from occuring due to improper programming, place a resistor between 220 and 1k ohms as a safety (440 is a good value). If you are using the output pin to pullup the line read by the input pin (ie the output pin is always a 1), the output pin is a wasted pin, just use a pullup resistor like I showed in the circuit diagram.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=86217#m86387
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...