Hello everyone,
I'm new here and i noticed that the 4x4 Keypad library for mikroC is absolutely unstable. The problem is that this library only works when you connect the keypad to PORTD as shown in the help of the mikroC compiler.
Could someone try connecting exactly as it is in the help, but this time with PORTA or PORTB?
It WON'T work!
I'm too lazy to write & debug the keypad and lcd configs in assembly, as this might take me days so i wanted someone to be of assistance with mikroC.
Regards,
Underworldman
mikroC Keypad library doesn't work
-
- Posts: 270
- Joined: 29 Jan 2010 16:36
This problem is solved
Hello everyone; PROBLEM SOLVED.
I just thought that anyone in future who might be having the same problem might wonder how to solve it, so here's the solution:
A dude by the name Losic Tihomir directed me as follows:
For PIC16F887: The ANSEL register must be initialized to configure an analog channel as a digital input. Pins configured as analog inputs will read ‘0’.
http://ww1.microchip.com/downloads/en/D ... df#page=42
You need these two lines in main program:
Code:
ANSEL = 0;
ANSELH = 0;
Once more i thank you Losic Tihomir, very helpful person :)
I just thought that anyone in future who might be having the same problem might wonder how to solve it, so here's the solution:
A dude by the name Losic Tihomir directed me as follows:
For PIC16F887: The ANSEL register must be initialized to configure an analog channel as a digital input. Pins configured as analog inputs will read ‘0’.
http://ww1.microchip.com/downloads/en/D ... df#page=42
You need these two lines in main program:
Code:
ANSEL = 0;
ANSELH = 0;
Once more i thank you Losic Tihomir, very helpful person :)
Re: mikroC Keypad library doesn't work
Sir i also need help regarding my keypad library, it doesnt work as well.
this is the schematic of the module im using,
(file attached)
its rows are connected to the pull-up resistor unlike the one showed in the mikroc manual which the columns are the one connected to the pull down resistor to ground
can you please help memodify the code to work
please..... i cant use my training module right now because of this problem. thanks in advance sir!
this is the schematic of the module im using,
(file attached)
its rows are connected to the pull-up resistor unlike the one showed in the mikroc manual which the columns are the one connected to the pull down resistor to ground
can you please help memodify the code to work
please..... i cant use my training module right now because of this problem. thanks in advance sir!
- Attachments
-
- keypad.JPG (70.16 KiB) Viewed 2622 times
Re: mikroC Keypad library doesn't work
Hi,
I'm glad that you have solved your problem.
Regards,
Filip.
I'm glad that you have solved your problem.
Regards,
Filip.
Re: mikroC Keypad library doesn't work
sir it still is not working on actual. But on simulation it works perfectly, i use proteus isis. What seems to be the problem, I cant figure it out sir pliz help me. Pliz take a second look at the schematic of my keypad, is it ok? or could it be the cause of the problem?
Re: mikroC Keypad library doesn't work
Hi,
Please see the datasheet and the schematics for the proper design and usage of the Keypad 4x4 :
http://www.mikroe.com/eng/products/view ... 4x4-board/
You will also find there the proper examples in mikroC that have been tested on our hardware.
Regards,
Filip.
Please see the datasheet and the schematics for the proper design and usage of the Keypad 4x4 :
http://www.mikroe.com/eng/products/view ... 4x4-board/
You will also find there the proper examples in mikroC that have been tested on our hardware.
Regards,
Filip.