I've spent about 8 hours over the last week combing the forums and the general internet for this issue and found many have trouble with LCDs, but few posts end with a resolution.
I have this Arduino Compatible I2C LCD:
http://www.ebay.com/...=STRK:MEBIDX:IT
I am using the microliquidecrystal library: https://microliquidc...l.codeplex.com/
I aligned to 2.2K resistors to pull up the SC and SD pins of the Netduino after experimenting from 10K down to 33ohms.
I power the LCD until just before initialize the lcd object (I do this with a break in the debugger). I do this to prevent the issue others have seen that result in no communication and a resulting exception thrown.
I changed the microliquidcrystal class to use an I2C address of 0X27 instead of the 0x20 default as instructed on the EBay page.
With each I2C call, the execute routines return the correct number of bytes communicated, so I imagine it's talking correctly.
However, on the LCD I just get a continuous row of full blocks and the backlight flickers with each call.
I have played with the contract potentiometer on the back of the module to ensure its not just washing out. It's not.
In the code below, I tried simply turning the backlight on and off every 1.5 seconds, but it still just flickers versus staying on. Trying to write text does nothing but flicker the backlight.
What could be left to try? I'd be happy just to turn the backlight on and off under my control.
Is it because I'm not using Adafruit's backpack? If so, how do I learn to send I2C commands that will work with this backpack?
using System.Diagnostics;
using System.Threading;
using FusionWare.SPOT.Hardware;
using MicroLiquidCrystal;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
namespace HelloWorld_I2C
{
public class Program
{
public static void Main()
{
// Option 1: Use I2C provider.
// initialize i2c bus (only one instance is allowed)
var bus = new I2CBus();
// initialize provider (multiple devices can be attached to same bus)
var lcdProvider = new MCP23008LcdTransferProvider(bus);
// create the LCD interface
var lcd = new Lcd(lcdProvider);
// set up the LCD's number of columns and rows:
lcd.Begin(16, 2);
while (true)
{
lcd.Backlight = !lcd.Backlight;
Thread.Sleep(1500);
Debug.Print("Derp.");
}
}
}
}
Thanks,
Sean