Help a programmer who knows little about cars understand OBD-II (please?)
Hello. I don't know much about cars, but I'm knowledgeable in computer software programming, and I just recently learned about the OBD-II interface and I'm very interested in it. I wanted to try developing simple software to communicate with OBD-II vehicles, but first I'd need to understand exactly how I'm communicating with the car.
One thing I'm confused about is how the car's language is translated into a computer-readable language. I know that the data is delivered to a computer via serial connection. Assuming I'm using an OBD-II to USB adapter with an ELM327 microcontroller, what exactly is the microcontroller doing? Is it taking languages like ISO 9141-2, SAE J1850 PWM, etc. that are sent from the car's OBD-II port and translating them into the standardized OBD-II PID hex format so that my computer can understand it? What happens if you use a different microcontroller, will the computer still receive the same messages in the same format, or will they be formatted differently?
Another thing I'm wondering is why the VAG OBD-II cable I'm using won't work with my '98 Nissan Maxima. I do understand that VAG is meant for VWs, but it should still handle generic OBD-II regardless, right? It even states on the product's page that it supports ISO9141, which I believe Nissan vehicles use. I already ordered an ELM327 cable that I'm hoping will actually work with my Maxima, but I'm just curious as to why the VAG one will not work on my car.
I'm also just confused about the general flow of the information. As far as I know, it goes from OBD-II, then to a microcontroller that translates the information back and forth, then to a serial interface, and then, finally, to a computer.
Can anyone help me understand OBD-II more in-depth? Thank you!