PDA

View Full Version : Problems compiling ecn28J60 register names



DaveC3
- 10th March 2011, 00:02
I am working on a program to run a enc28J60. I am using a 18F4550 and PBP 2.60b. If I declair constants using the 28J60 register names I get Syntax errors. If I prefix the register name it compiles,

as example, This works



enECON2 con $1E
enECON1 con $1F
'---- Bank 0 registers
eERDPTL con $00|$00
eERDPTH con $01|$00
eEWRPTL con $02|$00
eEWRPTH con $03| $00


This does not work using the real register names



ECON2 con $1E
ECON1 con $1F
'---- Bank 0 registers
ERDPTL con $00|$00
ERDPTH con $01|$00
EWRPTL con $02|$00
EWRPTH con $03| $00



These are not on the reserved word list for PBP.

Any ideas?

Thanks

Dave

Darrel Taylor
- 10th March 2011, 03:24
Make sure you are compiling for an 18F4550.

The PIC's with ethernet controllers have the same type of controller built-in to them.
So the register names are already defined in the PIC18ETH.BAS file.

But that file is only used with the ethernet enabled PIC's.

Darrel Taylor
- 10th March 2011, 03:40
Hmmm, I was compiling with 2.60A

With 2.60B there is a problem.
I'm searching .......

Darrel Taylor
- 10th March 2011, 03:48
Whoops ...

Those register names got added to the PIC18EXT.BAS file. (they shouldn't have)

If you comment the corresponding lines in that file, your program should compile.

This will be fixed ASAP.

DaveC3
- 10th March 2011, 14:23
Thanks Darrel

That worked. Will there be a update to correct this?

Dave

Darrel Taylor
- 11th March 2011, 04:37
Charles has fixed the problem and the next patch will have the corrected files.