oFeedBack8 Object

Back to top of page Description:
 The oFeedBack8 Object is an I/O Function Object that reads an 8 x 8 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 oFeedBack8 Object.
 ObjectSizeDescriptionA1A2B1B2C1
oFeedBack86 BytesReads an 8 x 8 matrix feedback loop.xx
Back to top of page Operation:
 

The oFeedBack8 Object uses up to 16 I/O lines to form an 8 by 8 feedback matrix.  The set of I/O lines in group 1 are are used to send signals and the I/O lines in either group 1 or 3 are used to detect the feedback. 

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

Both the signal lines and the receiver lines have a mask that allows specific I/O lines within the groups to be selected for use.  This option allows the feedback matrix to be any combination up to 8 by 8.  As an example, if only 5 I/O lines are selected for signals and 4 bits are selected for receivers, then the resulting scan pattern would scan a 5 by 4 matrix which would contain 20 possible feedback paths.

The signal lines always use the I/O Lines in I/O Group 1 while the feedback lines may use either I/O Group 1 or 3.  If the feedback lines are directed to use I/O Group 1, then the masks for both the signal and the feedback lines must be set in such a way that they will not conflict.

When the Operate property is set to 1 the internal pull-up resistors on I/O lines 8 - 15 are activated and the matrix is scanned for feedback.  If any outgoing signal is detected on the feedback lines, the Result property is updated with the value that indicates the signal and receiver where the feedback was detected and the Any property is set to 1.

The value of the Result property is calculated by (((signal - 1) * 8) + (feedback-1)).  If two return signals are detected simultaneously the highest valued row and column 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 switch 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 oFeedBack8 Object:

Property

Description

Result
A value that indicates the path where feedback was detected.
Object Class: oByte Value Range: 0 - 255
Data Type: Numeric (Read-Only) Default Value: 0
Result = (((signal - 1) * 8) + (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.
IOGroupC
I/O Group 1 used to read the feedback sensors.
Object Class: oIOGroup Value Range: 1
Data Type: Numeric (Read-Only) Default Value: 1
ColMask
A value that specifies which I/O lines from I/O Group 1 to use for the feedback sensors.
Object Class: oVar8 Value Range: 0 - 255
Data Type: Numeric Default Value: 0
For each bit set in the mask, the corresponding bit of the group will be used.
IOGroupR
I/O Group used to drive the feedback outputs.
Object Class: oIOGroup Value Range: 0 - 3
Data Type: Numeric Default Value: 3
IOGroupRDescription
0Group 1 is used.
1
2Group 3 is used.
3
RowMask
A value that specifies which I/O lines from I/O Group 3 to use for the feedback drivers.
Object Class: oVar8 Value Range: 0 - 255
Data Type: Numeric Default Value: 0
For each bit set in the mask, the corresponding bit of the group will be used.
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 oFeedBack8 Object is used to set the value of a oByte Object to the number of the pressed switch.
' This program reads an oFeedBack8 Object
' set up to read a 4x4 keypad using 
' the 8 I/O Lines in I/O Group 1 and 
' outputs the value to I/O Group 3.

Dim A As New oFeedBack8
Dim C As New oDio8

Sub Main() 
  ooPIC.Node = 5
  A.RowMask = &B11110000
  A.ColMask = &B00001111
  A.Operate = 1 
  A.IOGroupC = 1
  C.IOGroup = 3
  C.Direction = cvOutput
  Do
    B.Value = A.Value
  Loop
End Sub
'This program reads a 3x5 keypad from Radio 
'Shack using the 8 I/O Lines in I/O Group 1
'and outputs the value to I/O lines 24- 31.

Dim A As New oFeedBack8
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.RowMask = &B11010011
  A.ColMask = &B00101100
  A.IOGroupC = 1
  A.Operate = 1
  Do
    C = A.Value
    D = A.Received
  Loop
end sub
Back to top of pageConnections:
See the oKeypad2 Object for connections.

Back to top of page Related Items:

 The following table lists objects that use the oFeedBack8 Object.
 ObjectDescriptionA1A2B1B2C1
oKeypad2Reads a Keypad matrix of up to 8 x 8.xx
 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oFeedBack2Reads a 2 x 1 matrix feedback loop.xx
oFeedBack4Reads a 4 x 4 matrix feedback loop.xxxxx
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.