Results 141 to 150 of 737
Thread: Progamming help with FSBus dll
-
07-10-2009, 07:05 PM #141
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;
-
07-11-2009, 01:25 AM #142
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
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
-
07-11-2009, 01:45 AM #143
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
-
07-11-2009, 01:56 AM #144
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
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
-
07-11-2009, 08:32 PM #145
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
-
07-12-2009, 01:39 AM #146
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
Yes that is possible, but dont think that is a useable solution.
Stefan
-
07-12-2009, 09:15 AM #147
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
-
07-14-2009, 02:44 AM #148
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
-
07-14-2009, 02:56 AM #149
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
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
-
07-14-2009, 03:17 AM #150
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
-
Fsbus CDK
By flyandre in forum General Builder Questions All Aircraft TypesReplies: 4Last Post: 12-27-2014, 12:58 PM -
Need Help Getting My FSBUS NG I/O Going Again..
By JBRoberts in forum I/O Interfacing Hardware and SoftwareReplies: 14Last Post: 03-21-2010, 01:38 PM -
Fsbus ng io
By Davral in forum I/O Interfacing Hardware and SoftwareReplies: 0Last Post: 01-10-2009, 10:38 PM -
Fsbus 2.4.3
By Anderson/SBSP in forum I/O Interfacing Hardware and SoftwareReplies: 9Last Post: 11-30-2008, 04:25 PM -
Help FSBUS
By cesarfsim in forum I/O Interfacing Hardware and SoftwareReplies: 2Last Post: 10-26-2008, 02:23 PM
Find Sexy Womans from your town for night
Route not displayed after ND and...