View previous topic :: View next topic |
Author |
Message |
Devilson Guest
|
Problem in compiling PIC 16f684 |
Posted: Fri May 30, 2008 9:27 pm |
|
|
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
|
|
Posted: Fri May 30, 2008 9:56 pm |
|
|
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) |
Posted: Tue Jun 03, 2008 10:58 am |
|
|
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
|
|
Posted: Tue Jun 03, 2008 11:17 am |
|
|
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:
That will tell you the compiler version. Then post it. |
|
|
|