Power Supply BypassIn order to obtain the accuracies represented in this datasheet, it is necessary to provide excellent bypass on the power supply. Adequate bypass is a 1?F capacitor in parallel with a 0.01?F capacitor connected within a few millimeters of the power supply leads.
I'm just wondering if 0xFF and 0xFE (from your other debugging) is out of range for the device.
So the frequency is influencing the results?
The original (working) sketch does one frequency change. Yours does two. The working sketch seems to select a different frequency to the problem sketch.I am hypothesizing that either the second change, or the different frequency, is causing problems.