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 support@ccsinfo.com

keypad help

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sohailkhanonline



Joined: 06 Mar 2008
Posts: 35
Location: pakistan

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

keypad help
PostPosted: Tue May 20, 2008 11:55 pm     Reply with quote

hi
i am using kbd.c for a 3X4 keypad. And it is working when i pull up the row pins. But i can only pull up column pins. So what modification in kbd.c I need to get it working with pulled up column pins.

As i think you have access to CCS drivers so i am not posting kbd.c file
however my main file is a test program

Code:
#include <18F4620.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#include <kbd.c>
#include <flex_lcd.c>

void main()
{
   char k;
   lcd_init();
   kbd_init();

   printf(lcd_putc,"\fReady...\n");

   while (TRUE)
   {
      k=kbd_getc();
      if(k!=0)
      {
      if(k=='*')
      printf(lcd_putc,"\f");
      else
      printf(lcd_putc,"%c",k);
      } 
   }
}

_________________
sohail khan
filjoa



Joined: 04 May 2008
Posts: 260

View user's profile Send private message

PostPosted: Wed May 21, 2008 12:24 pm     Reply with quote

Hi

see this post http://www.ccsinfo.com/forum/viewtopic.php?p=96191&sid=5d505e34fee013e60b95cbb211aae27c

it explain better... if you have mores questions, post..

regards
sohailkhanonline



Joined: 06 Mar 2008
Posts: 35
Location: pakistan

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Wed May 21, 2008 10:49 pm     Reply with quote

Hi i have read post of all the related links
but couldnt find the solution.
Someone says that place pull ups on row pins. Some say on column pins but i need code for pull down column pins
my keypad connections are
0 Row0 Port D0
1 Row1 Port D1
2 Row2 Port D2
3 Row3 Port D3
4 col0 Port D4
5 col1 Port D5
6 col2 Port D6
_________________
sohail khan
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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