View Single Post
Old 12-17-2012, 11:37 PM   #1034 (permalink)
Hilly-Billy-13
EcoModding Lurker
 
Join Date: Oct 2012
Location: Oregon
Posts: 19
Thanks: 1
Thanked 6 Times in 4 Posts
Quote:
Originally Posted by FalconFour View Post
^ Actually, you'll want to use this code instead: http://opengauge.googlecode.com/svn/...no/mpguino.cpp
I don't know why the "PDE" file stays up on the SVN page, it's moldy-oldy and faaaaar out of date. Now that everyone with an Arduino is using the (now-)standard '328 chip, there's zero concern of optimizing bytes in the compiled code... so the ye-olde PDE version should just be taken out back and shot, IMO.

Only thing you'll need to do is adjust the timing values (commented out) in the cpp version, if you're using a 16MHz Arduino as opposed to the 20MHz crystal in the prebuilt MPGuino board. Near the top, look for the section that says "//use with 16mhz, not tested" (it works fine). Match up the commented-out 16MHz values with the active 20MHz counterparts, and swap commenting ("//") on them, and you'll have 16MHz timing. Otherwise everything will be incorrectly displayed and timed on a 16MHz board.

Of course, over the next week or so I hope to start work on gutting and rebuilding MPGuino's code from the ground up, so this may not be too relevant in the near future...

I'm working on a version for the older European Diesels and have a couple of questions they relate to the pulse info from the fuel flow sensors. It's been noticed you can't do a good instantaneous flow from just reading & subtracting the pulses. It looks like you need to measure the time period between pulses from sensors and use that to determine your instantaneous flow rates. As I under stand the code this is how the instantaneous speed is determined. I also doubt you can use the interrupts from pins 4 for 1 sensor and pin 5 for the other, as the interrupts may hit at the wrong time. what's your opinion
  Reply With Quote