View Single Post
Old 09-29-2010, 04:50 PM   #3 (permalink)
FalconFour
EcoModding Lurker
 
FalconFour's Avatar
 
Join Date: Sep 2010
Location: Fresno, CA
Posts: 78

LEAF - '11 Nissan LEAF
Thanks: 4
Thanked 9 Times in 7 Posts
Not exactly, although I can pretty closely theorize as to how the program works. Most of it is putting the data in the GUI, and another good part of it is adapting the broken data from the serial interface running at 9600 baud to the data coming in at 160. I'd take some references to figure out what parameters are what bytes in the stream and how to interpret them, but for the most part it would have to be entirely custom to this Arduino platform.

I'd figure this flow of the system:
In an interrupt, or at some timed part of the program, check that the appropriate timing for 160 baud has passed (count loops based on the system used for injector timing, maybe?). When it has, and a new bit needs to be read, read the bit and add it to the end of the current "data set" stream - the set of parameters that gets looped every second or so by the car's computer. When the data set is completed and it starts to loop again (there's got to be something in the stream that indicates the end?), parse the interesting values in the data stream and move them into their appropriate variables (RPM, temp, error codes, etc). Rinse and repeat. In the routine that interprets data and draws the display, these values would be used.

Oversimplifying? :/
  Reply With Quote