0
\$\begingroup\$

I expect output voltage of dsPIC pin should be 3.3V, and this seems to be true when the output pin is connected to high resistance.

enter image description here

However, when I connect to low resistance, the voltage of output pin is pulled low.(The image below shows the voltage is 2.75V).

enter image description here

I suspect it is caused by the circuit in the microchip, but I don't know how to analyze it.

enter image description here

BTW, here's the datasheet of this chip.

\$\endgroup\$

2 Answers 2

5
\$\begingroup\$

The output pins of a micro can only supply so much current. If you try to draw more current then they can provide, the voltage will drop (as you are experiencing).

Here is the documentation for the microprocessor you are using:
enter image description here Datasheet page 231, Section 24.0 - "Absolute Maximum Ratings"

As you can see, the datasheet only rates the IO lines to supply an absolute maximum of 4 mA each (and you should derate the them as well. Use 2-3 mA as a safe limit). As such, you're actually exceeding the MCUs rated current by an order of magnitude! (\$\frac{V}{R}=I, \frac{3.3V}{100Ω}=33 mA\$). I don't know how the simulator you are using handles this sort of abuse, but with the real micro, you could very well damage the output buffer of the IC.

To some extent, you can think of the output of each IO pin as being a perfect output driver in series with a resistor (really, it's more complicated - there is also inductance, capacitance, and some fun non-linearities, but we'll ignore those for now). As such, even if you are not exceeding the absolute maximum ratings, there will be some voltage sag as you load the IO pin.

From the datasheet referring to the (1) next to the "Absolute Maximum Ratings" line:

Note 1: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only, and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability.

\$\endgroup\$
6
  • \$\begingroup\$ Conner, please please don't use the AMR section of the datasheet!! Those figures are NOT ratings for normal operation (as your quote states), so saying "the datasheet only rates the IO lines to supply up to 4 mA each" on the basis of the AMR is WRONG. \$\endgroup\$ May 31, 2013 at 7:57
  • 1
    \$\begingroup\$ Typical output current is 2mA. (As Wouter could have seen if he had been feeling helpful). However, since the data sheet doesn't quote a maximum other than the absolute maximum, AMR was the correct value to reference in this answer. \$\endgroup\$
    – david
    May 31, 2013 at 9:02
  • \$\begingroup\$ @WoutervanOoijen - I included the section of the datasheet that describes how operating the device at the AMR, as well as above it, can be a bad idea. Exposure to maximum rating conditions for extended periods may affect device reliability. \$\endgroup\$ May 31, 2013 at 9:13
  • 1
    \$\begingroup\$ @Connor - but you use the AMR snippet to justify your claim that "the datasheet only rates the IO lines to supply up to 4 mA each". That is misleading, the AMR section states that 4mA is outside the normal operating conditions (and says nothing about which range of current is inside, for that you need the Normal Operating Conditions). \$\endgroup\$ May 31, 2013 at 11:21
  • \$\begingroup\$ The a common mistake I've seen is exceeding the current/sourced for all pins/ports ... that's the following 2 lines after the highlighted ones. \$\endgroup\$
    – Spoon
    May 31, 2013 at 11:23
3
\$\begingroup\$

A more general approach to a problem of this kind is to think of the output pin in terms of a 'black box'. The contents of the box is reduced to a voltage source and internal series resistor. (This is known as the Thevenin equivalent circuit). The cell is not a 'real' cell or battery, it merely represents the voltage supplied by the circuit for calculation purposes.

When there is no load (open circuit) the output voltage will be equal to the internal cell voltage.

If you short circuit the output then the output voltage would be 0V and the current = internal voltage / internal resistance.

Any external resistance (load) between open circuit and short circuit that you place on the output will lower the output voltage.

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ The output pin has only one line, I don't understand how to model it as black box with two lines. Can you explain that? Thank you~ \$\endgroup\$
    – Po-Jen Lai
    Jun 3, 2013 at 11:45
  • \$\begingroup\$ @Ricky - The chip has a connection to ground (0V) so the voltage of the pin is measured relative to ground. The external circuit (load) is connected from the pin to ground (return). The top connection will be the pin, the bottom connection of the black box is simply the ground. \$\endgroup\$ Jun 3, 2013 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.