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

LCD and porta & porte

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



Joined: 31 May 2007
Posts: 20

View user's profile Send private message

LCD and porta & porte
PostPosted: Thu May 31, 2007 2:47 pm     Reply with quote

I want to use an LCD on the porta as data and porte as (RS,RW, ENA) I'm using the PIC18F4550 I set the lcd like this:

Code:
#define LCD_ENABLE_PIN PIN_E0
#define LCD_RS_PIN PIN_E1
#define LCD_RW_PIN PIN_E2
#define D4 PIN_A0
#define D5 PIN_A1
#define D6 PIN_A2
#define D7 PIN_A3
#define LCD_TYPE 2

#include <lcd.c>



but the LCD only shows black squares on the firs line, nothing appears.
somebody could give me any idea.

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 31, 2007 2:52 pm     Reply with quote

Where did you get the "lcd.c" driver ?

"Black squares" could mean:

1. The lcd_init() function is not being called.
2. The connections to the LCD are not correct.
3. The contrast voltage is wrong.
lmercor



Joined: 31 May 2007
Posts: 20

View user's profile Send private message

LCD and porta & porte
PostPosted: Thu May 31, 2007 3:24 pm     Reply with quote

the "lcd.c" is the one that comes in the drivers folder. I've already check the connections and everithing is fine.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 31, 2007 3:28 pm     Reply with quote

What compiler ?

I just did a full text search on the CCS directory, for vs. 4.039, for
this search string:
Quote:
LCD_ENABLE_PIN

I didn't get any hits.

I also looked at the LCD.c file and it doesn't contain any such #define
statements.

------------

I am starting to think you mean a CCS directory within the Proteus
installation directory. If so, here is link to Proteus forum:
http://support.labcenter.co.uk/forum/viewforum.php?f=9
lmercor



Joined: 31 May 2007
Posts: 20

View user's profile Send private message

LCD and porta & porte
PostPosted: Thu May 31, 2007 4:19 pm     Reply with quote

I got LCD_ENABLE_PIN from the wizard of the compiler. I use the wizard to look how to set the pins and also I checked the forum and I found some post of that.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 31, 2007 4:31 pm     Reply with quote

I think you got the driver from this page, or maybe a related page.
http://www.8052.com/forum/read.phtml?id=48836
I doubt it came from the CCS wizard.

My advice is to use this LCD driver:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661
elphi



Joined: 17 Apr 2007
Posts: 20
Location: tijuana,bajacalifornia,mexico

View user's profile Send private message MSN Messenger

It actually came fromm the CCs wizar.
PostPosted: Wed Jun 13, 2007 11:17 am     Reply with quote

PCM programmer wrote:
I think you got the driver from this page, or maybe a related page.
http://www.8052.com/forum/read.phtml?id=48836
I doubt it came from the CCS wizard.

My advice is to use this LCD driver:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661


You should check before speak (write), because this lines might have came from the CCS wizard.
check the option 15 "LC options", it make this lines in code.

Also, I think you are been rude.
_________________
Every little thing gonna be alright
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Jun 13, 2007 1:43 pm     Reply with quote

Well, I think this guy just shot his own foot off. Confused

It's a bad idea to come here and ask for help and then insult the people that are the most knowledgable ones, trying to help.

Ronald
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jun 13, 2007 3:11 pm     Reply with quote

I don't have the CCS IDE. I just own the command line compilers and
use them with MPLAB. That's why I couldn't understand where those
lines came from.

But, I downloaded the CCS PCWH Demo and installed it.
In the Wizard, it has a selection for "LCD Options". If you click on it,
it displays an LCD tab. You can configure it to put these definitions
into the code, as shown in your post. You are correct on that.
Quote:

#define LCD_ENABLE_PIN PIN_E0
#define LCD_RS_PIN PIN_E1
#define LCD_RW_PIN PIN_E2
#define D4 PIN_A0
#define D5 PIN_A1
#define D6 PIN_A2
#define D7 PIN_A3

#define LCD_TYPE 2

#include <lcd.c>

However, there's a problem with this. The "lcd.c" file that's included with
the Demo doesn't use any of those lcd pin constants. The lcd.c file is
basically the same old CCS lcd driver, in which an "lcd_pin_map"
structure is overlayed on a port.
The constants shown above are similar to (but not exactly the same as)
the ones that are used in my "Flex" 16x2 LCD driver in the Code Library.
But I don't see any kind of "flex" type lcd driver in the CCS drivers
directory that's included with the demo.

My suggestion is to use the "flex" driver in the Code Library:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661
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