Jump to content
  • 0

Different current flow on 2 output pins of JE standar Pmod port


enriqeat

Question

image.png.31f4caae4ed989bab9faf6d0dc9de3b2.png

Hi, I am working on Zybo and not entirely sure how the outputs will behave when 2 leds are connected as the figure shows.  Pins JE1 and JE2 are configured as PWM outputs for the PL on the same port (JE single-ended standard Pmod port) and the VCC and GND pins shown in the figure are located on the same port as well. The usual thing to do is to supply energy to the external led as shown on the left of the figure, but can I connect a second led as shown on the right at the same time? I understand the if the pin is an output, then current should exit from it, but what happens when current enters? By the way.. I've tested both circuits independently (i'll wait an answer to connect both circuits at the same time) and they turn on the led with the respective duty cicle of each PWM, but still why does it work when a current enters the output pin?

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @enriqeat,

Presuming you are not using the same physical R1 in both circuits, the short answer is that you can run both circuits at the same time for your particular setup*. If you attempted to have the same physical R1, you will have D2 on all the time and D1 on some of the time, and a short whenever JE2 is set high (so don't set it up like I show in the attached picture). Two independent circuits will work in this situation though.

As for why the circuit on the right (VCC going to JE2) works, this is because when JE2 is set as an output logic low (effectively ground with the CMOS logic), there is enough voltage potential from JE6 (VCC) to the grounded JE2 for current to flow through the LED, even though JE2 is technically an output.

 

* As a caveat to consider though, the set-up on the right (with JE2 effectively acting as the "gatekeeper" to whether or not current flows) is not recommended as good hardware practice. The reason for this is because when JE2 is set to output logic high, what you are counting on is that the logic high voltage it provides matches VCC so there is no voltage potential between the two points and consequently no currently flow. If there was some difference in voltage, current would flow and damage one of those points (either the VCC rail or the JE2 output).

The reason this works a bit better for your setup is because you have an LED which will not allow current to pass through unless the voltage threshold is met (usually around 0.7V), so with the combination of this and the over-voltage protection on these pins and on the Zybo board (I'm presuming you are using the original Zybo rather than one of the Zybo Z7's, though this should still apply on port JE in either case), you should not have any differences in voltages to be worried about. I can also confirm that I ran both circuits (separate circuits) at the same time without any issue.

Let me know if you have any questions.

Thanks,
JColvin

combined LED circuits.png

Link to comment
Share on other sites

Hi,

>> I understand the if the pin is an output, then current should exit from it

Most likely, your understanding of the output cell is wrong.The point is the "C" in CMOS, "complementary". Look at the first picture in the link - there are two (MOS) transistors, one to positive supply voltage and one to negative / GND. The pin can source and sink current. This is the magic behind almost all  modern digital circuitry.

And if anybody wonders what would happen if both switches would open at the same time. Magic smoke appears  ?

Link to comment
Share on other sites

JColvin, thank so much for your answer, and sorry for the picture, it was supposed to be the next one

image.png.f9ead8226f5ecd4d313c854823537713.png

two leds, and 2 resistors.. and yes, I am working with the retired version of ZYBO, just want to connect this two circuits at a time and expect nothing to explode.

xc6lx45, thank you too, I understand way better now why an output can have 2 directions for the current.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...