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

Please help with the LCD example EX_LCDKB

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



Joined: 24 Mar 2004
Posts: 53
Location: Portugal

View user's profile Send private message Send e-mail MSN Messenger

Please help with the LCD example EX_LCDKB
PostPosted: Wed Mar 24, 2004 5:16 pm     Reply with quote

I am new to this CCS compiler.
I tried the ex_lcdkb.c example listed below on my
ccs software (with 16F877). I connected
the 3x4 keyboard and 16x2 LCD with experience board

My platform includes the ccs C compiler, MPLAB IDE 6.0
connected with the experience board. I compiled the
code and programed 16F877 and run the example.

I failed to see anything on the LCD. Do I miss
anything? Thanks for your help.

Carlos Araújo
cmmaraujo@sapo.pt
portugal
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 24, 2004 6:27 pm     Reply with quote

What port is the LCD connected to ? Is it Port B ?
If so, then you need to add a #define statement to
the EX_LCDKB.C file. Put it just above the #include
statement for lcd.c. Example:
Code:
#define use_portb_lcd  TRUE     // Add this line
#include <lcd.c>
#include <kbd.c>

Do this only if you are using Port B for the LCD.
If you are using Port D, then don't add that line.

-------------------
Also, do you have a 10K trimpot on pin 3 of the LCD,
for contrast adjustment ? One end of the trimpot should
connect to +5v, and the other end to Ground. The tap
should go to pin 3 on the LCD. Set the trimpot so that
pin 3 is at +0.425 volts. This should set the contrast
to a good initial value. You should see characters now.
carlosma



Joined: 24 Mar 2004
Posts: 53
Location: Portugal

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Thu Mar 25, 2004 2:35 am     Reply with quote

Keyboard at Port B
LCD Port D
and

ON KBD.C

// Un-comment the following define to use port B
#define use_portb_kbd TRUE
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