PDA

View Full Version : Message[301] Processor-header file mismatch



JetPack Spartan
- 29th December 2011, 18:16
Hello all,

I've just installed PBP2.60 on Win7 64bit. Patched to PBP2.60c.
Microcode Studio 4.0.0.0 installed. MPLAB 8.33

When I compile an old program that I know to work fine under XP I get a ton of errors.

I have read about changing DEFINE to CONFIG but that did not help. I have also read that you need to move the configs into the .inc file but I have not found an example of how to do that.

Below is the original code. I have tried commenting out all the DEFINEs but that does not change the error. I also get the same error when compiling the sample codes that come with PBP.




@ DEVICE pic12F675, MCLR_OFF
@ DEVICE PIC12F675, INTRC_OSC_NOCLKOUT
@ DEVICE PIC12F675, WDT_OFF
@ DEVICE PIC12F675, BOD_ON
@ DEVICE PIC12F675, PWRT_ON


ADCON0 = 0 ' A/D off


ANSEL = 0 ' Set all digital
WPU = 0 ' Internal pull-ups = off
GPIO = 000000 ' All outputs = 0 on boot
TRISIO = 001000 ' GPIO.3 input


RC_In con 3
ServoOut con 4
center con 150
change con 2


PulseNew var word
PulseOld VAR byte
Diff var PulseNew.HighByte


PulseOld = center ' Initialize pulse
PulseNew = PulseOld


Main:
gosub send
count RC_In, 19, PulseNew
if PulseNew <> 0 Then gosub ReadPulse
PulseNew = PulseOld
goto Main

ReadPulse:
PulseNew = PulseOld
gosub Send
Pulsin RC_In, 1, PulseNew ' Measure pulse (in 5 uSec)
if PulseNew > 210 then ' check for good pulse
PulseNew = PulseOld ' if bad use last good pulse
endif
if PulseNew < 89 then
PulseNew = PulseOld
endif
gosub Smooth
PulseOld = PulseNew
return


Smooth:
Diff = PulseNew - PulseOld
if Diff < 0 then
if Diff > -change then PulseNew = PulseOld
endif
if Diff < change then PulseNew = PulseOld
Diff = 0
return

Send:
PULSout ServoOut, PulseNew
return


This is the first error;


Message[301] c:\pbp\p12f675.inc 33: MESSAGE: (Processor-header file mismatch. Verify selected processor.)

What do I ned to do to get this to compile without errors?

mackrackit
- 29th December 2011, 19:51
Maybe this will help?
http://www.picbasic.co.uk/forum/content.php?r=389-Beginner-Tutorial-How-to-get-started-with-PBPDEMO-MicroCode-Studio-PICKIT-2

JetPack Spartan
- 29th December 2011, 20:27
Thanks but I think the installation is okay. I just need to know how to get my code to compile without errors. I think it has something to do with the changes that need to be made when using the MPASM assembler instead of PM - but I don't know how to make those changes.

Darrel Taylor
- 29th December 2011, 22:27
...
This is the first error;


Message[301] c:\pbp\p12f675.inc 33: MESSAGE: (Processor-header file mismatch. Verify selected processor.)

What do I ned to do to get this to compile without errors?
Why is there a p12f675.inc file in your PBP folder? Did you copy it there?
There should not be any P*.inc files in the PBP folder. They should be in the "c:\program files (x86)\microchip\mpasm suite" folder.

And make sure MicroCode Studio is pointing to the correct assembler. Go to View > Compile and Program Options > Assembler tab.
If the path above the "Find" buttons is not "c:\program files (x86)\microchip\mpasm suite", click the "Find Manually" button and point it there.

If you do not have that folder on your computer, you need to install the MPLAB package from Microchip.

Delete any P*.inc files in your c:\PBP folder.
DO NOT delete any .inc files that don't have a "P" as the first letter.

mackrackit
- 29th December 2011, 22:34
Thanks but I think the installation is okay. I just need to know how to get my code to compile without errors. I think it has something to do with the changes that need to be made when using the MPASM assembler instead of PM - but I don't know how to make those changes.

http://www.picbasic.co.uk/forum/showthread.php?t=543

JetPack Spartan
- 29th December 2011, 22:50
Why is there a p12f675.inc file in your PBP folder? Did you copy it there?

I did not copy or move any files. There are no P*.inc files in the c:\pbp folder. There are M*.inc files in the c:\pbp\inc folder though.

It does point to the correct assembler.

JetPack Spartan
- 29th December 2011, 23:03
If the path above the "Find" buttons is not "c:\program files (x86)\microchip\mpasm suite", click the "Find Manually" button and point it there.

I think this was the problem. I had it pointing to "c:\program files (x86)\microchip\" instead of "c:\program files (x86)\microchip\mpasm suite".

Thank you!