Jump to content

external push-buttons need resistors?


Ovidiu

Recommended Posts

Hi @Ovidiu,

I would suggest to read through the datasheet of the push buttons you intend to use for correct use. Here is the reference manual for the Arty-Z7-20. You can see current and voltage output for the Pmod ports and the arduino/chipkit shield header in section 15 and 16. As a reference Here is the schematic for our Pmod BTN here. Without knowing more about your setup I can not give you a better answer. I would guess that you would need to use resistors. Here is an Arduino example that uses a resistor in their circuit.

cheers,

Jon

Link to comment
Share on other sites

Using some external temporary push-buttons that are mounted on a breadboard, I want to safely turn ON (blink) the LEDs that are mounted on Arty Z7 board. As I know the LEDs have onboard resistors to protect them. In order to protect the IO ports (GPIO) of FPGA, is it necessary to connect resistors to push-buttons? In other words: a direct connection between GPIOs is allowed?

Link to comment
Share on other sites

Hi @Ovidiu,

The formal recommendation is that resistors should be used with the push buttons. Some of the Arty Z7-20 IO ports (i.e. the ones on the Arduino styled headers) do have resistors already embedded into their circuitry so you would not have to worry, but the IO pins on the Pmod ports do not have any current limiting resistor, so I would recommend using external resistors. I realize that the embedded LEDs in the Arty Z7 also have resistors of their own so in theory the resistor portion is taken care of, but I am not completely sure how Vivado might implement the actual wiring inside the FPGA, so it'll be safest to use a resistor in this case.

Let us know if you have any questions.

Thank you,
JColvin

Link to comment
Share on other sites

Hi @Ovidiu,

If you are using a Vcc of 3.3V, you can use a resistor value somewhere between 100 Ohms and 470 Ohms without much issue. Naturally, the lower the resistor value, the brighter the LED. If you are using a higher voltage, you'll want a slightly higher resistor value (probably 470 Ohms).

Let us know if you have any more questions.

Thanks,
JColvin

Link to comment
Share on other sites

Excelent explanation for LEDs. But.... how can I safely use a simple temporary push button to trigger an event in FPGA, with no risk of over-current in IO ports?

for example, The Arduino Tutorial sais:

"Atmega pins can source (provide positive current) or sink (provide negative current) up to 40 mA (milliamps) of current to other devices/circuits. .... Short circuits on Arduino pins, or attempting to run high current devices from them, can damage or destroy the output transistors in the pin, or damage the entire Atmega chip. .... For this reason it is a good idea to connect OUTPUT pins to other devices with 470Ω or 1k resistors, unless maximum current draw from the pins is required for a particular application".

Link to comment
Share on other sites

Hi @Ovidiu,

Essentially, you would set up a very similar situation for the external push button. A nice clean example would be to set up the same circuit as shown as the Arduino tutorial image here but instead use your FPGA of choice rather than the Arduino board. Much like any microcontroller system, you will likely have to implement some debouncing with the FPGA.

Let us know if you have any other questions.

Thank you,
JColvin

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...