PDA

View Full Version : Some electronics help needed!



Jordan Farmer
11-20-2010, 03:11 AM
Im in a bit of a pickle, and i need some solution to get me out(i dont like branston :p) But seriously now. I have a cessna ARC transponder, which uses an 8 position 'minilever' switch from Digitran. These switches dont have 8 outputs though, instead, the have a common terminal, and then 3 others, marked 1, 2 & 4. Dont ask me where the 3 went :/ haha! This is all very difficult to work out from point of view, until a lot of swearing, beers and time found me the truth table! But i still cant see a way of interfacing this switch with the PC to make it work as a normal transponder.

What i would like ot do is to convert the output of the switches to 8 single outputs, for each 0-7 on the xpdr. Is this possible? And will it have to use some fancy electronics, with PIC's and stuff? Im happy to make it all up, but i don have the first clue on how to program or connect these! So, any help would be appreciated!

Heres the TT:

4488

Many thanks, Hope something can be resolved here!

Jordan

caKus
11-20-2010, 04:24 AM
Hi Jordan,

First, you will need some hardware to connect your switch to you PC. If you don't own any, have a look a Leo Bodnard BU0836X http://www.leobodnar.com/products/BU0836X/
With this unit, just connect each exit of your switch to an entry of the card, and they will be seen by the PC as joystick buttons.

Second, you will need some software. FSUIPC will be perfect to convert the joystick button into offsets understood by MSF (well, you don't say that you are using MFS, it's my supposition). When you are at this point of your project, and if you need some help with FSUIPC, come back on the forum.

Cheers.

Patrick.

Jordan Farmer
11-20-2010, 01:25 PM
Hey ther, umm, i use OC cards with SIOC at the moment. And i have thougth about just wiring in all the outputs directly, but i wouldnt know how to code it to recognise each number individually. As it isnt direct switching with a single output foir every different number, it gets complicated. If it was just a simple switch, i wouldnt need help!

The problem i have is that say i want to select number zero, that makes all of the outputs contact, so C would be connected to 1, 2 & 4 at the same time. Or maybe i want to dial the number 2, i will then have C connected to 1 & 4. This is why im confused. I dont know how to make the PC recognise that as a single number, and all of the others as different. I may not be coming accross very well, but im very tired from work so my vocabulary isnt at its best, sorry :p

Cheers,

Jordan

Perik
11-20-2010, 09:13 PM
Hello Jordan

This seems to me as a SIOC programming job, but I don't have any code examples.
Maybe Nico Kaan or some other SIOC guru could look into it.

But, if you wish to convert your binary coded switch to a "real" 8 position switch
you could make something like this:

4492

Your rotary was not easy to draw so I just made three switches to simulate...
Not tested though it should be quite close maybe even work :-)

jeehell
11-21-2010, 06:01 AM
Hi

In SIOC, this is actually an easy task to convert each of your switches to their numerical values.
What you want at your end is not very clear. Do you really need 8 separate outputs for one switch? do you want to actually convert the switch position to FS XPDR?

JL

aVaTar
01-30-2011, 09:27 PM
That's funny, I was just trying to do exactly the opposite. To conserve inputs I was trying to convert a rotary switch to use binary encoding - and that's not a simple task unfortunately, the inputs just can't be decoupled to form a binary sequence.
If someone knows how, please post?

I did write the code to test out Binary Inputs though, that work perfectly, and that's exactly what you want. Here's the code



Var 0001, Link FSUIPC_INOUT, Offset $05FC, Length 2

Var 0002, Link IOCARD_SW, Input 1, Type P // SIG 1
{
CALL V0004
}

Var 00003, Link IOCARD_SW, Input 2, Type P // SIG 2
{
CALL V0004
}

Var 0004, Link SUBRUTINE
{
IF V0002 = 0
{
IF V0003 = 0
{
V0001 = 0
}
ELSE
{
V0001 = 1
}
}
ELSE
{
IF V0003 = 0
{
V0001 = 2
}
ELSE
{
V0001 = 3
}
}
}


The sig1 and sig2 are high and low bits and they control var0001. You just need one extra input and that's all.