aibelectronics
New Member
Could anyone crack this one? I'll cut out the unimportant details:
int b[1700], c[1700], a[1700];
.....
a=(inportb(stat)^0x80)&0xf0;
.....
b=(inportb(stat)^0x080)&0xf0;
.....
a=a>>4;
c=c*0.0196....
Now don't let the upper lines divert you, i only added them for the sake of clarity. The problem actually is with the last line. Won't there be a type conflict b/w c & 0.0196?
a and b in turn take inputs from an ADC via a multiplexer, 1's and 0's essentially, they being the digital representation of an analog signal that we've sampled. 0.0196mV is the resolution of the ADC.
could the code be wrong?
int b[1700], c[1700], a[1700];
.....
a=(inportb(stat)^0x80)&0xf0;
.....
b=(inportb(stat)^0x080)&0xf0;
.....
a=a>>4;
c=c*0.0196....
Now don't let the upper lines divert you, i only added them for the sake of clarity. The problem actually is with the last line. Won't there be a type conflict b/w c & 0.0196?
a and b in turn take inputs from an ADC via a multiplexer, 1's and 0's essentially, they being the digital representation of an analog signal that we've sampled. 0.0196mV is the resolution of the ADC.
could the code be wrong?