PDA

View Full Version : OPTION_REG = $7f syntax error



ttease
- 8th April 2007, 15:05
As the title suggest, I started to get a compile error with this line of code.

Any suggestions? It did work a day or so ago.

thanks

t

HenrikOlsson
- 8th April 2007, 17:12
Hi,
Strange. Works here, compiles for a 16F877 with no problem.

/Henrik Olsson.

skimask
- 9th April 2007, 03:11
As the title suggest, I started to get a compile error with this line of code.

Any suggestions? It did work a day or so ago.

thanks

t

And yet again, how about showing us some code. Maybe some more specifics on what you are using as far as the MCU, PBP version, MPASM version, Windows version, update history...etc...

ttease
- 10th April 2007, 18:20
Hi,

ver 2.46, MPASM 5.1

I think it is an problem with the 18F4431. I can compile code for the 16F877a with both MPASM and the default compiler and it works just fine. I have tried to compile a simple program with OPTION_REG = 1 and it gives me a syntax error.

thanks

t

skimask
- 10th April 2007, 18:33
Hi,

ver 2.46, MPASM 5.1

I think it is an problem with the 18F4431. I can compile code for the 16F877a with both MPASM and the default compiler and it works just fine. I have tried to compile a simple program with OPTION_REG = 1 and it gives me a syntax error.

thanks

t


Download the datasheet for the 18F4431 and do a search for the phrase 'OPTION_REG', then do a search for the word OPTION.
Get back to me on what you find...

HenrikOlsson
- 10th April 2007, 18:50
Hi,


I think it is an problem with the 18F4431.

OK, that explains it.... The 18F4431 doesn't have an OPTION_REG. What is it you are trying to do by setting it? You said that the it did work a day or so ago but never that you changed target device....

/Henrik Olsson.

ttease
- 10th April 2007, 20:05
Hi,

Thanks and I finally get it. It did work on the 16f877a but I have to remember, each PIC device has its own little kingdom of parameter and register. I mistakenly figured this was a common, like TRIS and PORT, parameter among all PIC devices (PortB pull-ups sounds common).

I started with the 16f877a and that has become my 'normalized register' set.

I'll try to pay more attention to the datasheets in the future.

thanks

t