20x4 Liquid Crystal Display
#1
Posted 24 October 2011 - 12:56 AM
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
- Mario Vernari likes this
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#2
Posted 24 October 2011 - 04:07 AM
#3
Posted 24 October 2011 - 04:18 AM
#4
Posted 12 August 2012 - 08:03 AM
All I had to do was ensure that I had power and ground to pins 15 and 16, and all was well.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
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
Posted 14 August 2012 - 05:34 AM
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.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
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