|
|
View previous topic :: View next topic |
Author |
Message |
gio42 Guest
|
asm-> option keyword |
Posted: Fri Feb 23, 2007 3:31 am |
|
|
trying to compile this chunk of code under CCS PCH + MPLAB 7.51
#include <18f252.h>
....
...
void main()
{
......
#asm
movlw 0b00110111
option
#endasm
.....
getting error :
Executing: "D:\Prog\PCH\Ccsc.exe" "FREQ.C" +FH +LN -T -A -M -Z +Y=9 +EA
*** Error 95 "D:\work\FREQ\FREQ.C" Line 298(2,8): Expecting an opcode mnemonic option
INSTEAD same code with 16F628 + PCM : no error
What's am doing wrong ?
Thanks folks.
Giorgio |
|
|
Ttelmah Guest
|
|
Posted: Fri Feb 23, 2007 3:44 am |
|
|
Look at the list of supported mnemonics in the help file. Look in particular at the differences in the list for the PIC18, versus the 12, and 14bit chips. Note the _lack_ of the 'option' keyword. Look at the data sheet for the 18 chip. Look at the memory organisation. Note the _lack_ of an 'option' register...
Everything that was done with the option register on the older chips, is done with different controls on the 18 chips. Even on the 16 chips, directly accessing 'option' is not needed (the compiler allows you to change all these 'options', with it's own keywords).
Best Wishes |
|
|
gio42 Guest
|
asm-> option keyword |
Posted: Fri Feb 23, 2007 5:19 am |
|
|
... Hi Ttelmah , message received loud and clear.
Thanks
Giorgio |
|
|
|
|
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
|