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.??
connecting 4x3 keypad
-
CalculatorX
- Posts: 16
- Joined: Wed Jul 23, 2014 9:20 am
- Has thanked: 8 times
- Been thanked: 1 time
-
kersing
- Valued Contributor

- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: connecting 4x3 keypad
Moved your question as it is not a 'Programming Tips & Tricks". Please use that forum only for sharing knowledge, not to ask unrelated questions.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: connecting 4x3 keypad
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
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
Martin
-
CalculatorX
- Posts: 16
- Joined: Wed Jul 23, 2014 9:20 am
- Has thanked: 8 times
- Been thanked: 1 time
Re: connecting 4x3 keypad
yes i am adding my own keypadd.. i tried adding 10k on each row.. but nothing works so far
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: connecting 4x3 keypad
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.
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.
Martin
-
CalculatorX
- Posts: 16
- Joined: Wed Jul 23, 2014 9:20 am
- Has thanked: 8 times
- Been thanked: 1 time
Re: connecting 4x3 keypad
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
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
- Attachments
-
- for upload.fcf
- flowcode
- (39.67 KiB) Downloaded 310 times
-
- schematic.jpg
- layout
- (607.63 KiB) Downloaded 1971 times
-
CalculatorX
- Posts: 16
- Joined: Wed Jul 23, 2014 9:20 am
- Has thanked: 8 times
- Been thanked: 1 time
Re: connecting 4x3 keypad
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
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