Inaccurate differential signal measurement on Arduino Mega 2560

I am attempting to measure this differential signal using the differential ADC mode on the Arduino Mega 2560. One end of the differential signal has a common mode DC voltage of 1.2V and the other end is a DC signal at 1.2V.

However, when I hook the signal up to the Arduino ADC pins, I don't get the full signal swing in both directions. I've also attempted to use a differential amplifier to convert the differential signal to single ended before inputting to the ADC, but it is also the same result:

Is there a reason why the Arduino op amp is not outputting full swing?

This was cross-posted from: (adc - Inaccurate differential signal measurement on Arduino Mega 2560 - Arduino Stack Exchange)

Show your sketch.

Maybe you have the gain set too high? No way to tell without seeing the sketch.

So you obviously expect something impossible. It's not clear to me what you really expect. A negative difference voltage is clipped to 0V.

Have you a circuit schematic, showing what you have as your differential amplifier?

The differential ADC has a 10-bit signed range of +511 to -512 so a negative output is valid. It looks like the negative output is going down to about -100 but the positive outputs are being clipped at +40-ish.

You are right, but 10 bit signed integers (0x200..0x1FF) are encoded differently from 16 bit signed integers (0xFFFF..0x7FFF). So the conversion into valid int's (sign extension) has to be done in software and may be buggy.

Thank you for your replies. I didn't figure out why one side was being clipped, but I instead shifted each signal positive using two equal voltage dividers, with one side of each being the inverting and noninverting inputs, and the other side being 5V. Reading the divided, and now positive, differential signal after that worked just fine. Apologies for not sharing a sketch.

Did you see this in the ADC section of the datasheet?

Circuit? Did you use a fully rail-to-rail opamp?

Yes. That's why I wanted to see the sketch.