PDA

View Full Version : Can't compile PIC18F26J11



BrianT
- 18th September 2010, 00:41
I am trying to port some code from a PIC16F88 to a larger PIC18F26J11 but I get wierd errors.

Error[132] c:\pbp\18f25j11.inc 18: Unknown processor (18F26j11)
Error [105] c:\pbp\18f25j11.inc 19: Cannot open file (Include file "P18F26J11.INC not found)

There is a file "18f25j11.inc " in the c:\pbp directory.

I have loaded the latest MPASM and I am running MCSP 3.0.0.5 with PBP 2.60a.

What do I have to do to work with the PIC18F26J11?

Thanks
BrianT

ScaleRobotics
- 18th September 2010, 05:55
Sounds just like the problem Circuitpro was having. When in doubt, upgrade. I think your version of Mplab IDE isn't new enough to have that chip. Since you have the latest version of PBP, you can download the latest version of MPLAB IDE.

Check out this post: http://www.picbasic.co.uk/forum/showthread.php?t=13758#post1284785436

BrianT
- 18th September 2010, 06:36
Before starting the PIC18F26J11 exercise, I removed the older MPASM directories from both c:\program files\microchip and c:\MPASM then I downloaded the latest MPLab IDE and MPASM.

I am now running :-
MCS+ v3.0.0.5
PBP v2.60La
MPLab v8.56
MPASM v5.20
Win XP pro

The system is telling me it can't find a file that I can plainly see with windows explorer.

WTF?

BrianT

ScaleRobotics
- 18th September 2010, 06:45
Sorry I missed that, you were pretty clear about that.

Is MCS pointed to the right place for your mpasm?

4793

ScaleRobotics
- 18th September 2010, 07:44
Well, looking closer, those are some weird errors.


I am trying to port some code from a PIC16F88 to a larger PIC18F26J11

Error[132] c:\pbp\18f25j11.inc 18: Unknown processor (18F26j11)
Error [105] c:\pbp\18f25j11.inc 19: Cannot open file (Include file "P18F26J11.INC not found)

There is a file "18f25j11.inc " in the c:\pbp directory.

What do I have to do to work with the PIC18F26J11?


Maybe I am confused. What are we compiling for, a 18F25j11, or a 18f26j11?

It looks like maybe your pbp inc file is confused too. The 18f25j11.inc file seems to refer to a P18F26J11.INC. When it says it can't open the P18F26J11.INC file, that is a mpasm file, which should be located in C:/program files/microchip/mpasm suite. Do you have that file (P18F26j11.INC) as well?

BrianT
- 18th September 2010, 08:49
Thanks for the last tip ScaleRobotics - you were spot on.

It is not enough to rename a directory from MPASM to MPASM old. You must physically remove the old MPASM version. Your tip was right, MCSP was using the now obsolete MPASM in C:\Program files\mecanique\MCSP\MPASM. I had done a default install of MBLab and that had put MPASMWIN.exe into the C:\Program Files\Microchip\MPASM SUITE directory.

I did a manual find on MPASM from within MCSP 'compile and program' options and pointed MCSP to the Microchip\MPASM Suite directory. MCSP now compiles but with a heap of errors that is o be expected for just changing the processor from PIC16F88 to PIC18G26J11 and nothing else.

It looks like a lot of homework to understand the very different config fuse structure in the 26J11 part.

I don't think my setup is quite right as I get a fleeting burst of C:\ DOS prompt when I compile but that is a task for later.

Cheers
BrianT

ScaleRobotics
- 18th September 2010, 09:03
I don't think my setup is quite right as I get a fleeting burst of C:\ DOS prompt when I compile but that is a task for later.


Good to hear you got it working. Yes, the configs can be painful! Not to worry about the fleeting dos window. That is normal for PBP with mplab above 8.15a.

Cheers,

Walter