Since there are some diferencies between sensor devices, on program startup or by user intervention, the offset will be stored in a variable. At this stage no other than the atmospheric pressure is applied, so this can be measured very easy.

Then in normal operation this will be the reference level.

So say that the offset is about 1.2 volts at 0 pressure. The max say it is 5 volts. The span is 3.8 volts for a pressure range of 0-39 mbar. I'd like to normalize this as 0 to 1023 counts.

In the above example I would first take the offset of 1.2 volts that is 246 count and store it in var offset (and EEPROM).

Then in normal operation say the A/D reads more then 1.2 volts, so it subtracts from the count the offset. But I would like to expand the count to match 0-1023 and not 1023-offset only. There is where I am confused.

I can ditch the floating point and just accept integers.

Ioannis