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 support@ccsinfo.com

Problem in compiling PIC 16f684

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







Problem in compiling PIC 16f684
PostPosted: Fri May 30, 2008 9:27 pm     Reply with quote

When i try to compile the source code which include "16f684.h" there are 3 error occur in '16f684.h'.
These errors are:
(i)"can not change device type this far into code" at Line2(8,9) in 16f684.h file
(ii)"expecting a(" at Line 162(1,23) in 16f684.h file
(iii)"expecting a(" at Line 162(6,11) in 16f684.h file

Is there any solution for this case or is it an error in my programming?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 30, 2008 9:56 pm     Reply with quote

This program should compile without errors. Try it.
Code:

#include <16F684.H>
#fuses INTRC_IO, NOWDT, NOPROTECT, BROWNOUT, PUT
#use delay(clock=4000000)
   
//===========================
void main()
{

while(1)
  {
   output_high(PIN_C0);
   delay_ms(500);
   output_low(PIN_C0);
   delay_ms(500);
  } 

}
Devilson
Guest







Problem in compiling PIC 16F684 (part2)
PostPosted: Tue Jun 03, 2008 10:58 am     Reply with quote

Hmmm... 1st of all thanks for the information, i had try the code, unfortunately the same problem still occur. The errors occur in the "16F684.h" file. Is there anywhere to download the hex file to overwrite it?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 03, 2008 11:17 am     Reply with quote

Post your compiler version.

Since you aren't able to compile the code, you won't have a .LST file
and can't get the version from there.

So instead, open up a DOS box and change to the CCS directory,
Quote:
c:\Program Files\Picc

and then type this in and press Enter:
Quote:
ccsc /v

That will tell you the compiler version. Then post it.
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