Knowledge Base

<OBLCD Backlight Levels> = Lo,Hi; <OBLCD Backlight Delay> = Delay

Sets the parameters for automatic LCD display dimming.  Note, this instruction is only for character displays, for touch screen dimming see #HMI SetBacklight().

ParameterOptionRangeDescription
Lomandatory0 (off) – 8 (maximum)Sets the backlight low level.   
Himandatory0 (off) – 8 (maximum)Sets the backlight high level.   If set to anything other than 0, will disable digital output control of the backlight.
Delaymandatory0 – 255Sets the time in minutes that the backlight should remain at the high level after the last button press.  A value of 0 will set the backlight to the low level instantly.

The backlight will start at the high level and automatically switch to the low level when the delay elapses.  Pressing a button will reset the delay and set the backlight back to the high level.

On controllers that expose the backlight as a digital output, this digital output will only work while the backlight high level is set to 0.  Otherwise, if the high level is set to anything else, the backlight is exclusively controlled by OBLCD_Dim.

Alternative Method

There is also a low level way to manipulate the backlight.  The high/low levels and delay time are set separately.

This code sets the high and low backlight levels:

   SetU       0,High
SetU 1,Low
SPxCmd2 1,!CPU

Where

  • High = backlight high level, 0 (off) thru 8 (maximum)
  • Low = backlight low level, 0 (off) thru 8 (maximum)

Why would you possibly want to know this?  Well, it means you could dynamically alter the backlight level by using the values from memory or registers, eg:

   Recall     VariableLowLevel
PopU 0
Recall VariableHighLevel
PopU 1
SPxCmd2 1,!CPU

As for the high level backlight time, this code sets the delay:

   SetU       0,Minutes
SPxCmd1 4,!CPU

Where

  • Minutes = Time to keep the backlight at the high level, 0 thru 255 (4hr 15min)

Using a minutes value of 0 will dim the backlight instantly.

Reading Current Level

On some controllers the state of the backlight can be read back. The code

   SPxPoll1    8,!cpu        ;returns current back light level in U(0)

Use the PushU 0 instruction to get the number to X or use GoIfUT/GoifUF if you just want to know when the back light is on/off.

Dialect exclusions: Not available in dialects before 9.

Backlight Lifetime
Blue displays with a white backlight

The white LED technology used in these displays has a lifetime of approximately 3000 hours. The backlight should therefore be dimmed when not in use.  The lower the dimming the longer the backlight will last.  The ideal level is OFF (0).

Greenish displays with a greenish backlight

The backlight in these displays has a great lifetime, something in the order of “yonks” according to our hardware guru.  For those of you who may not hail from Australia, “yonks” means “a very, very long time”, like over 100,000 hours.

Note: This instruction modifies UV