Whats the standard method to control the LCD backlight level? I’m using the gadgeteer LCD from GHI? I only see a method call BacklightEnabled
@ anthonys - We don’t provide a way to control the level in the driver. You may be able to manually control the pin with a modified driver using SignalGenerator or PWM if available.
Never created a driver for netmf? Where do i start?
From gadgeteer driver ?
and rewrite this part ?
/// <summary>
/// Sets the module's backlight to the passed in value.
/// </summary>
/// <param name="bOn">True for backlight enabled, false for disabled.</param>
public void SetBacklight(bool bOn)
{
BackLight.Write(bOn);
}
@ John - Time to cleanup my bookmarks then (thanks)
Thanks Guys…that doesn’t look too hard
I want to make the backlight using PWM, never modified a Gadgeteer driver. How do i change private GTI.DigitalOutput backlight; to a PWM pin?
private const byte DISP_ON = 0x0C;
private const byte CLR_DISP = 1;
private const byte CUR_HOME = 2;
private const byte SET_CURSOR = 0x80;
private static byte[] ROW_OFFSETS = new byte[4] { 0x00, 0x40, 0x14, 0x54 };
private GTI.DigitalOutput lcdRS;
private GTI.DigitalOutput lcdE;
private GTI.DigitalOutput lcdD4;
private GTI.DigitalOutput lcdD5;
private GTI.DigitalOutput lcdD6;
private GTI.DigitalOutput lcdD7;
private GTI.DigitalOutput backlight;
private int currentRow;
/// <summary>Whether or not the backlight is enabled.</summary>
public bool BacklightEnabled {
get {
return this.backlight.Read();
}
set {
this.backlight.Write(value);
}
}
You want to look at something like:
GTI.PWMOutput backlightPWM = SetupPWMOutput(GT.Socket.Pin.Seven);
But that obviously requires a PWM capable pin (P socket)