View previous topic :: View next topic |
Author |
Message |
Boyce
Joined: 07 Feb 2010 Posts: 39
|
Problem with 16F690.h errors |
Posted: Sun Feb 07, 2010 2:05 pm |
|
|
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. _________________ [email protected] |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Feb 07, 2010 2:11 pm |
|
|
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
|
16F690.h problem? |
Posted: Sun Feb 07, 2010 2:22 pm |
|
|
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);
}
} _________________ [email protected] |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sun Feb 07, 2010 2:31 pm |
|
|
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
|
16F690.h problem |
Posted: Sun Feb 07, 2010 2:46 pm |
|
|
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 _________________ [email protected] |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sun Feb 07, 2010 2:53 pm |
|
|
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
|
16F690.h problem?? |
Posted: Sun Feb 07, 2010 3:15 pm |
|
|
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 _________________ [email protected] |
|
|
|