View previous topic :: View next topic |
Author |
Message |
Alphada
Joined: 19 Jun 2017 Posts: 27
|
|
Posted: Sat Jul 08, 2017 3:40 pm |
|
|
temtronic wrote: | Check here...
http://www.ccsinfo.com/forum/viewtopic.php?t=26333&highlight=flexkbd
This is a 'flexible' version of the keypad driver. I'm currently using it for a couple of projects. The GREAT thing about it is how EASY it is to re-define PIC I/O pins to be rows and columns !
One warning...be sure to check the I/O pins as to whether they can be used for input or output or both. Some pins can ONLY be say input...so you can NEVER use them as an output.
If the link doesn't work, just use the forum search and enter 'flex_kbd', 4th or 5th hit is the flex driver.
Jay |
Is there any way to implement it using IOC interrupt? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9228 Location: Greensville,Ontario
|
|
Posted: Sat Jul 08, 2017 4:17 pm |
|
|
That PIC, which is 20+ years old does not have IOC available on PORT C, the port you said you wanted to use. It does have 4 pins on PORT B that does though. This is why reading the 400+ pages of a typical PIC datasheet is critical.
From a design aspect , you should choose a current PIC, if possible having 2 HW UARTs, lots of memory, fast internal clock..something like my 'goto' PIC the 18F46K22. You'll always need a few more bytes of memory and 2 I/O pins..Murphy's LAW of PICs !
Yes, the driver could be modified for 'interrupt' driven operation, though I can't cut code for awhile. Perhaps another person can show you how.
Jay |
|
|
Alphada
Joined: 19 Jun 2017 Posts: 27
|
|
Posted: Sat Jul 08, 2017 5:09 pm |
|
|
Thx for the answer but i wasn't expecting exactly a code working out of the box, i have one example that works what i need is to learn how to ad the very basics aspects, some pseudo code or some tips so i can try it out my self.
btw Im not the OP i hope not to off topic his issue. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9228 Location: Greensville,Ontario
|
|
Posted: Sat Jul 08, 2017 6:36 pm |
|
|
get a PIC, a KPD, 4 resistors and start cutting code ! Learn by doing, experiment, basic 'hands on the bench' schooling! Draw schematics, make notes, test, retest,code/compile/ try again. Build upon what you learn.
After 1/2 century of electronics and 1/4 century of 'playing with PICs', I still use breadboards and DIP PICs.
You could look at the 74c922 kpd encoder chip, see how it works, then get a PIC to emulate it. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
|