oFeedBack4 Object

Main Index
Object List
Back to top of page Description:
 

The oFeedBack4 Object is an I/O Function Object that reads a 4 x 4 matrix feedback loop.   If feedback is detected on any one of the 16 possible paths, the signal and receiver of the path is reported.

 The following table lists the size and availability of the oFeedBack4 Object.
 ObjectSizeDescriptionA1A2B1B2C1
oFeedBack44 BytesReads a 4 x 4 matrix feedback loop.xxxxx
Back to top of page Operation:
 

An oFeedBack4 Object splits I/O Group 1 (I/O lines 8 - 15) into 2 sets of 4 I/O lines and uses them to form a 4 by 4 feedback matrix.  The least significant 4 I/O Lines are used to send signals and the most significant 4 I/O Lines are used to detect the feedback.

The 4 signal lines are individually and sequentially set low (0-Volts) while the 4 feedback lines are used to detect any feedback from those signals.  Feedback is detected when any one of the 4 feedback lines detects the signal being sent out by the signal lines.  The oFeedBack4 Object handles all the required I/O logic. The 4 x 4 matrix requires no isolation diodes or pull up resistors for operation.

When the Operate property is set to 1 the internal pull-up resistors on I/O lines 8 - 15 are activated and the 4 x 4 feedback matrix is scanned.  If any outgoing signal is detected on the feedback lines, the Result property is updated with a value and the "Any" property is set to 1.

The value of the Result property is calculated by (((signal - 1) * 4) + (feedback-1)).  If feedback is detected on two lines simultaneously the result with the highest value will be used.  The "Any" property will remain at 1 so long as at least 1 feedback is detected. If a second feedback is detected before the first is lost, then the Result and "Any" property will remain unchanged from the values set at the time of the first feedback. Once all feedback is lost, the "Any" property is be cleared to 0.

When the Operate property is set to 0 the feedback matrix scanning is suspended until the Operate property is set back to 1.

Back to top of page Properties:
 

The following table lists the properties of the oFeedBack4 Object:

Property

Description

Result
A value that indicates the path where feedback was detected.
Object Class: oByte Value Range: 0 - 15
Data Type: Numeric (Read-Only) Default Value: 0
The Result is calculated as (((signal - 1) * 4) + (feedback-1))
Any
A value that indicates that feedback was detected on any one or more feedback path.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
AnyDescription
0None of the feedback paths are returning signals.
1Any one or more feedback path is returning a signal.
IOGroup
I/O Group 1 used to read and drive the feedback loops.
Object Class: oIOGroup Value Range: 1
Data Type: Numeric (Read-Only) Default Value: 1
Operate
A value that selects whether or not the feed back loops are being tested.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOff

The feedback feed back loops are not being tested.

1cvOn

The feedback feed back loops are being tested.

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 oFeedBack4 Object is used.
Visual Basic SyntaxC and Java Syntax
'This program reads a 4x4 matrix and
'outputs the value to I/O lines 8 - 15.

Dim A As New oFeedBack4
Dim D As New oDIO1
Dim C As New oDIO8

Sub Main()
  C.IOGroup = 3
  C.Direction = cvOutput
  D.IOLine = 7
  D.Direction = cvOutput
  A.Operate = 1
  Do
    C = A.Value
    D = A.Any
  Loop
End Sub
// This program reads a 4x4 matrix and
// outputs the value to I/O lines 8 - 15.

oFeedBack4 A = New oFeedBack4;
oDIO1 D = New oDIO1;
oDIO8 C = New oDIO8;

Void Main(Void){
  C.IOGroup = 3;
  C.Direction = cvOutput;
  D.IOLine = 7;
  D.Direction = cvOutput;
  A.Operate = 1;
  Do{
    C = A.Value;
    D = A.Any;
  } While (1);
}
Basic Syntax 
'This program reads a 4x4 matrix and
'outputs the value to I/O lines 8 - 15.

A As oFeedBack4(cvOn)
D As oDIO1(7,cvOutput)
C As oDIO8(3,cvOutput)

Do
  C = A.Value
  D = A.Any
Loop
 
Back to top of pageConnections:
 See the oKeypad or oKeypadP Object for connections.

Back to top of page Related Items:

 The following table lists objects that use the oFeedBack4 Object.
 ObjectDescriptionA1A2B1B2C1
oKeypadReads a 4 x 4 Keypad matrix.xxxxx
oKeypadPReads a Telephone Keypad.xxxxx
 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oFeedBack1TMeasures the time interval between a signal sent on one I/O line and returned on a second I/O line.xxx
oFeedBack2Reads a 2 x 1 matrix feedback loop.xx
oFeedBack8Reads an 8 x 8 matrix feedback loop.xx
Back to top of page Version History and Bug List:
 Firmware Ver A1: Introduced.

Bugs: No known bugs.


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