Sign in to follow this  
FS4

Alternate to FSBUS, EPIC etc.

Recommended Posts

Hello everyone and thanks again for all of the previous help.In learning about home cockpit systems, I would like to experiment with very basic hard interface ideas. I would like to start small for my own learning curve, so here goes:In simple terms, what is needed to simply have Flight Sim send the NAV 1 radio frequency to a seven sefment LED display using either the Serial/LPT or even USB port? What software would I need to get or write/how to build the interface etc?... Thank you.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Dave,One approach you can take is to use a PIC interfaced to the serial port. I'm not sure that the word "simply" can be used in this context, but I think this approach offers a wonderful tutorial path.Step 1 is to work with PIC micro controllers. The PIC16F628-20 is a very good choice as it's flash programmable and can be used over and over. It can be programmed with a very inexpensive home made programmer. It incorporates a USART for builtin serial communications. Plus, it only about $3US. (Check out Myke Predko's book)A PIC can drive 7 segment displays with a pair of 74LS374 latches and a few cheap transistors. A very good first program is having a stand alone PIC display "1234".A second step could be hooking up the serial port to your PC. Adding a MAX232 chip will take care of the voltage levels needed to properly drive an RS232 serial connection. A good test program is simply sending a string of "A"s to your PC. Follow this with a program that echos a character sent from the PC.Clearly, to get the PC talking with the PIC you'll need to run a program on the PC. I'd go with Microsoft C++ (or managed C.NET, or whatever they call it today). You can get a "lite" verion of the compiler and IDE with an intro book for somewhere around $100US. There are other versions of C/C++ available and many will argue in their favor. Consider, however, that you will be running a Microsoft compiler under a Microsoft OS ultimately to interface to a Microsoft app (FS). If you're just beginning programming, you will have enough on your hands without chasing down OS/compiler incompatibilities.The serial port is a good choice because it has well documented API calls and is not too complex. The parallel port requires serious digging to get access to and/or you have to use a third party driver. USB is complex. You can buy packaged hardware with a driver, but you won't learn as much.When you have the PIC displaying numbers sent from the PC, all that's left is firing up FSUIPC. Pass it the "offset" for what you want and do a bit of format conversion before sending it to your PIC. The PIC displays your NAV freq and you're laughing!Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites

Mike, you make it sound so easy I'm tempted to down this path! lol :-hahTGIF,

Share this post


Link to post
Share on other sites

After you've done it once, it is easy, Mats. However, that first time can be a handful.Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites

Mike,Thanks for the reply.Can you explain in more detail what is needed to get FSUIPC to send the data to the PIC? Does it require custom software? And if so, do you have any examples??

Share this post


Link to post
Share on other sites

Dave,FSUIPC comes with a "Hello, World" style example program. It's a great way to start, because you know the code itself works. If you have probelms it's somewhere else.Basically, you put FSUIPC in the module folder of MSFS. You write your code (or use the provided example) and link it to a FSUIPC lib file, which is provided in the SDK. Your code makes five types of calls to FSUIPC through the lib. One call opens FSUIPC, another closes the connection. Two are used to queue data reads and writes, respectively. The remaining call causes FSUIPC to execute the queued requests.It's not particularly hard. The only problem I had related to a linking issue that was resolved by recompiling the lib file. Fortunately the source was provided. (thank you, Peter)You tell FSUIPC what data you want by providing "offsets". These are listed in the SDK docs as well.I consider myself a hardware type dabbling in software. If I can make FSUIPC work, anyone can.Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites

Not to stifle your creativity or anything, but may I point out that you can buy hardware that will do what you want for less than what it will cost to build from scratch, if you consider the time it will take to design it, buy the parts, build it, write drivers for it, troubleshoot it, etc. etc. I'm speaking primarily of the GoFlight hardware (I have some of it), although there are some alternatives (that are more $ as far as I know).Why not save your Builder Time to the important stuff, which is/could be customizing that sort of hardware so that it looks realistic for your chosen aircraft, and building the cockpit infrastructure (physically and computer-wise), and sorting out the display particulars (there are several potential solutions), etc.? That stuff in itself can take up a month of Sundays.I appreciate folks' ambition to build it all from scratch, but just as in designing aircraft - why do what's already been done? Try to innovate in some other way.Perhaps my diatribe is based on the fact that I'm kinda lazy 8^) . But when you can buy a fully functional USB device that can perform COM/NAV/etc. functions for a hundred dollars, I just have to point out that your personal time might be better spent, and thus hopefully give you more time to FLY the dang thing.Dave Blevins

