New project - MSFS C++ USB interface


+ Reply to Thread
Results 1 to 40 of 170

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Not bad considering 4 days ago I was "pushing a button".

    Name:  4 days of progress.png
Views: 24542
Size:  11.9 KB

    Robert

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    One possible issue has been bugging me for a few days; my SimVar tests were all done with only a single variable. I wasn't sure if the code I was using could support multiple variables.

    Added the markers and both Kohlsman settings; the ADF frequency still isn't completely converted (gotta play with BCD, never done that), and bumped up my delay to 10ms. I'm still faster than SimVar Watcher under full throttle acceleration.

    Name:  RPM with 10ms delay w USB others.png
Views: 24781
Size:  38.3 KB

    I'd go mow the lawn in celebration, but it rained; I'd need a tractor to cut wet grass. Major relief; go I guess I'm finally getting that beer.

    Robert


    EDIT: Turns out I might be even a tad faster. I forgot something from the original code.

    Name:  Sleep.png
Views: 24835
Size:  56.2 KB
    Last edited by Demon; - 24th May 2023 at 20:38.

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    I spent the day fleshing out the Form with all the variables to be Read from Flight Sim on the left, and all the controls to be sent up from the PIC on the right. I run SimVar Watcher just to be sure I'm still on par on engine RPM reads during full throttle acceleration.

    There's no added logic behind these new fields, it's just typing them in, lining them up in a meaningful manner, and compiling to make sure there's no serious typos. These fields aren't meant to stay visible; I'm gonna hide them once development is finished. I'd rather have them in the background ready to be reactivated if I have problems. The only thing expected to remain visible is that "Connect to Flight Sim" button and textbox.

    Name:  Added most fields to Form.png
Views: 24074
Size:  91.1 KB


    I did get to finish the conversion technique on that darned ADF Frequency earlier today. Check the number displayed at the top on the instrument panel, then compare it to the number stored in Flight Sim on the left. I did BinaryCodedDecimal conversions back in college; that was in late 70ies, never touched that since. LOL

    Name:  ADF frequency.png
Views: 24569
Size:  336.5 KB


    Nothing spectacular, got the bottom subroutine off google, figured out all the BCD32 manipulations after 1 good video on nibbles.

    Name:  Extracting high order nibbles from 4 byte number.png
Views: 52328
Size:  53.8 KB


    I keep thinking the worst is behind me; and then another day starts.

    Robert
    Last edited by Demon; - 26th May 2023 at 03:25.

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Those guys that maintain the Flight Sim SDK docs like to keep us on our toes. There's another error; the Transponder code is stored in Binary-To-Octal16, not in Binary-To-Decimal16; totally not the same thing. Took me a while to figure this one out.

    There's a design flaw in how the let us read COM frequencies; they drop that 3rd digit on the right. I have yet to see a way to "deduce" what it can be. So Plan B it is: I'm not gonna Read the Com frequencies, I'm gonna Tell Flight Sim what they are; case closed.

    Name:  Cannot read Coms.png
Views: 24591
Size:  879.5 KB

    And I'm still only scratching the surface of this project.

    Robert

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    I really enjoy programming, and now even more so cause I hate being a buyer. Looking for an item, getting to field the same questions; comparing prices, it's so tedious. Really happy I know how to use a spreadsheet. And I have to be careful not to give wrong specs, I keep copy-paste of a lot of my replies. I've been doing supplier research for over 2 weeks now, and I'm royally fed up with this part of the project.

    I've been moving "my stuff" from a small room to half my basement; you know, that part of the house that you accumulate garbage over 30 years and 3 kids. Well I've cleaned up nearly 1/2 of my new area; PC and printer is back up and running. I didn't even take the time to paint the cement floor, or finish the gyproc walls; I've spent enough time moving my daughter in, then back out a few days later. :/

    I've got most of my shelves and storage bins set up, but I don't have a soldering workspace up yet and that really bugs me. I'm taking a bit of time to make a special area for the 3D printer, a secondary PC and my pet project; a custom CNC machine to fabricate PCB boards, plastic parts, that sort of thing.

    The cost of PCB boards is just insane now; even tiny ones. I figure I'll cover the cost fabricating my own milling machine with this first model. I don't need anything fancy; just X, Y and Z axis for now. I know I'll want pick-and-place one day, same with an automated tool changer, but those things can wait.

    It's nice to be able to test designs soooooo much faster. It won't be as nice a professional PCBs, but I know it'll work for a fraction of the cost. Darn, even if I go back to chemical etching, it's still cheaper and faster than waiting 1 week for the DigiKey special offer.

    I was getting "good enough" at PCB fabrication too; and this time I have a LOT of space to set myself up properly. Like install my own kitchen vent that evacuates fumes outside, instead of working on the kitchen stove. I can use that for a tiny paintbooth as well. And there's been progress in the DIY PCB fabrication world; guys are now finishing their boards green (that has to be cheaper and less "fumy" than the silver coating I was dipping mine in, some even doing silkscreen.

    Only downside, I had to disassemble my pool table. ;(

    Robert

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,144


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    I am done with the DIY pcb, chemicals and drilling... Enough fumes, dust and stains!

    A CNC machine is nice to have, for various other uses also, among pcb and drilling, but not for me anymore.

    Now I use the dirty cheap and ultra fast JLCPCB for any pcb needs.

    Ioannis

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    I'm gonna check out JLCPCB once I have a circuit ready.

    Right now I'm finishing up buying parts; just need those rocker switches and some graphic overlay for backlit text.

    On the positive side, I'm well on my way repossessing my basement from all that junk I've accumulated.

    Finally got to work on my new workbench debugging why that LED wasn't turning on as it should.

    Robert

    Last edited by Demon; - 22nd July 2023 at 02:44.

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by Ioannis View Post
    I am done with the DIY pcb, chemicals and drilling... Enough fumes, dust and stains!

    A CNC machine is nice to have, for various other uses also, among pcb and drilling, but not for me anymore.

    Now I use the dirty cheap and ultra fast JLCPCB for any pcb needs.

    Ioannis
    I went the chemical way 14 years ago; not doing that again. I had SOIC SMD parts and it worked, but I'm too old to breath fumes.


    This is my 2nd attempt on my mini-CNC. I royally screwed up the mirror operation on the 1st attempt.

    Top:


    Bottom:


    Still need to get fine steel wool to finish the job, dip in silver nitrate, and test text with inkjet printer transfer paper.

    Robert
    Last edited by Demon; - 22nd October 2023 at 00:35.

Similar Threads

  1. USB interface
    By Frozen001 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th December 2011, 19:37
  2. Host for USB interface?
    By Carrasco in forum Off Topic
    Replies: 4
    Last Post: - 3rd August 2007, 23:59
  3. USB Interface using PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd May 2006, 16:04
  4. USB interface from PIC16F877 to PC
    By headshouter in forum USB
    Replies: 0
    Last Post: - 26th February 2006, 04:58
  5. USB project
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th January 2005, 21:59

Members who have read this thread : 11

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts