oLEDB Object

Back to top of page Description:
 An oLEDB Object is a Hardware Object that uses a single digital I/O lines to control an LED with various blinking capabilities.
 The following table lists the size and availability of the oLEDB Object.
 ObjectSizeDescriptionA1A2B1B2C1
oLEDB3 BytesControls an LED light.xx
Back to top of page Operation:
 An oLEDB Object controls an LED by outputting a control signal on on the I/O line specified by the IOLine property.

The Blink property controls a low-speed blinking function.  If Blink is set to 0, then the LED glows continuously.  If Blink is 1, then the LED blinks once a second.  If Blink is 2, then the LED blinks 4 times a second. And if blink is 3, then the LED blinks twice at four times a second and then remains off for 1/2 a second then repeats.

The Operate property specifies if the "on" portion of the control signal is generated.  When the Operate property is set to 1, the oLED Object starts generating and outputting the "on" portion at the blink rate specified by the Blink property. When the Operate property is set to 0, the "on" portions are are discontinued and the specified I/O Line is set off.

Back to top of page Properties:

The following table lists the properties of the oLEDB Object:

Property

Description

Operate
A value that selects if the LED is on or off.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOffThe LED is off.
1cvOnThe LED is on.
IOLine
A value that specifies which I/O Line is used to control the LED.
Object Class: oIOLine Value Range: 0 - 31
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOLine help file for details.
Blink
A value that selects if and how the LED blinks.
Object Class: oSelect0to3 Value Range: 0 - 3
Data Type: Numeric Default Value: 0
StyleDescription
0Solid On.
1Blink at 1 Hz.
2Blink at 4 Hz.
3Blink twice at 4 Hz, off for 1/2 Second, Repeat.
DIO
The I/O function object used to control the LED.
Object Class: oDIO1RW Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Address
Returns a pointer to the address of the oCounter Object instance.
Object Class: oAddress Value Range: 0 - 127
Data Type:Pointer (Read Only) Default Value: Address of Object

Back to top of page Example:

The following examples use the oLEDB Object.
Visual Basic Syntax C and Java Syntax
'This program causes an LED 
'on I/O Line 7 to blink.

Dim A As New oLEDB

Sub Main()
  A.IOLine = 7
  A.Operate = cvTrue
  A.Blink = 1
End Sub 
//This program causes an LED 
//on I/O Line 7 to blink.

oLEDB A = New oLEDB;

Void Main(Void){
  A.IOLine = 7;
  A.Operate = cvTrue;
  A.Blink = 1;
}
Basic Syntax 
'This program causes an LED 
'on I/O Line 7 to blink.

A As oLEDB(7,1,cvOn)
 

Back to top of page Related Items:

 The following table lists objects that use the oLEDB Object.
 ObjectDescriptionA1A2B1B2C1
oButtonReads the position of a switch and controls an LED light.xx
 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oChaser4Controls a series of chasing lights.B2C1
oLEDControls an LED light with brightness control.xxx
oLED2Controls a Dual Color LED light with brightness control.xxx
oLightControls a light.xxx
Back to top of page Version History and Bug List:
 Firmware Ver B2: Introduced.

Bugs: No known bugs.


ooPIC Compiler Ver 6.0 (c) Copyright 1997 - 2007 Savage Innovations, LLC.