Hi All,
Like a lot of others I am new to this. I wanted to develop a function generator so I designed a development board with a number of external components including a 4x4 matrix keypad. It all electrically is connected correctly and in the program below the flashing LEDs work but I cannot get the 4x4 board to even light up a LED..
I have used the code from here as a start
https://www.qsl.net/pa3ckr/signalgenerator/keyb441.txt
I have attached both the schematic and the code I have been working on.
In the end I have set both RB4-7 to INPUTS and RD4-7 to INPUTS. [should they be both inputs???] I am not sure this is OK but it seems to work in MPLAB when using stimulus.
There are weak pullups on PORTB. I am not sure how this ties into the process but there is 5 volts on the each of the pins on the matrix board (EDIT 5 volts on RB4-7 and 1.48volts on pins RD4-7)...
I have no way of know if the 4X4 board is connected properly.
Anyway any help here would be greatly appreciated...
Simon
View attachment keypad..txt
Like a lot of others I am new to this. I wanted to develop a function generator so I designed a development board with a number of external components including a 4x4 matrix keypad. It all electrically is connected correctly and in the program below the flashing LEDs work but I cannot get the 4x4 board to even light up a LED..
I have used the code from here as a start
https://www.qsl.net/pa3ckr/signalgenerator/keyb441.txt
I have attached both the schematic and the code I have been working on.
In the end I have set both RB4-7 to INPUTS and RD4-7 to INPUTS. [should they be both inputs???] I am not sure this is OK but it seems to work in MPLAB when using stimulus.
There are weak pullups on PORTB. I am not sure how this ties into the process but there is 5 volts on the each of the pins on the matrix board (EDIT 5 volts on RB4-7 and 1.48volts on pins RD4-7)...
I have no way of know if the 4X4 board is connected properly.
Anyway any help here would be greatly appreciated...
Simon

Last edited: