Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

HD44780 LCD with broken characters


  • Please log in to reply
7 replies to this topic

#1 BowWowTama

BowWowTama

    New Member

  • Members
  • Pip
  • 8 posts

Posted 09 July 2012 - 07:02 AM

Posted Image

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
using MicroLiquidCrystal;

namespace LCD_display
{
	public class Program
	{
		public static void Main()
		{
			GpioLcdTransferProvider LCD_provider = new GpioLcdTransferProvider
			(
			rs: Pins.GPIO_PIN_D9,
			enable: Pins.GPIO_PIN_D8,
			d4: Pins.GPIO_PIN_D3,
			d5: Pins.GPIO_PIN_D2,
			d6: Pins.GPIO_PIN_D1,
			d7: Pins.GPIO_PIN_D0
			);

			Lcd LCD_display = new Lcd(LCD_provider);

			LCD_display.Begin(16, 2);
			LCD_display.BlinkCursor = true;
			LCD_display.ShowCursor = true;

			LCD_display.SetCursorPosition(0, 0);
			LCD_display.Write("LCD Display 1");
			
			uint sec = 0;

			while (true)
			{
				LCD_display.SetCursorPosition(0, 1);
				LCD_display.Write(sec.ToString());
				Thread.Sleep(1000);
				sec++;
			}
		}
	}
}

Hi there, Sorry for my poor English first.

I have been wiring LCD U44780 and found a thread about LCD library at the link as follows
http://forums.netdui...ut-a-shift-reg/

I used a dll from the attached file and succeeded to run the LCD.

but as you can see from the attached picture above, it displays broken characters.
The code I made is simple program that displaying the seconds elapsed.

Regards.
Let me sing you forever

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 09 July 2012 - 07:36 AM

I used a dll from the attached file and succeeded to run the LCD.

Did you forget something by any chance? ;)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 BowWowTama

BowWowTama

    New Member

  • Members
  • Pip
  • 8 posts

Posted 09 July 2012 - 07:46 AM

Did you forget something by any chance? ;)


Um....
I added "MicroLiquidCrystal.dll" to the reference items.

It displays like this.
first row : LCD display 1 <- no problem.

second row : 1, 2, 3, 4, 5, >(What the!), 6, 7, 8, 9, 10, ?(What?), ...
and as the time goes by, it ignores its column and displays like the picture attached and displays as follows.
123_vw, 123_v), 123_v^ (It should display 123, 124, 125)

Thanks for your reply.
Let me sing you forever

#4 BowWowTama

BowWowTama

    New Member

  • Members
  • Pip
  • 8 posts

Posted 09 July 2012 - 08:08 AM

Problem solved!

I removed these two lines.

LCD_display.BlinkCursor = true;
LCD_display.ShowCursor = true;

but why?
Let me sing you forever

#5 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 09 July 2012 - 08:11 AM

as the time goes by

Just trying to get clear what the exact problem is. After some time the loop behaves differently, am I correct?
That sounds like a loose contact, where sometimes bits are getting lost. Is the issue consistent?
I mean, does it always show the exact same mistakes, or do they vary?
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#6 BowWowTama

BowWowTama

    New Member

  • Members
  • Pip
  • 8 posts

Posted 09 July 2012 - 08:15 AM

Just trying to get clear what the exact problem is. After some time the loop behaves differently, am I correct?
That sounds like a loose contact, where sometimes bits are getting lost. Is the issue consistent?
I mean, does it always show the exact same mistakes, or do they vary?



It varies and is consistent. Sometimes, it breaks characters when 19 secs collapsed and sometimes 24 secs and after that, the problem continues.

Anyway, problem has been solved and thanks for your attention.

Regards.
Let me sing you forever

#7 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 09 July 2012 - 09:06 AM

Anyway, problem has been solved and thanks for your attention.

Now I'm curious, what did you do to solve it? Was it a loose connection?
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#8 BowWowTama

BowWowTama

    New Member

  • Members
  • Pip
  • 8 posts

Posted 09 July 2012 - 09:19 AM

Now I'm curious, what did you do to solve it? Was it a loose connection?


Maybe it is a loose connection. but actually, I solved problem by removing two lines as described above.

LCD_display.BlinkCursor = true;
LCD_display.ShowCursor = true;

Let me sing you forever




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.