Page 1 of 1
connecting 4x3 keypad
Posted: Sat Sep 27, 2014 12:58 pm
by CalculatorX
hey i have a question.. apparently after making a transfering the my program to pic16f877a which is made in flowcode...
after connecting it.. the lcd is just displaying number which is supposedlly need to be pressed first.. the keypad isnt even connected yet.... and when i tried connecting the 4x3 keypadd it just doesnt work.. what might be cauasing the problems good sirs.??
Re: connecting 4x3 keypad
Posted: Sat Sep 27, 2014 2:44 pm
by kersing
Moved your question as it is not a 'Programming Tips & Tricks". Please use that forum only for sharing knowledge, not to ask unrelated questions.
Re: connecting 4x3 keypad
Posted: Sat Sep 27, 2014 3:17 pm
by medelec35
The keypad routine works as follows:
Each column is pulsed one at a time while each input connected to rows are checked before next column is pulsed.
If an input connected to the rows is at logic 1 (could be not connected to keypad pull down resistors so is floating?)
then since an input has gone high, a key will be treated as though its pressed.
Hence no keypad connected = floating i/p's = key registering being pressed.
If you are adding your own keypad and its not an eblock then pull-down resistors must be added to each Row.
See
Eblock Datasheet
Martin
Re: connecting 4x3 keypad
Posted: Sun Sep 28, 2014 7:42 am
by CalculatorX
yes i am adding my own keypadd.. i tried adding 10k on each row.. but nothing works so far
Re: connecting 4x3 keypad
Posted: Sun Sep 28, 2014 9:20 am
by medelec35
If you have a multimeter, then with power removed from your hardware measure resistance directly from each pin of microcontroller (that's connected to rows of keypad) to VSS pin of microcontroller.
The resistance should be the value of resistors connected i.e. 10K
If it's not then there is an open circuit between microcontroller pins and resistor.
If all is correct then reconnect power and with no keys pressed, measure voltage from each pin (again connected to the rows of keypad) to 0V.
Make sure voltage is at around 0V.
If it is then if you can post a circuit diagram and flowchart I will see if I can spot would could be the cause.
Re: connecting 4x3 keypad
Posted: Mon Sep 29, 2014 1:31 am
by CalculatorX
on my attachment is the exact circuit i am using to test my keypad and lcd.. and also the flowcode...
after adding the pull down resistor "10k on each row" the random number popping out was gone. but still the keypad was not working... sorry for the schematic i dont know how to make it small
Re: connecting 4x3 keypad
Posted: Mon Sep 29, 2014 6:57 am
by CalculatorX
heads up the circuit finally worked.. what i did was add pull down resistor in the column too.. so now both column and and row has 10k pull down resistor....
the program worked... tho its running really slow there are times that it worked normal but most of the time pic is really slow sometimes it feels likes it is going to hang