Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack (1) Thread Tools Display Modes
Old 12th November 2007, 12:10 PM   1 links from elsewhere to this Post. Click to view. (permalink)
Default PIC keypad (i'm newbie)

hello all...
is that any information of keypad using the mplab write one...
i'm a newbie and no use this software before.
can anyone show me some easy code for the keypad.
because i don't know is that correct or not when i reseach from the website...

thx for helping
11max11 is offline  
Old 12th November 2007, 12:35 PM   (permalink)
Default

hi,
Look at this site:

http://www.winpicprog.co.uk/

Or here:

http://www.tundraware.com/Software/PIC/keypad/
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 12th November 2007 at 12:39 PM.
ericgibbs is offline  
Old 13th November 2007, 03:47 AM   (permalink)
Default

Quote:
Originally Posted by ericgibbs

if i using the IC 74C922 is that i can save a lot of time for write software??
11max11 is offline  
Old 13th November 2007, 03:50 AM   (permalink)
Default

how about using the IC74C922 ??
is that any problem when using the IC74C922 send data to the PIC16f877??
11max11 is offline  
Old 13th November 2007, 04:42 AM   (permalink)
Default

You can use the IC74C922 if you want. You don't need to because the PIC can do it all by itself as mentioned on the pages posted by Eric.
__________________
--- The days of the digital watch are numbered. ---
kchriste is offline  
Old 13th November 2007, 12:10 PM   (permalink)
Default

Quote:
Originally Posted by kchriste
You can use the IC74C922 if you want. You don't need to because the PIC can do it all by itself as mentioned on the pages posted by Eric.

ya i know.
but the thing i want is use the keypad combine with the PIC and get the output to control other thing.
is that i can use IC74C922 combine with the PIC then get the output from PIC?
11max11 is offline  
Old 13th November 2007, 12:46 PM   (permalink)
Default

Yes, you can do it either way - it all depends on which you prefer (and on what keypad you have).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th November 2007, 01:07 PM   (permalink)
Default

Quote:
Originally Posted by 11max11
how about using the IC74C922 ??
is that any problem when using the IC74C922 send data to the PIC16f877??
hi,
A 74C922 can simplify your program.
Basically it scans a 4 * 4 keypad matrix, giving a output nibble 0 thru F [4bit]
also a another bit goes high to say a key has been pressed, use that for the Interrupt.

If you live in the UK, I'll send you one, FOC.
Attached Images
File Type: jpg screenhunter7.jpg (46.4 KB, 66 views)
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th July 2008 at 12:22 PM.
ericgibbs is offline  
Old 13th November 2007, 03:23 PM   (permalink)
Default

It's available here but this is one of my favourite PIC Tip & Tricks (there are many more on the Microchip site in the app notes section. There's a section on a 4x4 keypad in there.
Attached Files
File Type: pdf PIC Tips n Tricks Hardware Techniques.pdf (488.5 KB, 84 views)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 14th November 2007, 10:34 AM   (permalink)
Default

I like the resistor keypad idea. Here the 74c922 costs more than the pic itself
gregmcc is offline  
Old 14th November 2007, 02:32 PM   (permalink)
Default

Quote:
Originally Posted by gregmcc
I like the resistor keypad idea. Here the 74c922 costs more than the pic itself
Here too, and it's easy to do in software.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 16th November 2007, 04:28 AM   (permalink)
Default

thx a lot for all helping me in here.....
11max11 is offline  
Old 19th November 2007, 07:45 AM   (permalink)
Default

i have a quetion for the IC74C922....
is that i press the button '0' the output will become "PA=0,PB=0,PC=0,PD=0"
then i press the output '1' will become "PA=0,PB=0,PC=0,PD=1" and so on..>??

or is other else?
11max11 is offline  
Old 19th November 2007, 07:59 AM   (permalink)
Default

is this correct??

#include <p16f877.inc>
PortB equ 06h
out_put MACRO var
movwf PortB
bsf PortB, var
bsc PortB, var

movf h'0A', w
out_put 4
movf h'0B', w
out_put 3
movf h'0C', w
out_put 2
movf h'0D', w
out_put 1

ENDM
END
thx for helping
11max11 is offline  
Old 19th November 2007, 09:31 AM   (permalink)
Default

Quote:
Originally Posted by 11max11
i have a quetion for the IC74C922....
is that i press the button '0' the output will become "PA=0,PB=0,PC=0,PD=0"
then i press the output '1' will become "PA=0,PB=0,PC=0,PD=1" and so on..>??
"[b]PA=1,B=0,PC=0,PD=0]"
or is other else?
hi,
If you look at the TRUTH table as part of the 74C922 diagram I posted a few days ago, it will answer your question.

Summary:
the answer to this question is, for the #1 key, A=1,B=0,C=0,D=0,[you have reversed the pattern!],
also a pin goes high on the 74C922, [Data Available], while a key is pressed, use this to interrupt the PIC program.

If you 'OR' the 'A B C D' line input pattern with 30hex, it will give you ASCII '0', '1'... '9', :,:,<,=,>,?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 19th November 2007 at 09:35 AM.
ericgibbs is offline  
Reply

Bookmarks

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://www.electro-tech-online.com/micro-controllers/33718-pic-keypad-i-m-newbie.html
Posted By For Type Date
PIC18f4520 - Electronic Circuits Projects Diagrams Free This thread Refback 26th May 2008 07:26 AM

Similar Threads
Title Starter Forum Replies Latest
PIC pin to MOSFET gate problem Futterama Electronic Projects Design/Ideas/Reviews 7 8th November 2007 06:31 PM
High ADC sampling rate PIC, 18F needed? bananasiong Micro Controllers 24 28th October 2007 01:13 PM
Four PIC with One LCD.. meera83 Micro Controllers 13 20th September 2007 07:40 AM
keypad encoder Mel_noypi Datasheet/Parts Requests 5 22nd February 2006 03:01 PM
PicBasic Keypad program Sora Micro Controllers 0 20th April 2004 08:02 PM



All times are GMT. The time now is 03:53 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker