• 0

Pmod IOXP and PmodKYPD interoperabilty issues


Question

Hi, I'm currently having some trouble in getting the PmodIOXP and PmodKYPD to play well together. Separately, I have no issues in running either Pmod in a standalone fashion e.g. I can run the PWM output on the PmodIOXP with no issues, and I can drive the PmodKYPD correctly using the GPIO outputs of a Raspberry Pi. So I know there are no problems with either Pmod. However, when I connect the KYPD to the IOXP (via J1) and configure the IOXP for what I think is correct KYPD use, the column lines never go low as is standard for matrix switch operation. This means key presses cannot be detected by the IOXP. The register settings I use on the IOXP are as follows (Am I missing anything?):

PIN_CONFIG_A 0x49 = 0x0F.
PIN_CONFIG_B 0x4A = 0x0F
INT_EN 0x4E = 0x01

These seem to be the main settings I need. I've played around with other settings such as pull-ups to no avail.

The only thing I can think of from a hardware point of view is that because there are 10K pull-ups on the PmodKYPD, it may mean that in conjunction with the 300K internal pull-ups of the PmodIOXP (giving an effective resistance of ~9K) the column lines will not pull down properly to a logic low level. Can you please confirm? I could take the 10K resistors off the PmodKYPD to confirm this theory, but would rather some feedback before I hack the module. (Also, I'm clutching at straws regarding the pull-ups, as from reading the ADP5589 datasheet, I think an effective 9K pull-up resistance should be fine. But I can't be sure).

 

 

Edited by DerekM
typos, added ADP5589 datasheet link
Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi Derek,

The PmodIOXP demo has an example sketch IOXPDemoInt here for MPIDE that has the PmodKYPD plug into the PmodIOXP like you are describing. The sketch/libraries should help you get your project working. I used the cerebot MX4 ck chipkit which as essentially the same as the chipKit pro MX4. I was not able to get the sketch to work in the Arduino IDE but was able to get it to work in the MPIDE IDE. I have included some pictures below of my setup. Hope this helps!

thank you,

Jon

 

pictures_(1).zip

Edited by jpeyron
Link to post
Share on other sites
  • 0

Thanks for the reply Jon. Your set-up looks very similar to mine (all-be-it I have a different platform i.e. the RPi, but that's only related to the I2C comms which I know is working on my set-up), so this is promising. I'll look through the MPIDE code and try to reverse-engineer it for my purposes. I'll post back if I can get this working (or not).

Derek.

Link to post
Share on other sites
  • 0

Spotted the issue by looking through your code; I just needed to enable the OSC_EN bit of the GENERAL_CFG_B register (0x4D). Column lines are driven low as expected now, and the row/column lines are switching correctly for key presses. I can carry on with the rest of my code now. Thanks a million for your help, really appreciated! :)

Regards,

Derek.

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now