CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

KEYPAD + LCD
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 04, 2010 9:22 pm     Reply with quote

Does your keypad have a decimal point key ?

Post a link to the data sheet for your keypad.
thinkpositivex
Guest







KEYPAD
PostPosted: Sat Feb 06, 2010 3:06 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 08, 2010 2:30 pm     Reply with quote

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
PostPosted: Wed Feb 10, 2010 7:55 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 10, 2010 8:27 pm     Reply with quote

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
PostPosted: Thu Feb 11, 2010 2:38 am     Reply with quote

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
PostPosted: Thu Feb 11, 2010 10:16 am     Reply with quote

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







PostPosted: Fri Feb 26, 2010 7:51 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Mar 20, 2010 4:59 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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