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?
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?