Super new to C (this is my first program).
The following is a snippet of the program which is giving me errors when I try to compile. I tried to follow the syntax rules closely, but maybe I just dont understand them.
Can anyone help?
Using;
MSP430G2231 Microcontroller.
IDE: IAR v 5.52.1, Embedded components v 6.5.8.2682
Code;
volatile signed int OFF;
volatile unsigned int dT;
A dT = (D2-UT1); // Diff bet. ref. and actual temp.
B TEMP = 200+((dT151)/2048)+10000; // Actual temperature.
C OFF = C2+((-31dT)/4096)+10000; // Offset at actual temperature.
Re lines A and C, the compiler says "expected an expression". I thought they were expressions. Line B compiles fine. Why is the compiler giving me these error messages?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Please use code markup, some characters are missing.
I tried using the "help" menu in the IAR IDE, but no combination of mark up or syntax seems to work. Next I plan to cry like a little girl, and see how that works
I'm talking about this site. Edit your post with proper markup.
No idea on how the compiler interprets the language, but standard C (afaik) declares defines without equal and the semi colon.
Give that a try