So I remember now why I was having trouble following this. The value of the D port is 0. When set to output it draws the input port low. I didn't realize you had to have pull up resistors in the keypad circuit to keep the input port high whenever not being pulled low. The original circuit using this code that I saw had weak pull up resistors enabled and no external resistors, but the port I was using did not have weak pull up resistors associated with it.
Bookmarks