Netduino home hardware projects downloads community

Jump to content


Photo

Devantech LCD03 I2C 20 x 4 LCD Display


  • Please log in to reply
4 replies to this topic

#1 Austria Project

Austria Project

    New Member

  • Members
  • Pip
  • 3 posts
  • LocationAustria

Posted 06 February 2012 - 01:01 PM

Hello community I'm new on the netuino world.. my problem is to find or to write a program for my netduino+ and the Devantech LCD03 with I2C Protocol I searching on many Websites (Codeplex...) but i have never found a suitable program. I only found this on the TinyCLR HP. http://wiki.tinyclr....ch_LCD03_driver there is the SOURCE Code and the LCD DRIVER but how can I implement this for the Netduino .NETF The spec from the Display: http://www.robot-ele...m/Lcd03tech.htm i have attached my programm but it doesen't work maybe anyone of the cummunity can help me or have a functionally program :) thank you in advance

Attached Files



#2 Dave VanderWekke

Dave VanderWekke

    Advanced Member

  • Members
  • PipPipPip
  • 860 posts
  • LocationHighland Lakes, New Jersey, USA

Posted 06 February 2012 - 01:48 PM

Try downloading the Micro Liquid Crystal Library and the Fusionware Spot Library from CodePlex. MLC handles the LCD, Fusionware.Spot handles the I2C. I am using a different 20x4 I2C LCD but this code works for mine.

using FusionWare.SPOT.Hardware;
using MicroLiquidCrystal;

// Define the I2CBus
private static I2CBus _bus;
// Define the LCD Display
private static Lcd LCD;

// Initialize I2C bus (only one instance is allowed)
 _bus = new I2CBus();
// Use I2C provider
// Initialize provider (multiple devices can be attached to same bus)
var lcdProvider = new MCP23008LcdTransferProvider(_bus);
// Create the LCD interface
LCD = new Lcd(lcdProvider);
// Set up the LCD's number of columns and rows: 
LCD.Begin(20, 4);

You should probably use the overloaded MCP23008LcdTransferProvider method to pass in your address and shifter configuration in addition to the _bus.

The rest should be easy using:

LCD.Clear, LCD.Backlight, LCD.SetCursorPosition, LCD.Write.

Hope this helps.

 


#3 Dave VanderWekke

Dave VanderWekke

    Advanced Member

  • Members
  • PipPipPip
  • 860 posts
  • LocationHighland Lakes, New Jersey, USA

Posted 06 February 2012 - 02:15 PM

Also... I looked at your code. I think it would work but you're missing your main subroutine.

Should look like this:

namespace NetduinoPlusApplication1
{
	public class LCD03

	{
		
    	public static void Main()
    	{
     	
     	LCD03 LCD = new LCD03(0xC6);	// I²C protocol
 
     	LCD.Cursor(LCD03CursorType.Hide);   // Hides cursor
     	LCD.BackLight(true);  // Turn on backlight
     	LCD.ClearScreen();   // Clears the screen
     	LCD.Write(1, 1, "FEZ rocks");  // Displays some text   	
     	
    	}		
		
	}
}

 


#4 Austria Project

Austria Project

    New Member

  • Members
  • Pip
  • 3 posts
  • LocationAustria

Posted 07 February 2012 - 01:07 PM

@dvanderwekke
I have take a look to the 2 link's but it is too complicated for me to implement this links in my program :unsure:
thank you although

I and my Project-Partner have written a new program and it works (our first sucess is that we can send anything to the Display, the next step is to implement a RTC (maxim DS1307) and a Keypad)

when we a ready with our Project (heating control system with a netduino+ and LCD) we release our Project for all.

for all user please post your suggestions / ideas or program

#5 bloughead

bloughead

    New Member

  • Members
  • Pip
  • 2 posts

Posted 19 February 2012 - 04:21 AM

I was wondering of you have created any special characters for the LCD03? If so how do you get them to be displayed on the display? In particular the degrees symbol °.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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