|
|
|
Component
LCD
Liquid Crystal Display
Methods:
(Methods are user-callable functions/subroutines intended for
the component functions control. Please see the Embedded Components page for more information.)
-
Enable
- Enable the component - it starts the LCD module. Events may be generated ("DisableEvent"/"EnableEvent").
ANSIC prototype: byte Enable(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
Disable
- Disable the component - it stops the LCD module. No events will be generated.
ANSIC prototype: byte Disable(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
EnableEvent
- The method enables the events. This method is available only if a "Interrupt service/event" is enabled.
ANSIC prototype: byte EnableEvent(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
DisableEvent
- The item disables the events. This method is available only if a "Interrupt service/event" is enabled.
ANSIC prototype: byte DisableEvent(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
SetSegmentState
- The method activates/deactives an individual segment of LCD according to method parameters. For backward compatibility, this method is generated also with an old name "SetPixel" (as a macro).
ANSIC prototype: byte SetSegmentState(byte frontplane, byte backplane, bool value)
- frontplane:byte - Index of the frontplane (value 0 - (number of used frontplanes - 1))
- backplane:byte - Index of the backplane (value 0 - (number of used backplanes - 1))
- value:bool - State of a LCD segment : true - On, false - Off
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode ERR_RANGE - parameter frontplane or backplane is out of range
-
GetSegmentState
- The method gets state of an individual segment of LCD according to method parameters. For backward compatibility, this method is generated also with an old name "GetPixel" (as a macro).
ANSIC prototype: byte GetSegmentState(byte frontplane, byte backplane, bool *value)
- frontplane:byte - Index of the frontplane (value 0 - (number of used frontplanes - 1))
- backplane:byte - Index of the frontplane (value 0 - (number of used backplanes - 1))
- value: Pointer to bool - State of a LCD segment : true - On, false - Off
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode ERR_RANGE - parameter frontplane or backplane is out of range
-
SetData
- Set data to the LCD data registers. It sets/clears all used segments.
ANSIC prototype: byte SetData(ComponentName_tDataArray data)
- data:ComponentName_tDataArray - Pointer to array of data
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
GetData
- Get data from the LCD data registers.
ANSIC prototype: byte GetData(ComponentName_tDataArray data)
- data:ComponentName_tDataArray - The pointer to array of data
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
- Methods for HC08 family derivatives.
-
SetContrast
- Set the contrast of the LCD.
ANSIC prototype: byte SetContrast(byte contrast)
- contrast:byte - Byte value 0 - 15
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode ERR_RANGE - The value of parameter is out of range.
- Methods for HCS08, RS08, ColdFireV1 family derivatives.
- Methods only for LCD module ver. 2.
-
SetBackplaneState
- The method sets phase of selected backplane in which the pin is active. Note: Backplane phases are initialized by default in the same order as backplane pins allocated in the component, i.e. Backplane pin 0 = phase A, Backplane pin 1 = phase B etc. If the default setting is changed by this method, backplane number passed as parameter to SetData, SetAlternateData, GetData, GetAlternateData, GetSegmentState and SetSegmentState methods will no longer corresponds to the order of pins allocated in the component. Backplane number passed as parameter to the methods mentioned above must reflect phase parameter of this method.
ANSIC prototype: byte SetBackplaneState(byte backplane, byte phase)
- backplane:byte - Index of the backplane (value 0 - (number of used backplanes - 1))
- phase:byte - Mask of phases in which the pin is active. Phases A, B, C, ..., H corresponds to masks 1,2,4, ... , 128.
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode ERR_RANGE - parameter backplane is out of range
-
SetAlternateData
- Set data to the LCD data registers. It sets/clears all alternate segments. The method is available only if number of bacplanes is less than or equal to 4.
ANSIC prototype: byte SetAlternateData(ComponentName_tDataArray data)
- data:ComponentName_tDataArray - Pointer to array of data
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
GetAlternateData
- Get data from the LCD data registers that corresponds to the alternate display set. The method is available only of number of bacplanes is less than or equal to 4.
ANSIC prototype: byte GetAlternateData(ComponentName_tDataArray data)
- data:ComponentName_tDataArray - The pointer to array of data
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
- Methods only for LCD module version 1 (LC60).
-
SetSegmentBlinkState
- The method sets blinking state of an individual segment of LCD according to method parameters. It is necessary to call the method "Blinking" to apply the setting of segment blinking states.
ANSIC prototype: byte SetSegmentBlinkState(byte FrontplanePinNum, byte BackplanePinNum, bool SegmentState)
- FrontplanePinNum:byte - Index of a LCD Frontplane pin
- BackplanePinNum:byte - Index of a LCD Backplane pin
- SegmentState:bool - Blinking State of a LCD segment : true - Blinking, false - No Blinking
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode ERR_RANGE - parameter FrontplanePinNum or BackplanePinNum is out of range
-
GetSegmentBlinkState
- The method gets blinking state of an individual segment of LCD according to method parameters.
ANSIC prototype: byte GetSegmentBlinkState(byte FrontplanePinNum, byte BackplanePinNum, bool *SegmentState)
- FrontplanePinNum:byte - Number of a LCD Frontplane pin
- BackplanePinNum:byte - Number of a LCD Backplane pin
- SegmentState: Pointer to bool - Blinking State of a LCD segment : true - Blinking, false - No Blinking
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_RANGE - parameter FrontplanePinNum or BackplanePinNum is out of range
-
SetWaveformType
- The method set required waveform type (Normal/low-power).
ANSIC prototype: byte SetWaveformType(bool Type)
- Type:bool - Type of a waveform : true - Low-power waveform, false - Normal waveform
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
ResetSegmentState
- The method resets a state of all segments according to method parameters .
ANSIC prototype: byte ResetSegmentState(ComponentName_TResetSegmentState StateSort)
- StateSort:ComponentName_TResetSegmentState -
rssON_OFF_STATE : On/Off state of a segment will be cleared. rssBLINK_STATE : Blink state of a segment will be cleared.
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode
-
Blinking
- The method activates/deactivates blinking of a segment or all segments (according to parameter "Blink").
LC60 derivative specific information: This method does not affect setting of an individual segment blinking done by method "SetSegmentBlinkState".
ANSIC prototype: byte Blinking(ComponentName_TBlinking Blink)
- Blink:ComponentName_TBlinking - The state of each segment can be set by method "SetSegmentBlinkState".
bBLINK_SELECTED : Enable blinking of selected LCD segments set by method SetBlinkingState - available if supported by the HW.
bBLINK_ALL : Enable blinking of all segments (blank display during blink period), regardless the setting by method "SetSegmentBlinkState".
bBLINK_OFF : Disable blinking.
bBLINK_ALL_ALTERNATE : Enable blinking of all segments in alternate mode (alternate display during blink period) - available only if supported by the HW.
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode ERR_RANGE - Param specifies a blink mode not supported by this device.
-
SetBlank
- The method sets the blank display without affecting state of each segment. If supported by the LCD module, the method allows alternate display setting. A segment state is set by method "SetSegmentState" or "SetData".
ANSIC prototype: byte SetBlank(ComponentName_TSetBlank State)
- State:ComponentName_TSetBlank -
sbBLANK_STATE: It sets the blank display, all LCD segments are off, but internal state of the segments is not affected. It is possible to modify internal segment state using appropriate methods of the component. sbNORMAL_STATE : A segment state (active/deactive/blinking) is displayed. sbALTERNATE_STATE: Sets the display to alternate mode.
- Return value:byte - Error code, possible codes:
ERR_OK - OK ERR_SPEED - This device does not work in the active speed mode ERR_RANGE - Selected state is not supported by LCD module.
Note: Some methods can be implemented as macros.
|