chipKIT® Development Platform

Inspired by Arduino™

Digilent KYPD

Created Mon, 20 Jan 2014 20:40:23 +0000 by farnorth


farnorth

Mon, 20 Jan 2014 20:40:23 +0000

Hello,

I'm trying to hook up the Digilent KYPD to my Max32 and I'm having some issues and have some questions.

The pad has 12 pins. Pins 5 and 11 are Ground and Pins 6 and 12 are 3.3V. Looking at the board and it's schematics (http://www.digilentinc.com/Data/Products/PMODKYPD/PmodKYPD_sch.pdf ), it should be safe to assume that those pins could be combined together. On the keypad board it looks likes there's two thick traces joining the power pins and the ground pins respectively.

Now, when I plug everything in and run a test code in MPIDE, I can see correct keypressses except my Column 1 and Row 4 does not work. I checked the resistors and they all seem to be okay. Visually, there doesn't seem to be any physical damage to any connections.

I was checking the resistances on each pin and I'm getting a weird reading between pins 6, 7, 8. Between 6 and 7, I am reading 20k Ohms, between 6 and 8 I am reading 20k Ohms and between 7 and 8 I am reading 10k Ohms. Do I have a short somewhere? Because looking at the schematic, those pins all go into their chip and I would imagine that there should be no contact?

Any other ideas to check why my Col1 and Row4 don't respond?

Thanks! Artem.


farnorth

Tue, 21 Jan 2014 17:58:36 +0000

Wow, digilent support is in Romania?!


farnorth

Thu, 23 Jan 2014 13:28:11 +0000

So I've called the company and a girl told me they don't do technical support over the phone and told me to send out an email to their technical department. It's been 2 days now and I had zero contact from them. Not even an acknowledgement that they've received my issue. I ended up placing an order for another keypad to replace this one in case there is something physically wrong that I can't see.I am pretty disappointment in the lack of good service.


farnorth

Fri, 24 Jan 2014 13:29:13 +0000

Update: Just got an email from Digilent with some troubleshooting suggestions. Will keep you updated.


Ian_B

Mon, 27 Jan 2014 23:27:59 +0000

I understand this issue is being addressed through regular Digilent support channels, but I thought that posting some code as a start point for anyone else trying to implement a PmodKYPD would be helpful.

Digilent has an MPIDE library available for the KYPD on its website. This contains an example sketch for reading input from the keypad and displaying it using a Cerebot MX4cK or chipKIT ProMX4 ([url]http://www.digilentinc.com/Data/Products/PMODKYPD/KYPD.zip[/url]). This sketch can also be used to troubleshoot the KYPD. Pressing each button results in a serial output that displays the row and column data for the button, in addition to its decimal representation (Button "0" = 0, Button "A" = 10, Button "B" = 11, etc). If pressing a button does not produce the correct output and everything is configured correctly, there may be a problem with the KYPD or chipKIT board.

I have also attached the KYPD library with an example sketch that uses the Max32 instead of the MX4cK. The wiring for using the KYPD with a Max32 is listed in the MPIDE sketch, but I've included a picture to try and make things clearer.


farnorth

Wed, 29 Jan 2014 14:42:10 +0000

This is an email I just sent to support. If any one has any suggestions or input, I'm all ears.

Hi Cristian,

I ended up getting another keypad instead and it works when I plug it directly into the Max32. I am having trouble getting it to work over 2ft wire. Getting some real funky things. What are something I can check for?

Problem: Key Pressed on keypad> key detected by Max32: 1 -> 1 2 -> 2 3 -> 3 4 -> 1 5 -> 2 6 -> 3 7 -> 1 8 -> 2 9 -> 9 0 -> 0 A -> 10 B -> 10 C -> 10 D -> 10 E -> 14 F -> 15

Things I know: Keypad works when plugged in on its own using the provided cable. The cable has the correct pins coming out.

Questions: Can the length of wire cause too much resistance? I checked voltage and from Max32 to the other end of the cable and I am getting 3.28V. I’m guessing that shouldn’t be a problem.

Can the length of wire affect the signal some way? I am using shielded cable (http://www.mcmaster.com/#7673k42/=qg9a2x) for the wires 1,2,3,4,7,8,9,10 and shielded cable (http://www.mcmaster.com/#6650t33/=qg9aob) for pins 11 and 12 to provide ground and 3.3v.

Because all the signal wires are together in the big cable, can they be interfering with one another?

Can Max32 be checking things too fast because of the long wire? Possible delay?

Any suggestions would be helpful.

Thanks! Artem.


Ian_B

Fri, 31 Jan 2014 22:20:27 +0000

I am having trouble getting it to work over 2ft wire. Getting some real funky things.

What exactly is it that you are seeing? Are keypad presses being ignored?

Wires do have an inherent resistance associated with them, but it should be negligible for your wire. The length could be causing a slight delay in the transmission of signals, but again this should be minimal. You can always use a slightly longer delay with your running zeros on the bottom row of pins on the keypad, in case there is a timing issue.

Also, have you tried debouncing signals coming from the keypad into the Max32?