Anyone know if it’s possible to control the backlight on the Cobra in software? I saw a backlight property in the utility class (I think), but it doesn’t seem to do anything.
I was hoping there might be a property where I could assign a percent or something. That way, I could have my backlight fade in and out at certain times with my clock application.
On the 2 2x16 LCD shield the backlight was controlled via a PWM capable pin so rather than just turning the pin on/off (hi/low) I changed it to a PWM and could control the brightness.
It appears that the led backlight power for the 4.3 and 3.5 screens is generated on the adapter board. The smaller screen uses 6 LEDs in series for the backlight.
There are some pins that might be used for intensity control, but they are not put on the cable to the cobra.
I have just connected this pin to PWM5 to double check and I can adjust the back-light level to anything I like now!
Here is the sample code
public static void Main()
{
// Blink board LED
bool ledState = false;
PWM bl = new PWM((PWM.Pin)FEZ_Pin.PWM.PWM5);
byte i = 1;
while (true)
{
bl.Set(3000, i++);
if (i > 99)
i = 1;
Thread.Sleep(10);
}
}
is there any description of what those pads are for on the display adapter, besides this ?
edit:
schematics show that SHDN and ADJ are the only real pads of interest. For on/off control you can use SHDN, and for variable backlight you can pipe a PWM value to ADJ as Gus’ code does.
Now all I need to do is justify sticking the soldering iron onto the $50 board with a $100 screen on it ??? :o and figure out the “nicest” way to make it connectable back to Cobra