Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

correct keypad interfacing...

Status
Not open for further replies.

nenayd

New Member
i found this source:


in keypad i put 4k7 pull-up resistors where row0-3 of keypad are pinned to rb0-rb3 respectively...and col0-2 are directly pinned to ra0-ra2 respectively...

the lcd works nicely but the pic only accept input from button 1 and 4 only...

can anyone correct my mistake with the keypad interfacing. thanks in advance...:D
 
P16F628 not available...

thanks a lot for the tutorial...but in our country only pic16f84a are available in market...can you tell the modification needed in your codelock source code and schematic suitable for pic16f84a.
 
Re: P16F628 not available...

nenayd said:
thanks a lot for the tutorial...but in our country only pic16f84a are available in market...can you tell the modification needed in your codelock source code and schematic suitable for pic16f84a.

The 628 is basically the replacement for the 84A, which is effectively obselete. All you need to do is remove the write to CMCON (which the 84A doesn't have) and alter the config fuse settings, also be aware of the 84A's port limitations, you will be able to use the keypad on portb, but not porta (too few I/O lines). You should also check the start address of available registers, I'm not sure they are the same without checking.
 
here's my circuit...

planning to pinned the row1-4 in rb0-rb3 respectively and col1-col3 in ra0-ra2 respectively...and put a 4094 8-stage shift-and-store bus register...so rb4 to CP, rb5 to D, rb6 to E and rb7 to RS...i save two pins ra3 and ra4...this two can now use for output.


sir, will this configuration work to your codelock?
 
Re: here's my circuit...

nenayd said:
planning to pinned the row1-4 in rb0-rb3 respectively and col1-col3 in ra0-ra2 respectively...and put a 4094 8-stage shift-and-store bus register...so rb4 to CP, rb5 to D, rb6 to E and rb7 to RS...i save two pins ra3 and ra4...this two can now use for output.


sir, will this configuration work to your codelock?

It won't work with my existing code, which is written to have the keypad on a single port, but you could modify it.

BTW, don't forget, RA4 is an open collector output pin, it can only sink current not source it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top