Gerhard Fuernkranz wrote:
Am 27.06.2010 10:13, schrieb Klaus Karcher:I thought I got the trick in i1pro_meas_to_abssens(): if (rval >= maxpve) rval -= 0x00010000; /* Convert to -ve */ but I still get many overflows. (I use the maxpve value returned from i1pro_getmisc(): 0xfa00)Hi Klaus, I must admit that I can't assess this piece of code, since I don't know how rval is supposed to be encoded. The code suggests that we're dealing with an asymmetric, signed 16-bit encoding, which can encode more positive than negative numbers (given the actual maxvpe value of 0xfa00). Granted that this assumption is correct, I'm wondering, though, whether it is really an "overflow" if negative numbers are returned, or whether these are still valid readings (albeit negative ones).
Hi Gerhard, yes you are correct as far as I know. It's unclear what the analog processing and A/D converted reference are in the device, but it does output -ve values. Naturally they get averaged and subtracted out when the black level is subtracted from the raw reading. Graeme Gill.