I have a sensor that goes through and sets variables in a structure and then writes it to memory. The sensor takes to readings and creates some states based on the values. The odd part is that the "Double" and "Close" are written and shown in the debugger but it always jumps over single and will not set it.
The code looks like this:
Data_Struct.Double = ADC_Two + Buffer; Data_Struct.Single = ADC_One + ((ADC_Two-ADC_One)/2); Data_Struct.Close = ADC_One = ((ADC_Two-ADC_One)/2); SaveRAMImageToEeprom();
Any thoughts? I tried to change optimizer and debugging setting. I have tried the mrrelax and looked at the disassembly. I cann't figure out why this is being skipped. I even tried to make new variables to break out the arthimetic and the new variables are not skipped for the math but cannot be written to that space.
Thanks.