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 with 16F690.h errors

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



Joined: 07 Feb 2010
Posts: 39

View user's profile Send private message

Problem with 16F690.h errors
PostPosted: Sun Feb 07, 2010 2:05 pm     Reply with quote

16F690.h Problems, PCW Compiler

In the 16F690.h file, line 2 "#device PIC16F690" is tagged with Error 23 "Can not change device type this far into the code"

One line 183 "#word CCP_1 = getenv("SFR:CCPR1L")" Two Errors 48 "Expecting a ("

Also on line 183 Error 43 "Expecting a declaration"

I think I need to get a corrected 16F690.h, but don't know where to find it.

Can anyone provide guidance about what to do in this situation?

I have been able to work around it before, but forgot how.
_________________
boyceg1@gmail.com
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Feb 07, 2010 2:11 pm     Reply with quote

Try a simple program and see if it compiles.
Code:

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

while(1)
  {
   output_high(PIN_C5);   // Blink LED 
   delay_ms(500);
   output_low(PIN_C5);
   delay_ms(500);
  }

}

If it doesn't work, post the error messages, and your compiler version
and post if you're using the CCS IDE or MPLAB.
Boyce



Joined: 07 Feb 2010
Posts: 39

View user's profile Send private message

16F690.h problem?
PostPosted: Sun Feb 07, 2010 2:22 pm     Reply with quote

Tried to compile your program and got the same errors I got with my program.
Boyce


#include <16F690.H>
#fuses INTRC_IO, NOWDT, NOPROTECT, NOBROWNOUT, PUT
#use delay(clock=4000000)

//====================================
void main()
{

while(1)
{
output_high(PIN_C5); // Blink LED
delay_ms(500);
output_low(PIN_C5);
delay_ms(500);
}

}
_________________
boyceg1@gmail.com
dyeatman



Joined: 06 Sep 2003
Posts: 1924
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Feb 07, 2010 2:31 pm     Reply with quote

What about the rest of the info he requested?

Quote:
If it doesn't work, post the error messages, and your compiler version
and post if you're using the CCS IDE or MPLAB.

_________________
Google and Forum Search are some of your best tools!!!!
Boyce



Joined: 07 Feb 2010
Posts: 39

View user's profile Send private message

16F690.h problem
PostPosted: Sun Feb 07, 2010 2:46 pm     Reply with quote

First, I don't see where to read the compiler version...please tell me how. All I know is that is PCW.

The error messages are the same as with my program.

However, if I comment out your

"#include <16F690.H>",

the program compiles.
Thanks,
Boyce
_________________
boyceg1@gmail.com
dyeatman



Joined: 06 Sep 2003
Posts: 1924
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Feb 07, 2010 2:53 pm     Reply with quote

In PCW click the question mark in the upper right corner of the screen and select About to get all the versions.

Are you compiling in MPLab or in PCW?

If you are using PCW how many files show under Options-> Project Options ?
_________________
Google and Forum Search are some of your best tools!!!!
Boyce



Joined: 07 Feb 2010
Posts: 39

View user's profile Send private message

16F690.h problem??
PostPosted: Sun Feb 07, 2010 3:15 pm     Reply with quote

I don't know if I am gonna live long enough to learn all this software or not...

The question mark opened up a whole new world.

PCB & PCM Version: 4.100

Compiling in PCW.

Options shows one file.

I commented out "#include <16F690.H>" and my program compiled. I think I have it made from here, but wonder why I have to comment out the line...
Thanks,
Boyce
_________________
boyceg1@gmail.com
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