Switch buttons shorted when pressing two simultaneously (Multilplexing)

Status
Not open for further replies.

lloydi12345

Member
I am creating 16 switch buttons out of 8 pins in a microcontroller. Four are set for input while the other four are set for output and they are done in multiplexing. One column is scanned with '1' while the other 3 is '0'. The problem is, when two buttons are pressed simultaneously from a different column I think they are being shorted. I have seen this image in one site similar to mine but in his case he is using '0' to one column while the other 3 are '1'.


https://extremeelectronics.co.in/avr-tutorials/4x3-matrix-keypad-interface-avr-tutorial/

How can I avoid shorting of the pins? I am using PIC18.
 

Attachments

  • keypad_short2.gif
    26.8 KB · Views: 188
Start with all 8 lines as inputs, make only one of the columns at a time a low output, then make it an input again before testing the next column. That way there is no high-to-low short.

Or, put a resister in series with each column.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…