Share this post


Link to post
Share on other sites

I've started a matrix/table/spreadsheet (somewhat) comparing the different home cockpit electronics solutions. Currently focuses on solutions that allow you to hook up your own stuff. I could possibly expand it to ready-to-run solutions like Go-Flight.See: http://cockpit.varxec.de/electronics/cockp...lectronics.htmlContributions are appreciated. There are lots of empty boxes to be filled.Regards,Manuel

Share this post


Link to post
Share on other sites

Don't you know Dave ?Power is to the people who KNOW ! :(And in order to know proprely you need to go down that path.I did something like this.You had some italian dudes which had a module to hook up 120 keys/buttons to an LPT port. Fun I thought right till the part where I found that it was payware.I was interested though not willing to pay for this AND the PM-like software it came with, which I didn't need at all. Even if it wasn't that expencive at all.So what I did .. figure out how the LPT port works. Figure out how to have a .Net program read/write to it. Figure out how to make a .Net program simulate key presses and off I went. Ok there are no PICs involved which made it a lot easyer. However the module from those italians was without any diode and still I am VERY curious if their software managed to work right without those ...Now the result is:The italians found that no one bought their product. If my version being freeware had anything to do with it ... i doubt. So the italians took their site & product offline.My thing now is not super popular. Though there are some people who use it succesfully. It is super cheap and the soft is free. So some use it for a desktop module and others for an FMS. I don't use it myself but am quite happy that I did this. Cuz of the people who DO use it and simply cuz I know I did this and the things I learned from this.It took me quite some time indeed though very little money but I'm happy now :(Even now I'm working on the same thing as PM is doing. We both try to reproduce a cockpit system (overhead) in an external program linked to FSUIPC and which receives key commands instead of FS.Is it now pointless to continue (cuz i didn't know PM was doing the same when I started) cuz I know PM is doing this ? No. Why ? Cuz:1: my stuff will be freeware again (ain't no one happy with freeware those days ??? :( I think they are !)2: cuz I learn from this. I now know how to make a .Net program capture key input even while in background and I can interact with FS via FSUIPC from my own program.Maybe all this knowledge will bring me somewhere someday where no one has ever gone before and no one has ever thought of going before. That's how you become pioneer my friend ;)Nuf said.

Share this post


Link to post
Share on other sites

How ever many people are doing "something", there's always a reason for someone else to do similar. I, for example, don't see much differnce between the PM cockpits, the FreeFD cockpits, and the OpenGC cockpits, but there must be significant ones, or PM wouldn't be able to sell their product with two freeware equivalents on the market. There are also differences in what people want to use it for. My FSPanel and FSEicas aren't as pretty as PM / FreeFD products, but I wrote them anyway because I wanted to be able to use computers that couldn't handle the OpenGL needed for PM etc. There must be interest, as almost three hundred others have downloaded them too.Phillipes LPT switch also seemed to be usefull to me, but then I saw it was written on .NET, so maybe I'll try and do something similar without using .NET - again, to let me (or others) use it without needing state of the art hardware.

Share this post


Link to post
Share on other sites

Please do ! :)LPT switch is open source for a while now so you can check my code an try to do something similar (BETTER) in another prog language.If you could make a lighter version (meaning same options but much lighter on pc and which doesn't need .Net framework) ... would be great.Maybe we could work together .. Cuz I may want glass cockpit windows to go with my overhead system for the b717 cockpit I might build one day.The plan I had was to wait untill Dirk from FSbus manages to get something in his program which allows for other programs IO to his software than FS. This would mean a triangular relation. FS, FSbus and some other program. This would give us then full control to either FS token vars AND leds, led displays etc etc in the cockpit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this