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.

BowWowTama

Member Since 08 Jun 2012
Offline Last Active Jul 18 2012 07:39 AM
-----

Topics I've Started

HD44780 LCD with broken characters

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.

Safely remove Netduino

08 June 2012 - 02:25 AM

Hi there. Sorry for my poor English first.

I have been a .NET developer about 2 years and I got a netduino just a few minutes ago. Yeah!

I connected it to the usb port and installed .NET MF and SDK sets. but failed to create a project with Netduino. I searched the forum a few minutes and found that you have to put templates in the documents folder located in local drive. I have my documents folder in "E" drive. It was really embarrassing...

OK, here's a question.

1. Is there anything that I have to pay attention or be cautious when I attempt to remove Netduino devices from computer?
2. you know, there's a guide for a newbie and it has the first project tutorial about turning on and off the LED on the board.
I succeeded and while the LED was blinking, I tried to do following code.

public static void Main()
		{
			OutputPort outport = new OutputPort(Pins.ONBOARD_LED, false);

			outport.Write(false);
			Thread.Sleep(250);
			outport.Dispose();
		}

Instead of turning off, it remained turned on(not blinking).
But just "outport.Write(false);" removing other lines did the job.

3. From the above code, do I have to use "Dispose" method actually? I think that because netduino has a embeded framework on the chip and there must be a garbage collector. So from the view of managing memory, I guess it is necessary to dispose the method. but it can't do...

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.