Is the Control Module Voltage (from OBD Mode 01 PID 42) and battery voltage the same? If not, what is the relation between them? Why is the max value of Control Module Voltage (from OBD Mode 01 PID 42) as 65.535 V, when the battery voltage can at max be 14 V in a car?
Looks like the issue is with the incoming signal.
Unless your vehicle comes equipped with a flux capacitor, 65 V across battery is a bit too much. Even heavy trucks don't run that voltage to my knowledge.
65535 is the max unsigned 16-bit integer.
Looking at the OBD-II wiki page it looks like the formula used by the OBD-II PID as per SAE J1979 is:
( A * 256 + B ) / 1000
Where A is the first two bytes, B is the next two bytes. If A and B are both 255 (so 11111111 in binary) you will get the max possible voltage, 65.535 V
If this result is from a simulator, I'd pin the blame there. If this is the signal coming from a real vehicle, I'd check for an ECU short (not sure though). Make sure you're polling the right address to rule that out as a possibility for the unusual voltage.
Control module voltage is the voltage supplied to the ECU. It isn't battery voltage but is usually close enough when the vehicle is running.
I think what you're seeing is just an artifact of the way computers work. The number you give is just 65535 with a decimal inserted into it. That is a special number to computers - it's the largest value that can be held in a 16-bit (2 bytes) integer. So, simply put, that is the largest value that can be returned for that particular measurement because of the computer variable they decided to use. It's figment of the programming - they don't expect it to ever measure 65 volts. If this was a value that could be positive or negative, you might see a maximum value of 32,767.
Another number you might see a lot is 255. This is the maximum value of an 8-bit (single byte) unsigned number. If the value can be positive or negative, the max value is 127.
When the engine is running, the voltage should track the alternator/voltage regulator output (which is also the battery charging voltage). When the engine is not running, it will track the battery voltage.
I can only speculate on the reason for the wide voltage range. Unregulated alternator output can exceed 48V, so it could be a useful diagnostic datum. Or, it may just be an artifact of the digital encoding, that the value range exceeds what is necessary.
Control Module Voltage is the battery voltage, minus any volts drop in the wiring between the battery and the ECU. 65535 is a full 16 bit register. The ECU will probably work with integer numbers (computes faster) but convert the final output of it's calculations for OBD into 'floating point' or 'real' form (numbers that can use decimal points).
The reason the maximum is not 65535, 6553.5 or 655.35 is that with the decimal point placed two from the left it allows the greatest accuracy in the integer stage of calculation while providing enough places to the left of the decimal to display all likely values. It essentially allows the ECU to work to 3 decimal places in integers. Perhaps not that important for battery voltage but I assume that's the principle.
There may not have been the facility to artificially apply a maximum value less than 65535 but even if there was I see no advantage doing so.