View previous topic :: View next topic |
Author |
Message |
kushb
Joined: 21 Sep 2005 Posts: 7
|
Keypad does not work if LCD is not connected |
Posted: Mon Oct 10, 2005 10:36 am |
|
|
Hi,
I am using the ACE kit of CCS. My circuit involves displaying digits on PC screen using keypad. I have been able to do it succesfully. The only problem is that keypad does not function if a LCD display is not connected at port D. The moment LCD display is disconnected from port D the keypad stops responsing. Can anyone explain me why is this happening and what could be the possible solution.
Thanks |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Oct 10, 2005 10:42 am |
|
|
Are you still trying to initialize the LCD?
Code: | while ( bit_test(lcd_read_byte(),7) ) ;
|
This line can cause the program to hang if there isn't an LCD. |
|
|
Guest
|
Reply: Mark |
Posted: Mon Oct 10, 2005 10:50 am |
|
|
Mark,
No I am not initializing LCD. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Oct 10, 2005 11:42 am |
|
|
Is the keypad on port D as well?
Are there pullups on the keypad lines? |
|
|
kushb
Joined: 21 Sep 2005 Posts: 7
|
Reply - Mark |
Posted: Tue Oct 11, 2005 4:17 am |
|
|
Yeah the keypad is on port D.
By pullup do you mean that I should connect the data lines of port D with a pull up resistor?? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Guest
|
|
Posted: Fri Oct 14, 2005 11:42 am |
|
|
i had the same problem before this ACE kit board uses pull up resistors only on port B , if you want to use the keypad on port D u should put the LCD with it too , cuase it acts as a pull ups for PORT D
if u noticed in the KBD.c it says something like this connect pull up to the specfic port or LCD
hope this helps
thanks |
|
|
|