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
Analogic KeyNum for 16F88 pic and 16x2 LCD display
Analogic KeyNum for 16F88 pic and 16x2 LCD display
- Attachments
-
- TastieraAnalogica16F88Sviluppo.zip
- (176.53 KiB) Downloaded 209 times
-
- KEY-NUM-BOARD-Scheme.JPG (132.6 KiB) Viewed 5775 times
-
- MAIN-BOARD-SCHEME.JPG (28.98 KiB) Viewed 5794 times
Last edited by leo73 on 18 Sep 2014 22:03, edited 2 times in total.
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
Nice
One line instead of 7 for a 12 buttons keypad
One line instead of 7 for a 12 buttons keypad
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
Yes lejef , 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 .
need to use the interrupt (two line pins) but the project work well and it's fairly stable
, i tryed it yet .
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
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
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 207 times
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
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? )))
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.
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
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
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.
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
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.
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.
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
Hi lejeff
Yes you are right about the large tollerant, this problem is more big when you have a large keyBoard .
Yes you are right about the large tollerant, this problem is more big when you have a large keyBoard .
Re: Analogic KeyNum for 16F88 pic and 16x2 LCD display
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)
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)