Hi,
I have a problem with the ADC. Practically I want to acquire the voltage values of CAN message. But from the theory when there is a dominat bit equal to 0, on CAN-High there will be as voltage value, a value around 3.5V. The same happens for CAN-Low: when there is a dominant bit the voltage measurement is around 1.5V.
In my configuration, the ADC gives as values, values that aren't close to 3.5V (for CAN-High) and to 1.5V (for CAN-Low) when there is a dominant bit (0).
The fact that the ADC gives incorrect values, how could be justified? What it is the cause of this?
Thanks
Best regards,
Paola
Hi Paola,
it's good to mention which device you have.
Did you try to measure known voltage? Or some devices allows you to measure high and low voltage reference. This can be used to confirm if everything is ok and you are getting correct results. This would be the first step from my point if view.
Regards,
Lukas
Hi Lukas,
I use as board s32k144. I don't have a oscilloscope to measure the voltage values. But I would comprehend if the problem is intrinsic of the ADC of the board. For the result in terms of voltage I multiply the value of the ADC for 5V/(4095) because I set as the resolution of the board 12bit (2^12 -1 = 4095).
I don't know what is the cause that generates a incorrect values and would understand from theorical point of view what is the source of the problem.
Thank you
Best regards
Paola
Hi,
did you try use some steady known voltage instead CAN bus? Your voltage computation is correct - in case that ADC is really set to 12 bit. The default value in NXP examples is 10 bit.
Jiri
Hi jiri_kal,
thank you for your answer. I'v solved the problem. The problem was the termination resistance of 120 Ohm.
Thank you for your help
Regards,
Paola