View Single Post
Old 08-18-2008, 10:05 AM   #125 (permalink)
OBDuino coder
Magister's Avatar
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
Hi, I am the one who wrote the code. I havn't had a chance to continue it lastly because it appears my car is CAN only and unfortunatly lack of time.

Where there is some hardcoded value inside is to quick test the code and I didn't put any error checking and things like this. The code has been written first and was tested on the hardware later.

The software serial does not use an "approximate 9600 baud" but a right 10400, it should not cause any problem. Anyway after sending the 0x33, the ECU should answer by lowering the K line for its start bit and it will unblock the iso_read_byte() while statement. At this point, no 10400 baud is in use, the 0x33 bits are send with delay(200) which are ok.

The UART is used to send debug message, of course it's easy to just change the call of iso_write_byte() to Serial.write(). I may test it to proove my car is CAN only, Hyundai USA says it is CAN, Hyundai Canada says not

EDIT: if my car is CAN only, I may use an ELM327, it's $32 + a few $ of components (a crystal, some resistors/capacitors) to wire it for CAN protocol. And we have the possibility to wire it for all protocol for a few $ components more.
2013 Hyundai Sonata Hybrid

Last edited by Magister; 08-18-2008 at 10:13 AM..
  Reply With Quote