For some reason im getting the following WARNING message when compiling with HI-TECH PICC COMPILER (Microchip PIC) V8.02 PL1.
"illegal conversion between pointer types"
The code is as follows, iv spent the whole day mixing and matching, and just cant get it write, iv shown what is actually causing the warning. Any thoughts on why this is happening.
Thanks
void Start()
{
const unsigned char *Mess1;
const unsigned char *Mess2 = "\nTurbine is not rotating, please rotate to begin processing measurements\n";
int digital;
int count;
int count1;
int positive_readings;
int num[10];
static bank2 char Mess3[] = "\nProcessing....\n";
static bank2 char Mess4[] = "\nAverage Frequency(Hz) = ";
static bank2 char Mess5[] = "\nAverage rotational speed(RPM) = ";
InitialiseADC ('0');
setUpAsynchUSART();
Mess1 = "\n\rWaterflow Sensor Using USART Communications\n";
while(1)
{
while(AsUSARTgetByte() != ' ');
AsUSARTsendBytes(Mess1); ---->"WARNING MESSAGE"
while(1)
{
digital = ReadADC('0');
if(digital == NULL)
{
AsUSARTsendBytes(Mess2); ------>"WARNING MESSAGE"
while(ReadADC('0') == 0);
}
for(count1 = 0; count1<5; count1++)
{
while (ReadADC('0')!=0);
for(count = 0; count<10; count++)
{
digital = ReadADC('0');
if(digital == NULL){
num[count1] = count;
count = 10;
}
delay_ms(5);
}
}
}
}
}
void AsUSARTsendBytes( char *bytes )
{
int i ;
for( i = 0 ; bytes != '\0' ; i++ )
AsUSARTsendByte( bytes );
}
"illegal conversion between pointer types"
The code is as follows, iv spent the whole day mixing and matching, and just cant get it write, iv shown what is actually causing the warning. Any thoughts on why this is happening.
Thanks
void Start()
{
const unsigned char *Mess1;
const unsigned char *Mess2 = "\nTurbine is not rotating, please rotate to begin processing measurements\n";
int digital;
int count;
int count1;
int positive_readings;
int num[10];
static bank2 char Mess3[] = "\nProcessing....\n";
static bank2 char Mess4[] = "\nAverage Frequency(Hz) = ";
static bank2 char Mess5[] = "\nAverage rotational speed(RPM) = ";
InitialiseADC ('0');
setUpAsynchUSART();
Mess1 = "\n\rWaterflow Sensor Using USART Communications\n";
while(1)
{
while(AsUSARTgetByte() != ' ');
AsUSARTsendBytes(Mess1); ---->"WARNING MESSAGE"
while(1)
{
digital = ReadADC('0');
if(digital == NULL)
{
AsUSARTsendBytes(Mess2); ------>"WARNING MESSAGE"
while(ReadADC('0') == 0);
}
for(count1 = 0; count1<5; count1++)
{
while (ReadADC('0')!=0);
for(count = 0; count<10; count++)
{
digital = ReadADC('0');
if(digital == NULL){
num[count1] = count;
count = 10;
}
delay_ms(5);
}
}
}
}
}
void AsUSARTsendBytes( char *bytes )
{
int i ;
for( i = 0 ; bytes != '\0' ; i++ )
AsUSARTsendByte( bytes );
}