Issues simulating 4x4 Matrix Keypad

Discussion on both general simulation and Proteus VSM microcontroller simulation.
Post Reply
enricoan
Unlicenced User
Posts: 2
Joined: Mon 2020-05-18 1:49

Issues simulating 4x4 Matrix Keypad

Post by enricoan »

Hey folks, it's my first time posting here, so I don't know if there are any special rules for this forum. Anyways, I'll try to follow other posts' format. I've recently started using Proteus to develop a CNC machine but I'm having some troubles while programming the Human-Machine Interface. In that sense, the problem is that independently of the pressed button on the keypad, it always identifies that the first column is also pressed.
I've considered some possibilities regarding the microcontroller clock speed (set at 8M) or Proteus' other refreshing properties and, obviusly the program inserted in the microcontroller. To help better understanding the problem, I'll attach some screenshots related to the encountered issues. Any help is welcome and thanks in advance!
Attachments
while loop used in the program
while loop used in the program
while-min.jpg (17.28 KiB) Viewed 373 times
function responsible for returning the pressed key
function responsible for returning the pressed key
pega tecla-min.jpg (183.05 KiB) Viewed 373 times
Image showing that even though I'm pressing the button in the second row, the first column is also identified as being pressed.
Image showing that even though I'm pressing the button in the second row, the first column is also identified as being pressed.
apertando botao-min.jpg (228.12 KiB) Viewed 373 times
enricoan
Unlicenced User
Posts: 2
Joined: Mon 2020-05-18 1:49

Re: Issues simulating 4x4 Matrix Keypad

Post by enricoan »

As an extra detail, I'd like to add that sometimes the column of the pressed button "freezes" on the high state and will only go back to the "low" once the simulation is restarted
Post Reply