oDataStrobe Object

Back to top of page Description:
 The oDataStrobe Object is a Processing Object that provides a data-strobe function.

The oDataStrobe Object works much like a bus where data is copied from one place to another, but has the additional function of being able to generate a logic pulse whenever a byte is transferred.  The logic pulse is usually referred to as a Data-Strobe.  The purpose of a Data Strobe is to tell the receiving device that new data is ready to be read.

The oDataStrobe Object can also break an 8-bit value into two 4-bit values an then do individual copies for both where both will be accompanied with a Data-Strobe.

 The following table lists the size and availability of the oDataStrobe Object.
 ObjectSizeDescriptionA1A2B1B2C1
oDataStrobe5 BytesProvides a Data-Strobe in response to a value being written to it.xxxxx
Back to top of page Operation:
 When the Operate property is 1 and a value is written to the oDataStrobe Object, the value will be transferred to the object pointed to by the Output property and then the State property will pulse from 0 to 1 and then back to 0 again.

When the State property pulses, its value will be copied to the object pointed to by the Strobe property.

If the Mode property is set to 1, then the data will be broken down into 2 4-bit nibbles which are sent individually.  Each of the 2 4-bit data transfers are accompanied with a Data-Strobe.

The OnChange property selects an option where the Data Strobe will only be generated only if the new value being written is different than the last value written.

Back to top of page Properties:
 

The following table lists the properties of the oDataStrobe Object:

Property

Description

Value
An 8-bit value that is transferred to the Output object.
Object Class: oByte Value Range: 0 - 255
Data Type: Numeric Default Value: 0
Each time a value is assigned to the Value property, the value is copied to the Output Object and a Data-Strobe is generated.  If mode is set to 1, then the 8-bit value is broken into two 4-bit values and then each 4-bit value is copied to the Output Object with a Data-Strobe generated for each.
Output
A pointer to an object that will be updated with the transferred 8-bit or 4-bit values.
Object Class: oValuePtrO Value Range: 0 - 127
Data Type: Pointer Default Value: Null
Mode
A value that selects if the transferred 8-bit value will be broken up into two 4-bit transfers.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
ModeConstantDescription
0cv8Bit

The Value property will be transferred as a single 8-bit value and a single data-strobe will be generated when the Value property is written to.

1cv4Bit

The Value property will be transferred as two 4-bit values and a data-strobe will be generated for each when the Value property is written to.

State
A value that indicates the current Data-Strobe logic state.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Strobe
A pointer to a oLogic Object that the Data-Strobe logic state will be copied to.
Object Class: oLogicPtrO Value Range: Any oLogic Object
Data Type: Pointer Default Value: Null
InvertS
A value that selects the active logic state of the Data Strobe.
Object Class: oSelect0to1L Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Availability: This property was added if firmware version C.1  In Firmware versions prior to C.1, the Data-Strobe is always a high-going pulse.
NibbleDescription
0

The Data Strobe is a low-going pulse.

1The Data Strobe is a high-going pulse.
OnChange
A value that selects if the Data-Strobe is generated only when the newly written value is different than the previously written value.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OnChangeConstantDescription
0cvFalse

The Value Property is transferred and the data strobe is generated each time the Value property is written to.

1cvTrue

The Value Property is transferred and the data strobe is generated only when the Value property is written to with a value different than the last value written.

Operate
A value that selects if a Data-Strobe is generated or not.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOff

The Output Objects Value property is not updated.

1cvOn

The Output Objects Value property is updated.

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 Examples:
 In the following example, the oDataStrobe Object is used.
Visual Basic SyntaxC and Java Syntax
'This program outputs data 
'to devices that require a
'data strobe such a printer

Dim Ptr As New oDataStrobe
Dim LD As New oDIO8       
Dim DS As New oDIO1       

Sub main()
  LD.IOGroup = 1
  LD.Direction = cvOutput
  DS.IOLine = 5
  DS.Direction = cvOutput
  DS.Clear
  Ptr.Output.Link(LD)
  Ptr.Strobe.Link(DS)
  Ptr.Operate = cvTrue
  Ptr.VString = "Hello"
End Sub
// This program outputs data
// to devices that require a
// data strobe such a printer

oDataStrobe Ptr = New oDataStrobe;
oDIO8 LD = New oDIO8;
oDIO1 DS = New oDIO1;

Void main(Void){
  LD.IOGroup = 1;
  LD.Direction = cvOutput;
  DS.IOLine = 5;
  DS.Direction = cvOutput;
  DS.Clear;
  Ptr.Output.Link(LD);
  Ptr.Strobe.Link(DS);
  Ptr.Operate = cvTrue;
  Ptr.VString = "Hello";
}
Basic Syntax 
'This program outputs data 
'to devices that require a
'data strobe such a printer

Dim Ptr As New oDataStrobe(DS,LD,,,,cvOn)
Dim LD As New oDIO8(1,cvOutput)
Dim DS As New oDIO1(31,cvOutput,cvOff)

Ptr.VString = "Hello"

Back to top of page Related Items:

 The following table lists objects that use the oDataStrobe Object.
 ObjectDescriptionA1A2B1B2C1
oDIO8FProvides an 8-bit digital I/O with flow control.xxx
 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oBus(I,O,C)6 Objects that copy one Object's Value to another Objectxxx
oBusF(I,O,C)6 Objects that copy one Object's Value to another Object with fuzziness.x
Back to top of page Version History and Bug List:
 Firmware Ver A1: Introduced.
Firmware Ver C1: The InvertS property was added.

Bugs: No known bugs.


 

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