Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about how to read the HEX keypad

Status
Not open for further replies.

louislu

Member level 1
Joined
Apr 5, 2004
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
426
keypad

i need to implement a keypad for my proj and i've noticed this webside **broken link removed** tutorial 9 inside had mentioned about how to read the HEX keypad.here are some of my doubt regarding it.

1.i only have few push button so is this program appliable for me?
2.how to connect those push button to make it as keypad.if i use these push button to construct as keypad then do i need to make any changes to the program?i means tutorial 9.is there any schematic diagram for better understanding...

hope can hear from u asap...thanks lot
 

Re: keypad

yes u can leave unwanted points open but then you will get less number of possible input option. If you are useing a specific PIC controller then go to https://www.microchip.com there are alot of application not on this. u can have an other good idea from app. notes at www.atmel.com for AT89C2051 uC
 

Re: keypad

Hi, the following online book has the topic on pushbutton connection.

**broken link removed**

:p
 

Re: keypad

Hello,

Yes you can use a smaller number of switches than the 4x4 keypad matrix. just electrically arrange the connections to rows and columns and implement the scanning routines only on the I/O oins connected to these rows columns.

If you tell me what number of switches you want I can show you an example schematic and code.

Regards,

GAM
 

Re: keypad

thanks very much for all of your help...

gam,u said that u have a schematic and code so do u mind to share with me.the chip i using is pic16f628...thanks again...

here is my input connection for col1-col4...conenct to four resistors to pull lines col1-col4 high.Is it correct?
 

Re: keypad

Hello,

Atached is a common keypad implementation, you can have any number of columns (each additional column will require one I/O pin though.

the rows are initialized as inputs and are pulled high by the resistors.
the rows should be connected to Rb4-Rb7 and use the interrupt on change onthese pins feature.

the columns should be initialized as "low".

When a key is pressed, the row is pulled low and an interrupt triggered.

next you start the scanning routine:
Apply a low on one a single column and a high on the other columns and read the rows. The row wich reads low is the one where the key is pressed.

by combining the column/row info you got you can detect the key pressed.

I will send you the assembly code later because I am not on my personal PC now.

regards,
gam
 

Re: keypad

Thank u very much gam...will b waiting for your assembly code.The chip i m using is pic16f628.is it compatible?
 

Re: keypad

Hello,

Sorry I have been busy lately.

attached is th famous "Thomas McGahee" Keylock. You can customize it to remove the parts you don't need (the code verification part and EEPROM storage). If you specify how many keys you want exactly I can help you customize the row/column scanning routines.

I have tried this code before and it works perfectly.

Yes the PIC16F628 is copatible, just modify the configuration word and add the CMCON =0x07 to turn off the analog comparators
 

    louislu

    Points: 2
    Helpful Answer Positive Rating
Re: keypad

Dear gam,really thanks u very much...currently the code written by myself seems did not work.and the deadline for my proj at the corner somemore...The keypad i need is 3x4.jus for user to enter their password and verification.it don use EEPROM.i will b grateful if u like to customize the prog for me...anyway,really thanks lot...
 

Re: keypad

Thank gam for your help in keypad program...after i customized it and it able to work perfectly.again thanks very much.

Actually i found tat the program make use of on-chip EEPROM for storage purpose....i also thinkin to use EEPROM for my project but is external EEPROM.The model is M24C64.Is there any example code for this EEPROM? The requirement is pretty simply, just need to write and read from the EEPROM. Using PIC16f628...Thanks very much
 


Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top