Nano Input Portpins for Keypad

Hello,

I have a problem with the input port.

So far I’ve run a keypad with the FEZ Spider Board, which also works very well.

Now I want to connect the keypad andem NanoBoard Sytech. It’s not a GHI board, but still Gadgeteer compatible. I use a socket with 7 GPIO as in Spider Board. However, always with an ArgumentException is thrown. I point to the ResistorMode, the error message is gone. Nevertheless, it does not work. The GPIOs can also set different?

Here a snipet of the Code:


public Keypad(int sockelKeypad)
        {
            try
            {
                // set up our pins
                Cpu.Pin P3 = GT.Socket.GetSocket(sockelKeypad, false, null, null).CpuPins[3];
                Cpu.Pin P4 = GT.Socket.GetSocket(sockelKeypad, false, null, null).CpuPins[4];
                Cpu.Pin P5 = GT.Socket.GetSocket(sockelKeypad, false, null, null).CpuPins[5];
                Cpu.Pin P6 = GT.Socket.GetSocket(sockelKeypad, false, null, null).CpuPins[6];
                Cpu.Pin P7 = GT.Socket.GetSocket(sockelKeypad, false, null, null).CpuPins[9];
                Cpu.Pin P8 = GT.Socket.GetSocket(sockelKeypad, false, null, null).CpuPins[8];
                Cpu.Pin P9 = GT.Socket.GetSocket(sockelKeypad, false, null, null).CpuPins[7];

                // set up our matrix
                Rows[0] = new OutputPort(P3, false);
                Rows[1] = new OutputPort(P4, false);
                Rows[2] = new OutputPort(P5, false);
                Rows[3] = new OutputPort(P6, false);

                Columns[0] = new InputPort(P7, false, Port.ResistorMode.PullDown);
                Columns[1] = new InputPort(P8, false, Port.ResistorMode.PullDown);
                Columns[2] = new InputPort(P9, false, Port.ResistorMode.PullDown);
            }
            catch (ArgumentException e)
            {
                Debug.Print("Meldung: " + e.Message);
            }
        }

Which pin throws the exception? Btw you have 7 and 9 switched.

Try to get rid of Resistormode.Pulldown, not all MCU/firmware support this mode.

On spider not all pins are interrupt capable. By socket specification - pin3 is usually an interrupt pin.

You can verify if pins you are using are interrupt capable by getting the IO number first from the Spider schematics:

http://www.ghielectronics.com/downloads/Gadgeteer/Mainboard/Spider/FEZ%20Spider%20Schematics.pdf

Then you can check in the EMX pinout if that pin is interrupt capable (pins that have *)

http://www.ghielectronics.com/downloads/EMX/EMX_Broch_Pinout.pdf

With the Spider Board, there is no problem with my Keypad. It works fine.
I have a problem with the GPIOs on Nano-Board.

The Pins 7,8,9 throws the Exception on Pull-Down Resistor Mode.

I use the same, 7GPIO, socket.
The Pulldown Resistor Mode does not work. I think that on the board are just pull up resistors.

If i use Pull-Up-Resistormode:

If I measure the voltage between the input port and GND, then I measure 3.3 V. That is also correct. At a set output port I attach no 3.3 V. Actually, there must be present 3.3V. Or?

Spider uses EMX module from GHI. Nano uses… maybe Sytech are more likely to be able to assist?

As others have mentioned, the processor on each board needs to support different resistor modes. You’re going to have to look at that avenue I think

I agree, you have to check the Nano documentation.

The documentation is very poor.

It works now. Previously it worked in the pull-down mode and a query to true if a signal arrives. Now I have applied the reverse logic in the pull-up mode and a query to false and it works.

Because I would so have to come on it!

Thank you.