I had a YAMAHA DX-9 come in for a "battery change" as the front panel display was showing "CHANGE BATTERY!" when the synth was turned on. The customer had left the unit crated up for a long time and was testing it prior to selling it.
I went ahead and replaced the battery without powering the synth up, only to find the same symptom with the new battery in place. Sometimes it would report the correct voltage of 3V, but sometimes not, arbitrarily. Further basic testing revealed that the DATA ENTRY slider was not working either. Electrical testing of the data fader showed that it was fine - the problem was elsewhere.
A helpful user on a forum that I can't trace at the moment (I would like to give credit as it was the only mention on the internet that I found) pointed out that there is an ADC (analog to digital converter) responsible for converting control positions (as voltages) into digital data for the CPU. It handles a variety of functions including the battery level, data entry slider and other controllers. A problem with the ADC or the associated multiplexers, buffers etc. would result in spurious battery reading and bad data entry.
This page (below) from the service notes shows the ADC (on the left, labeled A/D) and its responsibilities: Data Entry, Pitch Bend, Modulation, Foot cont, Breath cont, Aftertouch, Battery. The relevant parts of the DX9 are the same as the DX7.
I replaced the ADC (M58990P-1) with a NOS part and also replaced a line driver (74HC240) and some multiplexers (74HC138) associated with the sub CPU, for good measure.
This resulted in the synth reporting correct BATTERY voltage and restored the correct functioning of the DATA ENTRY slider, as well, presumably of the other controllers which I had not tested.
The lesson for other DX7 or DX9 owners is that issues with the M58990P-1 will cause various problems that might be disguised as hardware failures.