Hi guys,
Im working on a project and was origionally using a PIC16F877A chip. However when i compiled it i ran out of space on the chip (it compiled with no errors).
So i changed to a chip with more memory, the PIC18F4431. however now if it try to compile it using the exact same code as i did with the 16f877 (apart from chip definitions etc) im getting errors and it will not compile.
here are the errors.
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h:1252:Error [1105] symbol 'MX_CLEAR_WATCHDOG' has not been defined
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h:1253:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:283:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:283:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:284:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:284:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:285:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:285:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:286:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:286:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:287:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:287:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:288:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:288:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:291:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:291:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:293:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:293:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:295:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:295:Warning [2058] call of function without prototype
Halting build on first failure as requested.
First error regarding the WATCHDOG i havnt a clue what it means there as im not even using the watchdog.
the "error 1105 symbol 'portb' has not been defined" appears to me to be the same error as the watchdog as its on the same line.
The "Warning [2058] call of function without prototype" i dont know what this means but from google searching it would appear that i can still compile with this as its just a warning but i would like to get rid of it.
now heres the problem.
when looking at my .C file in mplab and going to either line 1105 or 2058 there is nothing written in them.
here is whats there (line 1105)
//store old tris value, and set the i/o pin as an input
old_tris = MX_ADC_TRIS_REG;
MX_ADC_TRIS_REG = MX_ADC_TRIS_REG | MX_ADC_TRIS_MSK;
//turn ADC on
adcon0 = adcon0 | 0x01;
This is line 1105>>
//wait the acquisition time
cnt = 0;
while (cnt < MX_ADC_SAMP_TIME) cnt++;
//begin conversion and wait until it has finished
adcon0 = adcon0 | 0x02;
while (adcon0 & 0x02);
//restore old tris value, and reset adc registers
MX_ADC_TRIS_REG = old_tris;
adcon0 = 0x00;
ansel0 = 0x00;
this is whats there for line 2058
//Input
//Input: D1 -> OK
trisd = trisd | 0x02;
FCV_OK = ((portd & 0x02) == 0x02);
//Input
//Input: C3 -> ADJUST
trisc = trisc | 0x08;
FCV_ADJUST = ((portc & 0x08) == 0x08);
This is line 2058>>
//PLACE CURSER
//Call Component Macro: LCDDisplay(0)::Cursor(0, 0)
FCD_LCDDisplay0_Cursor(0, 0);
//PRINT SET AMBIENT TEMP
//Call Component Macro: LCDDisplay(0):rintASCII("*SET NIGHTTIME DROP*")
FCD_LCDDisplay0_PrintASCII('*');
FCD_LCDDisplay0_PrintASCII('S');
FCD_LCDDisplay0_PrintASCII('E');
FCD_LCDDisplay0_PrintASCII('T');
Can anyone help me out here???
Im working on a project and was origionally using a PIC16F877A chip. However when i compiled it i ran out of space on the chip (it compiled with no errors).
So i changed to a chip with more memory, the PIC18F4431. however now if it try to compile it using the exact same code as i did with the 16f877 (apart from chip definitions etc) im getting errors and it will not compile.
here are the errors.
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h:1252:Error [1105] symbol 'MX_CLEAR_WATCHDOG' has not been defined
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h:1253:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:283:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:283:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:284:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:284:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:285:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:285:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:286:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:286:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:287:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:287:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:288:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:288:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:291:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:291:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:293:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:293:Warning [2058] call of function without prototype
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:295:Error [1105] symbol 'portb' has not been defined
C:\Documents and Settings\Administrator\Desktop\STAT 18F4431.c:295:Warning [2058] call of function without prototype
Halting build on first failure as requested.
First error regarding the WATCHDOG i havnt a clue what it means there as im not even using the watchdog.
the "error 1105 symbol 'portb' has not been defined" appears to me to be the same error as the watchdog as its on the same line.
The "Warning [2058] call of function without prototype" i dont know what this means but from google searching it would appear that i can still compile with this as its just a warning but i would like to get rid of it.
now heres the problem.
when looking at my .C file in mplab and going to either line 1105 or 2058 there is nothing written in them.
here is whats there (line 1105)
//store old tris value, and set the i/o pin as an input
old_tris = MX_ADC_TRIS_REG;
MX_ADC_TRIS_REG = MX_ADC_TRIS_REG | MX_ADC_TRIS_MSK;
//turn ADC on
adcon0 = adcon0 | 0x01;
This is line 1105>>
//wait the acquisition time
cnt = 0;
while (cnt < MX_ADC_SAMP_TIME) cnt++;
//begin conversion and wait until it has finished
adcon0 = adcon0 | 0x02;
while (adcon0 & 0x02);
//restore old tris value, and reset adc registers
MX_ADC_TRIS_REG = old_tris;
adcon0 = 0x00;
ansel0 = 0x00;
this is whats there for line 2058
//Input
//Input: D1 -> OK
trisd = trisd | 0x02;
FCV_OK = ((portd & 0x02) == 0x02);
//Input
//Input: C3 -> ADJUST
trisc = trisc | 0x08;
FCV_ADJUST = ((portc & 0x08) == 0x08);
This is line 2058>>
//PLACE CURSER
//Call Component Macro: LCDDisplay(0)::Cursor(0, 0)
FCD_LCDDisplay0_Cursor(0, 0);
//PRINT SET AMBIENT TEMP
//Call Component Macro: LCDDisplay(0):rintASCII("*SET NIGHTTIME DROP*")
FCD_LCDDisplay0_PrintASCII('*');
FCD_LCDDisplay0_PrintASCII('S');
FCD_LCDDisplay0_PrintASCII('E');
FCD_LCDDisplay0_PrintASCII('T');
Can anyone help me out here???