0
\$\begingroup\$

I am trying to write keypad (4*4) scan VHDL code for my DE10-lite board. In order to avoid floating signal for the input, I need pull up resistors.

enter image description here

There is an example I found from YouTube

However, the keypad only has 8 pins. How can I connect Vcc with pull up resistors to it?

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ So the FPGA has no built-in pull-ups or pull-downs? \$\endgroup\$
    – Justme
    Commented Feb 17, 2023 at 22:21
  • \$\begingroup\$ the keypad only has 8 pins ... why do you say only? ... the schematic diagram shows 7 pins ... your keypad has more pins than the schematic \$\endgroup\$
    – jsotola
    Commented Feb 17, 2023 at 23:11
  • \$\begingroup\$ @jsotola I use 4*4 keypad \$\endgroup\$
    – kile
    Commented Feb 20, 2023 at 8:34
  • \$\begingroup\$ the schematic diagram shows pullup resistors on all of the MCU input and output pins ... you connect the resistors the same way on your keypad \$\endgroup\$
    – jsotola
    Commented Feb 20, 2023 at 13:40

2 Answers 2

1
\$\begingroup\$

The simple answer to your question is to re-draw it with the pull-up resistors at the other ends of the rows and columns. It's electrically the same, but now the resistors can be connected to the pins.

\$\endgroup\$
1
  • \$\begingroup\$ Can you provide me a simple diagram as an example? \$\endgroup\$
    – kile
    Commented Feb 20, 2023 at 9:20
1
\$\begingroup\$

If you have 4x4 keypad as shown in figure, this is how it looks internally enter image description here

connect the pins 1-r1, 2-r2, 3-r3, 4-r4, 5-c1, 6-c2, 7-c3, 8-c4, there is no need of pull-ups. but if you want, you can connect four 10k resistors from r1,r2,r2,r4 to Vcc.

\$\endgroup\$
4
  • \$\begingroup\$ I tried this. It doesn't work. The following from this link is working learn.parallax.com/tutorials/language/propeller-c/… \$\endgroup\$
    – kile
    Commented Feb 20, 2023 at 8:36
  • \$\begingroup\$ @kile, It depends on how you write the scanning algorithm \$\endgroup\$
    – Chr_arj
    Commented Feb 20, 2023 at 8:56
  • \$\begingroup\$ How do you avoid floating signal of GPIO without resistors? \$\endgroup\$
    – kile
    Commented Feb 20, 2023 at 9:20
  • \$\begingroup\$ @kile, simply by connecting some pull ups or pull down resisitors, also i can use internal pull ups if present. \$\endgroup\$
    – Chr_arj
    Commented Feb 20, 2023 at 9:22

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.