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

mplab error

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







mplab error
PostPosted: Wed Aug 08, 2007 8:07 am     Reply with quote

Dear all,

I am using mplab and my compiler ccs indicates an error in the following line:
int8 const LCD_INIT_STRING[4] =
{
0x20 | (lcd_type << 2), // Func set: 4-bit, 2 lines, 5x8 dots
0xc, // Display on
1, // Clear display
6 // Increment cursor
};

the message error is:
*** Error 128 "C:\...\flex_lcd.c" Line 28(1,42): A #DEVICE required before this line

I am using PIC18F4455 and LCD 16x2.

How I can decide this problem?

Thanks
axmanjr



Joined: 07 Aug 2007
Posts: 25
Location: Las Vegas, NV

View user's profile Send private message

PostPosted: Wed Aug 08, 2007 9:45 am     Reply with quote

It seems to me that you're missing a predecessor (sp). I'm not sure what you're trying to do with your code, but if you look at the ccs manual (pg 38), it explains about the #device protocol:

#device CHIP OPTIONS
CHIP: the name of a specific processor (like: PIC18F4455)
OPTIONS: qualifiers to the standard operation of the device.

Page 38 and 39 give a bunch of valid OPTIONS, which is probably what the compiler is looking for with your code
Tuga
Guest







Thanks
PostPosted: Thu Aug 09, 2007 9:29 am     Reply with quote

Debtor for the aid.
I decided the problem. I simply changed projecto for a new folder without modifying the code, and works.
thanks for help.
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