Estoy intentando escribir el código que establecerá bit0 en PORTA en el máximo PIC18F452 si se cumple alguna de las condiciones en las declaraciones IF. Estoy usando el depurador MPLAB ICD2 y el Microchip C18 Toolsuite. El código es el siguiente:
#include <p18f452.h>
void main (void)
{
// array containing vital sign values
unsigned char pulseR = 0x32; // syntax error
unsigned char sysP = 0x64;
unsigned char diasP = 0x26;
// acceptable limits for vital signs according to relavant heath officials
unsigned char pulseR_ULimit = 0xA0;
unsigned char pulseR_LLimit = 0x28;
unsigned char diastolic_ULimit = 0x5A;
unsigned char diastolic_LLimit = 0x3C;
unsigned char systolic_ULimit = 0x8C;
unsigned char systolic_LLimit = 0x5A;
TRISAbits.TRISA0 = 0;
//Comparing obtained values with acceptable limits
if (sysP < systolic_LLimit || sysP > systolic_ULimit)
{
PORTAbits.RA0 = 1;
}
else if (diasP < diastolic_LLimit || diasP > diastolic_ULimit )
{
PORTAbits.RA0 = 1 ;
}
else if (pulseR < pulseR_LLimit || pulseR > pulseR_ULimit )
{
PORTAbits.RA0 = 1;
}
else
PORTAbits.RA0 = 0;
}
Agregado :
El resultado de la compilación es el siguiente:
Debug build of project 'C:\Users\Owner\Desktop\School Files\ECNG 3006 2011\Labs\Lab 3\Softare-Hardware Only\Lab3_3.mcp' started.
Preprocessor symbol '__DEBUG' is defined.
Sat Nov 19 13:56:03 2011
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\Users\Owner\Desktop\School Files\ECNG 3006 2011\Labs\Lab 3\Softare-Hardware Only\Lab3_3.mcs".
Clean: Done.
Couldn't locate build tool. Check tool locations.
----------------------------------------------------------------------
Debug build of project 'C:\Users\Owner\Desktop\School Files\ECNG 3006 2011\Labs\Lab 3\Softare-Hardware Only\Lab3_3.mcp' failed.
Preprocessor symbol '__DEBUG' is defined.
Sat Nov 19 13:56:05 2011
----------------------------------------------------------------------
BUILD FAILED
¿Alguien puede ayudarme a solucionar este código?