Page 15 of 74 FirstFirst ... 51112131415161718192565 ... LastLast
Results 141 to 150 of 737
  1. #141
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Hi Stefan,

    Back again. Everything is going great.

    I have started on the xponder.

    My set us uses 4 on-off-on self centering switches for the four digits, one for each digit (push up for up one number and press down for down one number), (hope that makes sense).

    I have a 12 position rotary switch which I use for: Off, SBY, ON, ALT, TEST.

    What do I need to change in Rob's (it's probably your code) code to achieve this.

    Oh, another thing, I have a single LED as an on indicator.

    Appreciate your help once again.

    David

    Here's Rob's code

    Code:
    
    case FS_TRANSPONDERSETTING:
    Expdr = BCD2Int(val);
    FsbusWrite (C_DXPNDR, Expdr);
    break;
    case C_RXPNDRL:
    if (val > 0)
    {
    Expdr += 1000;
    if ((Expdr % 10000) > 7777)
    Expdr -= 8000;
    }
    else
    {
    Expdr += 100;
    if ((Expdr % 1000) > 777)
    Expdr -= 800;
    }
    FsbusWrite(C_DXPNDR, Expdr);
    x = Int2BCD(Expdr);
    FsWrite(FS_TRANSPONDERSETTING, x);
    break;
    case C_RXPNDRR:
    if (val > 0)
    {
    Expdr += 10;
    if ((Expdr % 100) > 77)
    Expdr -= 80;
    }
    else
    {
    Expdr += 1;
    if ((Expdr % 10) > 7)
    Expdr -= 8;
    }
    FsbusWrite(C_DXPNDR, Expdr);
    x = Int2BCD(Expdr);
    FsWrite(FS_TRANSPONDERSETTING, x);
    break;
    case C_SXPNDRIDENT://this would be off?
    break;
    case C_SXPNDRCTRL1://this would be sby?
    break;
    case C_SXPNDRCTRL2://this would be on?
    break;
    case C_SXPNDRCTRL3://this would be alt?
    break;
    case C_SXPNDRCTRL4://this would be test?
    break;
    case C_SXPNDRCTRL5:
    break;
    

  2. #142
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    hi,
    to change Robs code make no sence, you idea is completly different to Robs solution. Robs code have only the up way, not the down direction.
    You have to make your own solution.

    Stefan

  3. #143
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Hi Stefan,

    Thanks for your comments.

    I think I will have to redesign my transponder. I built this a long time ago from someone elses idea.

    I will have to get the old cnc machine out again.

    Am I correct:

    Rob's code is based on 1 rotary encoder
    A 5 position rotary switch (for OFF, STBY, ON, ALT, TEST)
    It is a 5 7-segment display (not 4 like mine is)

    Regards
    David

  4. #144
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    no:
    4 Digits
    a 5 position switch (you can use what you want)
    and 2 Encoder each for two digits, turn left the left digit goes up, turn right the right goes up.

    Stefan

  5. #145
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Thanks Stefan.

    I should be able to use the same encoders that I've used for the Nav1 and use the mode technique you have shown me so that I only have to use one rotary encoder.

    Does that sound right?

    Regards
    David

  6. #146
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Yes that is possible, but dont think that is a useable solution.

    Stefan

  7. #147
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Just come to the realisation that there are no offsets for the OFF, STBY, ON, ALT or test, so it was a pointless exercise.

    I've gone back to basics, I've pulled two of the switches out and converted the holes to fit the rotary encoders, so now I have the same layout as Rob uses ie: 2 rotary encoders, 4 digits and a dummy 5 position switch.

    The code compiles so that's a good sign. I just need to wire it all up to test.

    When I'm done with the coding, I will be giving the uncompiled project to anyone who wants to build a cessna cockpit using FSBus dll. Hope no one minds (I'm sure no one does).

    David

  8. #148
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Stefan,

    Can you check my parts list for the Stepper Board. It is very hard to read off of the documentation:

    1 SMD AtMega168
    1 L293D DIN
    R1 47k
    R2 3k3
    R3 100
    R4 220

    C1 100n
    C2 100p
    C3 can't see this one. Looks like 100n
    C4 22p
    C5 22p
    D1 1N418
    Q1 8MHz
    SMD LED

    Thanks
    David

  9. #149
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    C2 = 100uF
    C3 = 100nF

    2 thinks for information.
    If you need the "motor breaks when idel" the l293D become realy hot, you need a big passiv cooler.
    My Stepper work only in the AdminTool in my C code i nevver had a movement.

    Stefan

  10. #150
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    How are you going to get around this.

    Does that mean you can't get it to work with the C++ coding?

    I need to make 4 of these boards to drive my altitude indicator, 2 for the ADF/RMI and Gyro compass. I don't really have an alternative to drive these.

    Has Rob has success in programming the boards in C++.

Similar Threads

  1. Fsbus CDK
    By flyandre in forum General Builder Questions All Aircraft Types
    Replies: 4
    Last Post: 12-27-2014, 12:58 PM
  2. Need Help Getting My FSBUS NG I/O Going Again..
    By JBRoberts in forum I/O Interfacing Hardware and Software
    Replies: 14
    Last Post: 03-21-2010, 01:38 PM
  3. Fsbus ng io
    By Davral in forum I/O Interfacing Hardware and Software
    Replies: 0
    Last Post: 01-10-2009, 10:38 PM
  4. Fsbus 2.4.3
    By Anderson/SBSP in forum I/O Interfacing Hardware and Software
    Replies: 9
    Last Post: 11-30-2008, 04:25 PM
  5. Help FSBUS
    By cesarfsim in forum I/O Interfacing Hardware and Software
    Replies: 2
    Last Post: 10-26-2008, 02:23 PM

Tags for this Thread