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

Newbie question

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







Newbie question
PostPosted: Mon Jan 07, 2008 5:58 am     Reply with quote

Hi,

I am trying to complie some example code (timer) and keep getting the following error

*** Error 128 "C:\Program Files\Microchip\Projects\Rapid Fire\delay.h" Line 39(1,2): A #DEVICE required before this line

How do I define the device?

Thanks
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

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

PostPosted: Mon Jan 07, 2008 7:47 am     Reply with quote

add this on top of your project
Code:
#device PIC18F8722

(replace PIC18F8722 by your own PIC)

Hope this helps
sandy wilson



Joined: 25 Feb 2004
Posts: 28

View user's profile Send private message

PostPosted: Mon Jan 07, 2008 7:49 am     Reply with quote

Use the "device" preprocessor directive
eg

#device PIC18F8722 ICD=TRUE

this tells the compiler what chip you are using, if you are using the ICD, ADC resolution etc.

For full description see page 71 of the CCS compiler manual(V4 compiler manual)
stu807
Guest







PostPosted: Mon Jan 07, 2008 10:37 am     Reply with quote

Excellent thanks
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