View previous topic :: View next topic |
Author |
Message |
Sadier Guest
|
EEPROM write in PIC16F688 |
Posted: Tue Jun 16, 2009 6:14 am |
|
|
Hallo Everbody,
I have the problem, that I can not write the internal EEPROM of the PIC16F688.
I am using MPLAB with the CCS Compiler.
The compiler brings the following Warning and Error:
Quote: | >>> Warning 207 "Pyranometer.c" Line 236(1,1): Code has no effect
*** Error 76 "Pyranometer.c" Line 236(15,16): Expect ;
|
My code is:
Code: |
#define SpBuffer 0x20
int dummy = 1;
WRITE_EEPROM(SpBuffer,dummy); //LINE 236
|
If I am using the PIC16F873A, it seems not to bother the compiler and there are no errors???
Is it a bug with the PIC16F688?
I will be thankful for your help.
|
|
|
Ttelmah Guest
|
|
Posted: Tue Jun 16, 2009 8:23 am |
|
|
The fault is almost certainly earlier in the program.
CCS has a 'habit', in it's error reporting, that if you make certain types of error, in lines, they are not 'spotted', till you reach another piece of program, where the error then results in a syntax problem. The actual error wll be several lines _before_ where the error is 'reported'.
Best Wishes |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jun 16, 2009 1:53 pm |
|
|
If you still can't make it work, then post a small test program instead
of code fragments. Example:
http://www.ccsinfo.com/forum/viewtopic.php?t=17590&start=1
Also post your compiler version. It's a 4-digit number in this format x.xxx
and it's given at the top of the .LST file. The .LST file will be in your
project directory (after a successful compile, with no errors). |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
even with errors |
Posted: Thu Jun 18, 2009 3:14 pm |
|
|
there is an even faster way to find your version w/o any input - or a good compile - no source file required .
in the comand line compiler - just type:
+V
in the file name window and hit enter.
/?
is also a handy command in that it tells you all the OTHER commmand line options - in your current version of the compiler
ESPECIALLY the list of ALL SUPPORTED PICS !! VERY helpful that one
you get a screen that tells you all that you need to know . |
|
|
|