|
|
View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Feb 04, 2010 9:22 pm |
|
|
Does your keypad have a decimal point key ?
Post a link to the data sheet for your keypad. |
|
|
thinkpositivex Guest
|
KEYPAD |
Posted: Sat Feb 06, 2010 3:06 am |
|
|
What means decimal point key??
Now I'm doing the simulation using Proteus first so didn't have a datasheet, but I think I want to used a keypad like a maxim.
If I simulate using the keypad from Proteus, can I display the floating value? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Feb 08, 2010 2:30 pm |
|
|
Proteus does have a keypad with a decimal point. See this image:
http://www.blitzlogic.com/VSM1.GIF
It's on the bottom row of the keypad, in the middle, between
the '0' and the '=' keys. |
|
|
thinkpositivex Guest
|
confused |
Posted: Wed Feb 10, 2010 7:55 pm |
|
|
Thanx...
But I'm confused with this:
1) If I want to display floating value I must the keypad as you attach.
2) If I used the keypad that I already post in this forum, can this keypad show the floating value?
3) Can you help teach me how to write the command for display the floating value. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 10, 2010 8:27 pm |
|
|
Quote: |
If I used the keypad that I already post in this forum, can this keypad
show the floating value?
|
You can modify the keypad code to give you a decimal point. You can
choose either the '#' or the '*' key to be the decimal point key.
Let's say you choose the '*' key to be the decimal point. Then you can
edit the keypad driver code and change the '*' to a '.' in the KEYS array.
Here's what it looks like before editing:
Code: |
char const KEYS[4][3] = {{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}};
|
After editing, notice the '*' is changed to '.' in the lower left position:
Code: |
char const KEYS[4][3] = {{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'.','0','#'}};
|
Now re-compile the program and run it. When you press '*', you will get
a decimal point instead. |
|
|
thinkpositivex Guest
|
i will try |
Posted: Thu Feb 11, 2010 2:38 am |
|
|
Thank you for your help...
What you post last means....
Firstly I must open the keypad driver KBDD.C file from program file and then alter the array of keypad and compile..it's right.
After that I will open the pic WIZARD and add the lcd and keypad driver and lastly write the command.
How about the command, it's same with previous or I must to alter or define something else.
If I'm wrong can you help me. |
|
|
thinkpositivex Guest
|
floating success |
Posted: Thu Feb 11, 2010 10:16 am |
|
|
I'm having success to display the floating value after alter the driver.
Thank you for your help.
1) Actually I want to build the program in which the program only
is capable to display 2 digits after dot and have a V means. 3.45V.
So what should I do at lcd_putc in order to display a 3.45V ?
2) Second question is, what command should I write in order to make
sure the display will stop charging when user enter value greater than 5V ?
if (k<=5.00)
lcd_putc ("charging);
else
lcd_putc ("stop"); |
|
|
thinkpositivex Guest
|
|
Posted: Fri Feb 26, 2010 7:51 pm |
|
|
Sorry sir. I got a problem. I hope you will help me. As I tell you before I already compiled the program files below and it succeeded. But after I format the laptop this error occur when compile this program:
Code: |
char const KEYS[4][3] = {{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'.','0','#'}}
|
Quote: |
*error 128 "KBD.c" Line 40(5,9):A #DEVICE required before this line
1 Errors,0 Warnings.
|
What should I do? Help me. |
|
|
Athar Rasul
Joined: 19 Mar 2010 Posts: 13
|
|
Posted: Sat Mar 20, 2010 4:59 am |
|
|
Once you've edited the driver file, save it. But don't add it to the project while compiling. Same thing happened to me. Just remove it from the source files' list. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|