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

Flex_lcd.c - #DEVICE required before that line

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



Joined: 14 Apr 2010
Posts: 1

View user's profile Send private message

Flex_lcd.c - #DEVICE required before that line
PostPosted: Wed Apr 14, 2010 9:26 pm     Reply with quote

thx alot for that code
but actually it didn't work with me ,,,,,, when i compile it ,i get that error
"a #DEVICE required before that line"
int8 const LCD_INIT_STRING[4] =
actually i can't understand why is that so i need ur help as i really need to use flex ports within my pic (i am using 16F877A)
thxxxxx alot
waiting 4 ur reply Very Happy
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Thu Apr 15, 2010 1:55 am     Reply with quote

You might simply try searching the forum....
Have answered this in the last few days.

Basically, with CCS, follow the following layout in your code:

First include the processor file - in your case #include "16F877A.h"
Then add any other device lines (ADC=10 etc.)
Then setup your fuses
Then setup your clock
Then your RS232

These may all be in a single 'project' include file, but should still be in this order.

Then have any defines needed by later include files (so pin defines for LCD, etc.).

Only now, include the other files (flex LCD etc.).

Then have your other code.

Order is _vital_. You cannot define any memory arrays etc., _before_ the processor is defined. Similarly, you cannot use RS232, or delays, before the clock is defined, etc. etc..

Best Wishes
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