PDA

View Full Version : 8/8/8 Doubling Digital Inputs to 16?



fokker70
11-20-2004, 10:33 PM
I saw a post on this site where someone needed 64 inputs and instead of buying 8 boards, it was suggested to buy two and matrix them into an 8x8 grid, giving 64 inputs.

Is it possible to double the number of digital inputs on the 8/8/8 by spliting the 8 digital inputs in half and making a 4x4 matrixed input, similar to the above example?

If so, can someone point me to a schematic and sample code?

Thanks.

phidgets
11-20-2004, 10:46 PM
Hi,

We had discussed matrix lay out's in theory, but discovered that creating a grid of switches won't work because it fires ghost switches.

It's hard to exlpain without a picture, which I don't have, but turning on two switches that have their wires crossing at another point in the grid will make the program think that a 3rd switch has been turned on.

Bottom line, a matrix can't be done. It's a fundamental hardware issue with trying to build switch matrixes, not a Phidgets or software issue. Right now the only option is for users to wire directly to inputs 1X1. Most users favor the 0/16/16 IFK for this purpose.

Matt

fokker70
11-20-2004, 10:59 PM
Thanks for the quck response Matt.

Kind of getting off the topic of this post, I have a few technical questions about the 8/8/8...

1) What is the A/D resolution on the A/D inputs, 10 bit?

2) Are the Digital inputs debounced in any way in hardware or software before the data is available to IFKit_OnInputChange? I'm trying to use a pushbutton switch to toggle a function in FS2004. It's a little flakey. When I press the button the state does not always change. I think its because of debounce or sample rate.... Thanks.


Here is the code I'm wrote.

Private Sub IFKit_OnInputChange(ByVal Index As Long, ByVal NewState As Boolean)

Dim altLock As Integer
Dim tempaltLock As Integer

If Index = 0 Then
'read FS status of ALT button
Call FSUIPC_Read(&H7D0, 4, VarPtr(altLock), dwResult)
Call FSUIPC_Process(dwResult)

lblFsAltLock.Caption = altLock

If altLock = 0 Then
tempaltLock = 1
Call FSUIPC_Write(&H7D0, 4, VarPtr(tempaltLock), dwResult)
Call FSUIPC_Process(dwResult)
Else
tempaltLock = 0
Call FSUIPC_Write(&H7D0, 4, VarPtr(tempaltLock), dwResult)
Call FSUIPC_Process(dwResult)
End If

If NewState Then 'This means: if NewState = 1 then...
lblInputDigital.Caption = "On"
Else
lblInputDigital.Caption = "Off"
End If
End If 'end index =0

End Sub

phidgets
11-20-2004, 11:35 PM
>>1) What is the A/D resolution on the A/D inputs, 10 bit?

Yes, that is correct.

>>>2) Are the Digital inputs debounced in any way in hardware or software before the data is available to IFKit_OnInputChange?

No. All debouncing is up to the users. I very rarely hear of a debouncing problem though.

You can add debouncing into your program by using a timer and a boolean. See if that helps. Also, try out different switches and buttons to see if you can isolate it to a funky switch.

Another thing to check is if your PC is bogged down. Is something going on which would cause the program to miss/drop events?

Good luck!

Matt