PDA

View Full Version : Calculator



neiron21
- 31st January 2005, 18:26
I would like someone to show me how to make a calculator with pic 16f628, a 4X4 keypad and a 16X1 LCD display. I am not multiplexing anything.

mister_e
- 31st January 2005, 18:40
I am not multiplexing anything.


how can you do that without any multiplexing

4X4 keypad = 16 pushbutton = 16 i/o
LCD = 6 i/o
--------------
22 i/o on a 18 pins PIC ?!?

you must calculate:
4X4 keypad = 8 i/o
lcd = 6 i/o
-------------
14 i/o... will work with a PIC16F628 that gives a max of 15 i/o

or maybe you're using a 4X4 matrix keyboard decoder like an 74C922... that's one of those i use instead of multiplexing stuff, bitshift and bla bla bla.

in this case you'll need
5 i/o for 74C922
6 for LCD
total of 11 wich is great too

neiron21
- 31st January 2005, 18:52
PORTA can be used in whole as the input and PORTB as the output. My teacher told me that there is no problem at all. The only thing I have to do is to use the internal clock. It is an asichronous circuit 8 i/o keypad. For exemple, if I push #1 Col1 and Row1 will send a singal.

mister_e
- 31st January 2005, 19:22
yes... that's what we call a multiplexed keyboard.

perhaps those can be usefull:

http://www.melabs.com/resources/samples/x1/pbp/keyx.bas

http://www.rentron.com/PicBasic/crosspoint.htm

neiron21
- 31st January 2005, 20:16
Not much. But thanks anyway!!!! :)
If you find anythink anything else post me or send me an e-mail

mister_e
- 1st February 2005, 00:53
What else you need to know??? 90% of what you need is in the link i post here. You have


1. the routine for 4x4 keypad
2. all you need to convert from PORT reading to be display on LCD
3. LCDOUT example.


Begin to display your keypad on the LCD, once it's done... you'll only need to play with variable. That's it

CODE EXAMPLE should be a place for CODE EXAMPLE not for CODE REQUEST IMHO.