Thanks for that Darrel

Unfortunately this gives me the same result as previous. This works ok but it is only in steps of 8. Typical values from the adc are 288,280,272 etc. This means my actual resolution is only 10 bits, not 12.

The overall output is correct, with zero input I get about zero output from the adc, and for 5 volts input I get about 4000 out.

I'll have another look at the data sheet. I don't think this is a PBP problem but I would welcome any suggestions.

Thanks

RS