- This topic has 2 replies, 3 voices, and was last updated 6 years, 8 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
i wrote a peogram for measuring voltage using pic.but copiled that program i got ths error.
adcValue/=100;
#if==adcData \here am getting that error.
volt= (((float)adcValue*240.0)/1023.0);
#else
am using ic is dspic30f2010
and the compiler is mplab c30
anyone please help for solving this error.
thanks
Hi
The error is correctly highlighted by the compiler. This is because if() statement requires a condition to work on and in your case it must be something which when equals to adcData should run the if statement. The error has occured beacuse in above code that something is missing. Perform a dry-run, you will be able to figure it out.
I think you are not familier with basics of C programming!!!!!
if==adcData
this does not have any meaning
it must be
if (x == adcdata) // x can be any value
if statemet in C programming checks boolean condition as true or false