Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 07-01-2008, 01:48 PM   #21 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 139

Scoob - '05 Subaru Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
So once I uncommented the left/right button LCD re-init in v0.66, it will properly re-init my LCD, though I do see that the time for some reason resets when I do that - not to zero, but to somewhere between 12s and 1:37.

I also confirmed that the mpguino Game of Life has the same issue. I'm going to try to re-code the LCD class to more closely follow Yoshi's timing suggestions and see if I can kick this issue.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 07-01-2008, 01:52 PM   #22 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
That would be awesome , just a little history, I had trouble with both the 4 bit library and the datasheet yoshi referenced and wrestled with the LCD for a frustrating amount of time a few months ago.

Here is the point in time where I actually got something working:
http://ecomodder.com/forum/showthrea...html#post23329

And here is the datacheet referenced, don't know if it is the same one:

http://web.mit.edu/6.115/www/datasheets/44780.pdf

Also, are you using those ebay jobbies?
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 07-01-2008, 08:07 PM   #23 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 139

Scoob - '05 Subaru Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, I am using the Ebay LCDs I picked up. They worked great with the 8-bit and 4-bit sample code on the arduino.cc site, so I expect that they're just a little less tolerant than the NKC LCD's timing wise. I'll let you know if I come up with anything that works.
  Reply With Quote
Old 07-09-2008, 12:54 PM   #24 (permalink)
SuperMID designer
 
Yoshi's Avatar
 
Join Date: Mar 2008
Location: Yokohama, JAPAN
Posts: 37
Thanks: 0
Thanked 13 Times in 2 Posts
Hi,
From the "OBD MPGuino gauge" thread...
Quote:
Originally Posted by dcb View Post
Is anyone willing to fix the 4 bit library?
Following is my proposal for the LCD init() routine.
I have not tested it yet. Please let me know it works or not.
Code:
void LCD::init(){
  delay(16);                    // wait for more than 15 msec
  value=pushNibble(B00110000);  // send (B0011) to DB7-4
  cmdWriteSet();
  tickleEnable();
  delay(5);                     // wait for more than 4.1 msec
  value=pushNibble(B00110000);  // send (B0011) to DB7-4
  cmdWriteSet();
  tickleEnable();
  delay(1);                     // wait for more than 100 usec
  value=pushNibble(B00110000);  // send (B0011) to DB7-4
  cmdWriteSet();
  tickleEnable();
  delay(1);                     // wait for more than 100 usec
  value=pushNibble(B00100000);  // send (B0010) to DB7-4 for 4bit
  cmdWriteSet();
  tickleEnable();
  delay(1);                     // wait for more than 100 usec
  // ready to use normal LcdCommandWrite() function now!
  LcdCommandWrite(B00101000);   // 4-bit interface, 2 display lines, 5x8 font
  LcdCommandWrite(B00001100);   // display control:
  LcdCommandWrite(B00000110);   // entry mode set: increment automatically, no display shift

//creating the custom fonts:
  LcdCommandWrite(B01001000);  // set cgram
  static byte chars[] PROGMEM ={
    B11111,B00000,B11111,B11111,B00000,
    B11111,B00000,B11111,B11111,B00000,
    B11111,B00000,B11111,B11111,B00000,
    B00000,B00000,B00000,B11111,B00000,
    B00000,B00000,B00000,B11111,B00000,
    B00000,B11111,B11111,B11111,B01110,
    B00000,B11111,B11111,B11111,B01110,
    B00000,B11111,B11111,B11111,B01110};

    for(byte x=0;x<5;x++)
      for(byte y=0;y<8;y++)
          LcdDataWrite(pgm_read_byte(&chars[y*5+x])); //write the character data to the character generator ram

  LcdCommandWrite(B00000001);  // clear display, set cursor position to zero
  LcdCommandWrite(B10000000);  // set dram to zero

}
Regards,
Yoshi
  Reply With Quote
Old 07-09-2008, 04:45 PM   #25 (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
It should work, also you do not need the "value=" in front of each pushNibble.

I noted that the "xarias" guy is using the same 15, 4.1, 0.1 delay in his code.
__________________
2013 Hyundai Sonata Hybrid
  Reply With Quote
Old 07-09-2008, 05:21 PM   #26 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 139

Scoob - '05 Subaru Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
I'll try that out tonight, though it seems that my 'guino is running the LCD more solidly now that I hardwired everythign instead of using the breadboard. Must have been too much capacitance in the BB causing glitches. Being right on the edge of the timing threshold wouldn't help that either, so I'll still try this for good measure.
  Reply With Quote
Old 08-19-2008, 07:45 PM   #27 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: USA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Partial LCD issue

I have been working on my Mpguino for some time but only a few minutes here and there. It seems I am having a issue with my LCD where the left half has nice clear text, but the right have is just solid blocks. At one point it was working completely. I have double and triple checked the wiring and can't find any problems. Any idea how the data lines map to the screen and what might cause half the screen to have issues?

J
  Reply With Quote
Old 08-19-2008, 08:04 PM   #28 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 139

Scoob - '05 Subaru Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
What LCD do you have? How long are your traces from the 'duino to the LCD? If you try another program (like DCB's game of life), does the same issue occur?
  Reply With Quote
Old 08-19-2008, 08:20 PM   #29 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: USA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by cmags View Post
What LCD do you have? How long are your traces from the 'duino to the LCD? If you try another program (like DCB's game of life), does the same issue occur?
It is the blue one from NKC. The wires are probably about 6 inches...it is still in breadboard mode...I was planning to shorten them when I built it permanently. I haven't run another program but will do that next.

j
  Reply With Quote
Old 08-19-2008, 08:25 PM   #30 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 139

Scoob - '05 Subaru Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
I dont know if it applies to you or not, but I had issues with my breadboarded version ("alpha") that I couldn't lick until I transferred to solderboard ("beta"). Even then I had some trouble (but far less), and am working on a new LCD (and iDuino instead of Freeduino) for my now "production" version. It reminded me of my engineering school days where we would run into issues with old breadboards introducing too much capacitance into a high-frequency circuit.

I know its not much help, can anyone else chime in?

  Reply With Quote
Reply  Post New Thread






Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com