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

20x4 Liquid Crystal Display


  • Please log in to reply
4 replies to this topic

#1 Inquisitor

Inquisitor

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationAtlanta, Georgia, USA

Posted 24 October 2011 - 12:56 AM

I was playing around with some new stuff. I recently decided to mess around with an Arduino also. “Luke – take a walk on the dark side.” Anyhow, with first blush… it’s interesting and different. I can see some benefits and can see how it will complement the Netduino in some areas. But… boy… do I hate the development environment on it. I am way spoiled with Visual Studio!

Anyway, my first comparison and contrast with the two uses a 20x4 LCD using the HD44780 chipset for output. Along the way, I ported the Arduino LiquidCrystal library over to Netduino. And yes, I know I didn’t really have to. But if you read the blog entries, you’ll see it became a challenge. And in some cases, it might be useful to someone.


If there is any interest and if it’s allowed, I can put the library in the Wiki.

Blog Entry for LCD driven by Arduino (http://MessingWithReality.com/whats-going-on-in-there/)

Blog Entry for LCD driven by Netduino (http://MessingWithReality.com/cough-it-up/) Includes source code and sample test application
Doing my best to keep the smoke in the little black boxes.
If my message helped you... how 'bout giving me a Posted Image
www.MessingWithReality.com

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 24 October 2011 - 04:07 AM

Good point making a comparison between Arduino and Netduino on a pretty simple project! I'd dig further on this direction, because it's interesting to see pro/cons of the two boards. The only remark I move to you is that I wouldn't use a direct interface with Netduino, just 'cos its weakness on the ability to drive a port. It much like comparing the hare and the turtle... I've used many times the 74HC595 expansion via SPI with the uLiquidCristal. Cheers
Biggest fault of Netduino? It runs by electricity.

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 24 October 2011 - 04:18 AM

Hi Inquisitor, It's cool to see you building projects with both Netduino and Arduino. We love open source hardware, and there's no dark side to picking up an Arduino too. Chris

#4 SteveE

SteveE

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationMidwest

Posted 12 August 2012 - 08:03 AM

I was playing around with some new stuff. I recently decided to mess around with an Arduino also. “Luke – take a walk on the dark side.” Anyhow, with first blush… it’s interesting and different. I can see some benefits and can see how it will complement the Netduino in some areas. But… boy… do I hate the development environment on it. I am way spoiled with Visual Studio!

Anyway, my first comparison and contrast with the two uses a 20x4 LCD using the HD44780 chipset for output. Along the way, I ported the Arduino LiquidCrystal library over to Netduino. And yes, I know I didn’t really have to. But if you read the blog entries, you’ll see it became a challenge. And in some cases, it might be useful to someone.

If there is any interest and if it’s allowed, I can put the library in the Wiki.

Blog Entry for LCD driven by Arduino (http://MessingWithReality.com/whats-going-on-in-there/)

Blog Entry for LCD driven by Netduino (http://MessingWithReality.com/cough-it-up/) Includes source code and sample test application

All I had to do was ensure that I had power and ground to pins 15 and 16, and all was well.

And I like your code style! I thought I had accidentally opened one of my files: prepended "_" for member vars and nice use of #region.

Thank you for this and the attention to details. Details are what makes the world go around (and stuff work)!

Steve

#5 SteveE

SteveE

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationMidwest

Posted 14 August 2012 - 05:34 AM

All I had to do was ensure that I had power and ground to pins 15 and 16, and all was well.

And I like your code style! I thought I had accidentally opened one of my files: prepended "_" for member vars and nice use of #region.

Thank you for this and the attention to details. Details are what makes the world go around (and stuff work)!

Steve

I have this working fine on a generic 20x4 display. I cannot yet get it to work with my SainSmart 16x2, which does seem to work on Arduino with the standard LCD lib.

Here is minor bug in the code, which would rarely be hit. With the bug, SetCursor will only catch too large of a row setting when the row is 2+ more than the max row

public void SetCursor(byte col, byte row)
{
if (row > _numlines) <== should be >=, always compare offset to container size when looking for an overflow
row = (byte)(_numlines - 1); // we count rows starting w/0
Command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
}

Should be

public void SetCursor(byte col, byte row)
{
if (row >= _numlines)
row = (byte)(_numlines - 1); // we address/iterate rows starting at 0
Command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
}




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.