01-22-2014, 03:39 PM
|
#4 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,807
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 829
Thanked 708 Times in 456 Posts
|
Quote:
Originally Posted by Ecky
I switched out the ROM from my Arduino, flashed with this code:
http://opengauge.googlecode.com/svn/...no/mpguino.cpp
After taking it apart, I couldn't see any visible damage to anything. Upon starting it up, I realized that it most definitely was not the same version of code that it shipped with - brightness is inverted (3 is dimmest, 0 brightest) and the buttons are a lot less... responsive, so perhaps the unit I have had your modified code already.
The results of the new chip: gallons per hour reads properly, but I can't get it to read the VSS now. Or, perhaps, I can't find a VSS delay setting that works properly? With a delay of 2ms I get a reading but it's low by about 20%, while a setting of ~250 (like I was using before) gives no reading at all.
I will probably figure it out before you respond (by reading your thread properly) but I can't flash your code with the Arduino software.
EDIT: Line 225 ^^
EDIT2: "#define useLegacyLCDinvertedBrightness true" doesn't seem to fix the inverted brightness settings. I also tried manually changing "const uint8_t brightness[] PROGMEM = { 0, 41, 84, 128 }" to "{ 255, 170, 85, 0 }" to no avail.
|
Code:
*/
// if the below "#define"s are commented out, code will compile for an AtMega328-series processor
//#define ArduinoMega2560 true
//#define TinkerkitLCDmodule true
// if the below #define is commented out, 16 MHz system clock will be assumed
//#define use20MHz true // force 20 MHz system clock values
// only one of the below LCD options may be chosen - choosing more than one will cause a compilation error to occur
// if TinkerkitLCDmodule is used, useLegacyLCD will automatically be used, and the below options will be ignored
#define useLegacyLCD true
//#define useParallaxLCD true
// only one of the below button options may be chosen - choosing more than one will cause a compilation error to occur
#define useLegacyButtons true
//#define useAnalogMuxButtons true
//#define useParallax5PositionSwitch true
// the below options only work if useLegacyLCD is selected. If useLegacyLCD is not selected, the below options will not be inserted at all
//#define useLegacyLCDinvertedBrightness true // For alternate LCD backlight connections
#define useLegacyLCDbuffered true // Speed up LCD output
Starting at line 223, does your code look like the above?
|
|
|