Ovidiu Posted November 1, 2017 Share Posted November 1, 2017 Hi, if I wish to connect external push-buttons to IO ports (on Arty Z7-20) is it necessary to use also resistors or it will be nu problem to connect VCC to GND (1 to 0)? Link to comment Share on other sites More sharing options...
jpeyron Posted November 1, 2017 Share Posted November 1, 2017 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 More sharing options...
Ovidiu Posted November 1, 2017 Author Share Posted November 1, 2017 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 More sharing options...
jpeyron Posted November 1, 2017 Share Posted November 1, 2017 Hi @Ovidiu, What is the specific external temporary push buttons you are trying to connect to the IO of the Arty-Z7-20 and I should be able to tell you if you need a pull-up/pull down resistor or not. cheers, Jon Link to comment Share on other sites More sharing options...
Ovidiu Posted November 2, 2017 Author Share Posted November 2, 2017 I have simple temporary push buttons, like those in the attached picture. Link to comment Share on other sites More sharing options...
JColvin Posted November 2, 2017 Share Posted November 2, 2017 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 More sharing options...
Ovidiu Posted November 2, 2017 Author Share Posted November 2, 2017 any recommendation regarding the value of the resistor? (just to be safe) Link to comment Share on other sites More sharing options...
JColvin Posted November 2, 2017 Share Posted November 2, 2017 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 More sharing options...
Ovidiu Posted November 4, 2017 Author Share Posted November 4, 2017 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 More sharing options...
JColvin Posted November 6, 2017 Share Posted November 6, 2017 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.