Analogic KeyNum for 16F88 pic and 16x2 LCD display

Post your requests and ideas on the future development of mikroBasic PRO for PIC.
Post Reply
Author
Message
leo73
Posts: 252
Joined: 09 Jan 2014 15:45

Analogic KeyNum for 16F88 pic and 16x2 LCD display

#1 Post by leo73 » 18 Sep 2014 10:18

Hi
I wrote a simply Analogic-KeyNum for Pic 16F88, the program display numbers that you digit until "9999" number, you could use this code-function to make every think you have to select somethink.
Below is the wiring diagram of the keyboard and the pic system .
Leonardo Moretti
Attachments
TastieraAnalogica16F88Sviluppo.zip
(176.53 KiB) Downloaded 208 times
KEY-NUM-BOARD-Scheme.JPG
KEY-NUM-BOARD-Scheme.JPG (132.6 KiB) Viewed 5751 times
MAIN-BOARD-SCHEME.JPG
MAIN-BOARD-SCHEME.JPG (28.98 KiB) Viewed 5770 times
Last edited by leo73 on 18 Sep 2014 22:03, edited 2 times in total.

lejeff
Posts: 218
Joined: 04 Dec 2011 16:10
Location: France

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#2 Post by lejeff » 18 Sep 2014 11:23

Nice :D :D :D

One line instead of 7 for a 12 buttons keypad

leo73
Posts: 252
Joined: 09 Jan 2014 15:45

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#3 Post by leo73 » 18 Sep 2014 19:58

Yes lejef , :D it's a asynchronous system , for synchronous system you
need to use the interrupt (two line pins) but the project work well and it's fairly stable
, i tryed it yet .

lejeff
Posts: 218
Joined: 04 Dec 2011 16:10
Location: France

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#4 Post by lejeff » 19 Sep 2014 08:28

Hi

I've created a small excel sheet to compute the ADC values for each button
Playing with the resistors values allow to increase the difference of input voltage between 2 buttons
May be it help to make your project more reliable
Attachments
analog keypad.zip
(857.15 KiB) Downloaded 204 times

leo73
Posts: 252
Joined: 09 Jan 2014 15:45

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#5 Post by leo73 » 19 Sep 2014 13:44

Hi lejeff
Thank you so much for your help , now i try to
Download your program and try to find the right
Values to every one resistor.We must remenber,when we make this key-num,to build with E12 series resistor metod are more 'commercial then the other series """where it's possible""".

((( In this time i'm studing a program to drive a little sound module to play .ad4 file, but before I have problems to run the sounds modules' even in stand alone mode. Have you ever heard the sound module wtv-020-sd? )))
Last edited by leo73 on 20 Sep 2014 10:41, edited 1 time in total.

lejeff
Posts: 218
Joined: 04 Dec 2011 16:10
Location: France

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#6 Post by lejeff » 19 Sep 2014 14:35

E12 serie means 10% tolerance
My opinion is that it is too large
The min or max ADC count could (in case of more than 2% error vs the nominal resistor value) overlap the max min ADC count of the adjacent buttons (sorted by ADC input voltage)
As Vin = (VCCPIC*R6)/(R(J1<->J3) + R6)
if the resistors are (unfortunatly) at the limit of E12 (10% error) the input voltage cumulated error can reach 20% of the expected value. So overlap cannot be avoid
Last edited by lejeff on 19 Sep 2014 14:55, edited 1 time in total.

leo73
Posts: 252
Joined: 09 Jan 2014 15:45

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#7 Post by leo73 » 19 Sep 2014 14:42

Hi lejeff
I looked your program i think it's usefull (the 1100 and 1200 are e192 series resistor) , it'll be more usefull if i could start from delta Vin and the program calculate the resistors. :wink:

leo73
Posts: 252
Joined: 09 Jan 2014 15:45

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#8 Post by leo73 » 19 Sep 2014 14:46

Hi lejeff
Yes you are right about the large tollerant, this problem is more big when you have a large keyBoard .

lejeff
Posts: 218
Joined: 04 Dec 2011 16:10
Location: France

Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display

#9 Post by lejeff » 19 Sep 2014 15:22

Here
http://www.microchip.com/forums/m694613.aspx
It's said that resistors shall be 1% tolerance

On the excel sheet you can see that if you change R2X value there is no change for C1, C2 and C3 voltage values (your keypad)

These values are the most accurate with E96 resistors
VDD (V) 5
RC2 (R1) 1100
RC3 (R2) 1100
RC4 (R2x) 1370 (not necessary for 3x4 keypad)
RL1 (R3) 332
RL2 (R4) 301
RL3 (R5) 267
RGND(R6) 2210
Resistors tolerance (%) 1 (E96 series)

Post Reply

Return to “mikroBasic PRO for PIC Wish List”