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+lcd

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







keypad+lcd
PostPosted: Thu Jan 07, 2010 8:09 am     Reply with quote

Hi.....i have a lot of problem,can you all help me
i already simulate the circuit,as shown figure below,im using ccs compiler 4.084.but my problem is why the port of lcd is active low after execute the program.i think the fault is because the keypad and lcd driver is declare at same port,port B and not matching with my connection.i already found how to alter but i.m not understand can you explained more detail how to alter the
lcd driver and import to the coding.

circuit;

Code:

#include <16f877a.h>
#fuses XT,NOWDT,PUT,NOBROWNOUT,NOLVP
#use delay(clock=4000000)

#include <LCD.C>
#include <KBD.C>

void main()
{
   char c;
   lcd_init();
   kbd_init();
   
   while(TRUE)
   {
      c=kbd_getc();
        if(c!=0)
          if(c=='*')
            lcd_putc('\f');
          else
            lcd_putc(c);
   }
}

sorry i cnnot post the schematic diagram,i dont know how to upload the figure in this forum
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Thu Jan 07, 2010 9:13 am     Reply with quote

You should at least list the pin mapping of LCD and keyboard.
thinkpositive
Guest







PostPosted: Thu Jan 07, 2010 10:19 am     Reply with quote

FVM..
Actually I refer the pin mapping from the keypad driver that I have found in this program file driver.

keypad: copy from keypad driver in program files
Code:

#define COL0 (1 << 5)
#define COL1 (1 << 6)
#define COL2 (1 << 7)
#define ROW0 (1 << 1)
#define ROW1 (1 << 2)
#define ROW2 (1 << 3)
#define ROW3 (1 << 4)
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