EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   OpenGauge / MPGuino FE computer (https://ecomodder.com/forum/opengauge-mpguino-fe-computer.html)
-   -   2x16 LCD Display issues/discussion (https://ecomodder.com/forum/showthread.php/2x16-lcd-display-issues-discussion-3096.html)

dcb 06-16-2008 12:48 AM

2x16 LCD Display issues/discussion
 
FYI, the displays are a whole nuther discussion, so lets break it out here. I had an annoying failure on mine and another user is having to use an uncommon contrast setting (though there might be more going on there). Andrewj said his isn't working either (any news Andrew?) so lets us focus on that a bit here in a seperate thread. Please do try and be constructive, but we may decide that another LCD would be a better choice, though I will put a 2x16 constraint on it for 1.0. Or we may learn the cause of failure is external, but we need to be exacting in the process, not speculative.

FYI, I sent this of to nkc:
_____
Subject: LCD questions
To: orders@nkcelectronics.com

I've been recommending a single source for the LCDs for a fuel efficiency gauge to minimize compatability issues, and wanted to bounce a couple questions off you.

1. I have a LCD I purchased back on 4/6, that is just now missing column of dots (see picture)
http://opengauge.org/diympggauge/lcdmissingcolumn.JPG Do you have any sort of knowledge base about what makes these things fail? Or can offer any advice about how to keep them from failing?

2. Another person ordered the same LCD, we are using pwm @500hz for the contrast and I found that on most of the units that an analogWrite(15) made a useable display, but this person needs an analogWrite(100). Is there that much variance between otherwise identical LCDs or is it a sign that something else is going on?

Thanks,
Dave.

dcb 06-17-2008 08:27 PM

Heard back from NKC, nothing difinitive on the failure modes or the contrast differences, no suprise, but they offered to ship a replacement LCD :thumbup: , Since we seem to be moving towards CPU control of the lcd controller power, it might last a little longer once we get the timeout working <shrug>

cmags 06-20-2008 12:16 AM

Hey a thread about LCD issues... yay. I've gone and been a bad boy and ventured away from the "recommended LCD". My eyes are sensitive to glare, esp. at night, and a bright blue LCD would be unbearable to me, not to mention a distraction while driving. I picked up another HD44780-compatible LCD, the TEG16717, and am having some issues.

After running on the bench for just a couple minutes, the screen seemingly is losing synch (possible timing issue?) and just displays a single scrolling row of garbage: "?0°?█??█/o??█/█0" etc. When running v0.11, the █ blocks would show the custom characters from the 'duino memory so I assume that's where they're coming from in v0.62 from the big characters.

I can reproduce the issue at will by pulling LCD power and putting it back on (loses synch - would need a reset). I have verified via debug that the 'guino is still running, because I added a serial output of the time from the CPU Monitor screen. I can switch between the screens and enable/disable my serial output, even with my LCD corrupt.

It also seems that sometimes just touching my wires (longest being about 5" from the breadboard to the LCD) will put it into the corrupt state, but other times I can really shake them and nothing will happen. Seems random.

Could it possibly be timing? I don't see any delays in the LCD code such as other 4-bit libraries have, though they seem across the map. I haven't studied the code and HD44780 spec thoroughly enough yet to be sure.

Also, out of curiousity, is there a reason we're not using consecutive pins for the 4 data bits?

dcb 06-20-2008 12:36 AM

re: display funnyness, you need to power cycle the board and the LCD. They need to be initialized after being powered up to display correctly, and they (all) have a finicky initialization scheme AND don't like to be initialized twice for a given power cycle. I have updated the code so you can power the LCD pin 2 (and only pin 2) from arduino pin 15 (analog 1) and so the guino will turn it on and off for you and it should be much better behaved after resets and reprogramming. But it sounds like the lcd controller power might somehow be flaky if you can touch a wire and make it glitch.

re: pinout, tried to find a balance between short tidy hookups with the basic arduino layout backed up to the lcd, and a leaving multi purpose pins open for future enhancements (pwm, tx/rx, analog).

dcb 06-20-2008 12:43 AM

Also note there are delays at the bottom of
void LCD::LcdCommandWrite(byte value){
and
void LCD::LcdDataWrite(byte value){

try upping them to 10 maybe (display will be slower)

cmags 06-20-2008 11:48 AM

Yea, maybe my LCD has different power requirements, but hooking up the LCD power pin 2 (no backlight) to 'duino pin 15 won't power up the LCD. Doesn't matter where my ground is (pin 14 or GND).

Fortunately, the package I got had two LCDs included, so I can try the other one, and use a cleaner setup for wiring (maybe I'll use a couple short pieces of cat-5, with 3 or 4 pins used for data each, twisted with a GND.

I also tried inserting delays - in the lcdCommandWrite() I upped the delays from 1 to 2, but will be more aggressive. I also tried adding 50ms delays between all the initialization commands, also to no avail. I also tried bringing the main loop from a half second to a full second. Still no help, thought I didn't really expect it to.

The LCD was working beautifully with the sample codes on arduino.cc, but not with your code. Not sure what's going on. I'd really like to avoid having to rewrite the whole damn thing using one of their libraries. I did spend a couple hours last night with v0.62 printed out studying the code, so I have a decent feel for what's going on if it becomes necessary.

cmags 06-21-2008 12:59 PM

Hey, I just thought of something. I'm trying to get this thing up and running for a 2500mile trip I'm taking next week, and since I'm having LCD issues, are there any pieces of software that will display the output of the 'guino's serial print in a small window on the PC? I've already got a nice LCD screen in the car - a 7" TFT touchscreen for my carPC. If I can just get the 'guino to send the data back out to the PC rather than to an LCD, I won't have to worry about all these screen issues nor the fact that my LCD doesn't have a backlight.

dcb 06-21-2008 01:09 PM

Sort of, if you just uncomment the #debuguino line and connect to the guino via hyperterminal it will spit out the raw instant and current data. Shouldnt be too hard to change those Serial.print lines to print instant.mpg() and/or tank.mpg() or whatever. Run them through the format function first. The arduino IDE has a serial monitor also.

cmags 06-21-2008 07:40 PM

Yea, I know about the IDE serial monitor - used it a couple times for added debug, but that's not easy to hide in a corner on the screen (real estate is hard to come by on a 7" screen). I was thinking about hyperterminal, thanks for the confirmation... I'll have to look into it.

dcb 06-21-2008 08:01 PM

1 Attachment(s)
http://ecomodder.com/forum/attachmen...1&d=1214092859


All times are GMT -4. The time now is 08:18 AM.

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