I haven't populated the board yet but I'm imagining it will have it's challenges. I'll let you know how it goes.
Printable View
I haven't populated the board yet but I'm imagining it will have it's challenges. I'll let you know how it goes.
if i ever do one i was thinking about getting one of thoughs things that makes it go from small to the normal size so it would be easy to solder it.
Trevor,
What little device do you mean?
If it makes it easier to solder, I'm in.
----
Is there any other alternative for my stepper driven gauges that anyone else has used?
Like these... http://www.futurlec.com/SockPLCC.shtml
OR these http://www.futurlec.com/PLCC_Adapters.shtml
The IO picture shows that the BTP_A_IN is 00-07 but there 72-79 like David said! Would be nice to get this picture fixed for others lol i spent awhile trying to get my throttle going and it wouldnt work didnt know if it was the code or what so i started looking in here and it was the CID that was wrong. I was putting in 7 and it wouldnt work so i tried 79 and it works. O and not sure if i ever told you guys butmy name is Trevor LOL
Thanks,
Trevor
Hey Trevor,
Yes, I picked your name up a while ago on another thread.
The RID's here had me stumped for a while too.
Thanks for the links. Looking at the sockets, wouldn't they be just as difficult to solder in (not the through board ones)?
The board would have to be modified to suit the through board configuration. I did have a quick look at the possibility of redesigning the board with the standard ATmega168 with the DIP 'through board' configuration. May still have a go at it yet.
David
when able i try to make my own PCBs and that way i can make them how i want them to be. So yeah you might be able to take the lay out of it and change it up some. Just seems like it wouldnt be as hard to solder it if the holes are farther away from each other. Just looking at the Controller just seems like the holes are really close to each other and would be harder to solder vs the sockets i showed you.
Just an idea,
Trevor
Hi guys,
that is my Stepper testboard. I dislike SMD on PCB´s, they i don´t know.
That is the reason, why i build that.
http://lh3.ggpht.com/_B8czH7apyHE/S9...0/P1030147.JPG
http://lh6.ggpht.com/_B8czH7apyHE/S9...0/P1030149.JPG
Stefan
O so the ATMEGA168 is two shapes not just one. Never mind yeah this shouldnt be that hard to do. in fact it should be the easiest PCB to do. So is that the ATMEGA168-20PU instead of the ATMEGA168-20AU?
Yes the ATMEGA168-20PU is easy to use.
But attention, you have to rework the pinning from the controller. You need the function of the pin not the number.
Yeah that would make since just to make sure the wires are going to the right pin. And how do you know what kind of stepper motor to get?
Trevor
Do you Stefan or David have skype?
You get a PM.
My wife does, but I can join, no problems.
I'll PM when I'm done.
David
I think i found both of your User names for sype and i already added both of you
Trevor
Hi Trevor,
Just sent you and Stefan a PM.
David
My C++ i can only use with FS2004 right now. for what ever reason im not able to use it with FSX. Would you guys be willing to post your code of your main CPP so i can compare it with mine. And also can i have one C++ exe and use it for both FS2004 and FSX? I mostly use FS2004 but also would like to use my stuff with FSX for when i do Multiplayer Pilot/Copilot. Here is the code im using right now, what do i need to change so i can use it with both?
Code:#include "stdafx.h"
#include "rvdb737ng.h"
/* ------------ global variables ------------- */
extern BOOL bSynchronised = false; // cockpit not in sync with FS
/* ========================== */
/* M A I N L I N E */
/* ========================== */
int _tmain(int argc, _TCHAR* argv[])
{
int KeyboardInput = -1; // Input from keyboard
short PauseState; // FS in Pause state (if 1)
int V = GetFsbusDLLVersion();
printf("Detected Fsbus version %d.%d.%d\n",
V/100, (V%100)/10, V%10);
if (V < 200)
{
printf ("Program requires Fsbus DLL version 2.0.0 or higher\n");
return 1;
}
// signal(SIGINT, SIG_IGN); // Ignore Ctrl-Break
// signal(SIGBREAK, SIG_IGN); // and Ctrl-C
OpenLog(); // start log function
CheckIn(); // Connect to FSbus.dll
FsbusOpen("Com1"); // start communications with Fsbus
GlareshieldBuildObjects(); // )
MainpanelBuildObjects(); // )
AftoverheadBuildObjects(); // )
FwdoverheadBuildObjects(); // ) Create objects by group
PedestalBuildObjects(); // )
SoundBuildObjects(); // )
ThrottlequadrantBuildObjects(); // )
FsConnect(); // start communications with FS
WriteLog(0,0,0);
FsbusWriteFmt2(0,128,0); // Fsbus reset
WriteLog(0,0,0);
FsbusMux(3000); // time to process Fsbus events
WriteLog(0,0,0);
GlareshieldSync(); // )
MainpanelSync(); // )
AftoverheadSync(); // )
FwdoverheadSync(); // ) Sync cockpit with FS
PedestalSync(); // )
ThrottlequadrantSync(); // )
bSynchronised = true; // we are in sync now
printf("Hit Escape key to terminate Fsbus program....\n");
FsReadDirect(0x0264, 2, &PauseState); // get FS pause-state
if (PauseState == 1) // paused
{
PauseState = 0;
FsWriteDirect(0x0262, 2, &PauseState); // un-pause
}
/* - - - - wait for Escape (termination) by user - - - - */
while (KeyboardInput != VK_ESCAPE) // not 'Esc' key
KeyboardInput = ReadKeyboard(1000); // check keyboard
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
CloseLog(); // stop logging
CheckOut(); // disconnect FSbus.dll
// signal(SIGBREAK, SIG_DFL); // Restore Ctrl-C default
// signal(SIGINT, SIG_DFL); // and Ctrl-Break default
return 0; // terminate program
}
// -------------------------------------------------------------- */
// Function called by fsbus.dll with every event. */
// Can also be called by other modules of this project */
// for example with synchronisation of cockpit with FS. */
// -------------------------------------------------------------- */
extern void EventHandler(int oid, int val, double dval)
{
WriteLog(oid, val, dval); // log event
switch (oid / OBJECTS_PER_GROUP) // select group
{
case GROUP_MAINPANEL:
MainpanelEventHandler(oid, val, dval);
break;
case GROUP_GLARESHIELD:
GlareshieldEventHandler(oid, val, dval);
break;
case GROUP_AFTOVERHEAD:
AftoverheadEventHandler(oid, val, dval);
break;
case GROUP_FWDOVERHEAD:
FwdoverheadEventHandler(oid, val, dval);
break;
case GROUP_PEDESTAL:
PedestalEventHandler(oid, val, dval);
break;
case GROUP_SOUND:
SoundEventHandler(oid, val, dval);
break;
case GROUP_THROTTLEQUADRANT:
ThrottlequadrantEventHandler(oid, val, dval);
break;
default:
printf("%cError: Object %d (%d:%d) in unknown group.\n",
7, oid, oid / OBJECTS_PER_GROUP, oid % OBJECTS_PER_GROUP);
}
}
Hey Trevor,
Good to have a chat the other night. I'm more than happy to post any of my code, but as requested, here is my main .cpp file.
Speak soon,
David
Code:// Davids Flight sim.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
extern BOOL bSynchronised = false;
int _tmain(int argc, _TCHAR* argv[])
{
int v = GetFsbusDLLVersion ();
if (v < 100)
{
printf ("Program requires Fsbus DLL version 1.0.0 or higher\r\n");
return 1;
}
CheckIn();
FsConnect();
FsbusOpen("COM1");
cbLLSwitchboardBuildObjects();
cbMagnetoBuildObjects();
//cbEngineBuildObjects();
cbEnginerpmBuildObjects();
cbGaugesBuildObjects();
cbSwitchesBuildObjects();
cbVoltmetersBuildObjects();
cbNavBuildObjects();
cbIndicatorlightsBuildObjects();
//cbMcpBuildObjects();
cbModecontrolpanelBuildObjects();
FsbusWriteFmt2(9,128,0); // Fsbus reset CID 9
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(10,128,0); // Fsbus reset CID 10
FsbusMux(350);
FsbusWriteFmt2(11,128,0); // Fsbus reset CID 11
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(12,128,0); // Fsbus reset CID 12
FsbusMux(350);
FsbusWriteFmt2(13,128,0); // Fsbus reset CID 13
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(14,128,0); // Fsbus reset CID 14
FsbusMux(350);
FsbusWriteFmt2(15,128,0); // Fsbus reset CID 15
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(16,128,0); // Fsbus reset CID 16
FsbusMux(350);
FsbusWriteFmt2(17,128,0); // Fsbus reset CID 17
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(18,128,0); // Fsbus reset CID 18
FsbusMux(350);
FsbusWriteFmt2(19,128,0); // Fsbus reset CID 19
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(20,128,0); // Fsbus reset CID 20
FsbusMux(350);
FsbusWriteFmt2(21,128,0); // Fsbus reset CID 21
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(22,128,0); // Fsbus reset CID 22
FsbusMux(350);
FsbusWriteFmt2(23,128,0); // Fsbus reset CID 23
FsbusMux(350); // time to process Fsbus events
FsbusWriteFmt2(24,128,0); // Fsbus reset CID 24
FsbusMux(350);
bSynchronised = true;
printf ("press any key to exit ...\r\n");
while (!_kbhit())
FsbusMux(500);
CheckOut();
return 0;
}
FSbus only know FSUIPC.
There is no differance between FS9 or FSX.
Hi Stefan,
This is what I thought too, so thanks for the confirmation.
David
Stefan or Trevor,
Do you guys want to take a look at this layout and tell me if I'm even close. Since I can't attach the .lay file here, I'll put a link to download it to have a look.
I'm open to any suggestions or even if you want to play around with what I have to make it better.
http://www.safeweightloss4kids.com/d...rDIPedited.LAY
David
Hi David,
that look´s like my hand made board, with some good improvments.
Stefan
Hi Stefan,
I used the pictures you posted as a rough guide on the best place to put the components, so I guess it does look like your board.
If you have had a chance to look over it, can you see anything I have connected incorrectly or have missed. (edit: found a couple of mistakes already so have changed these and uploaded the new file at the link on the previous post)
Thanks
David
Oh, have you started any programming for your board yet, and if so, can you give me a bit of an idea how to do it ie: zero point, do I use calibrate function or a code sample would be better still. Thanks
K so i have ver 4.5.2.0 of FSUIPC installed for FSX but yet FSBUS doesnt work for me for FSX... Could there be another reason on why it wont work?
And that Stepper lay LOOKS GREAT! Way better then any thing i have made on it, Good job. And is the updated file the one on post #341 ?
Trevor
Hi Trevor,
Yes, I've just overwritten the old one on the server.
Hmm, I have no idea why FS9 and FSX are not interchangable with FSBus. I've used both with FSBus (Classic with FS9 but NG only with FSX).
Perhaps you could drop Dirk an email and ask him. I won't post his email here, just go to his site and send an email throught there, but make the subject something that he'll notice. I'm sure he gets lots of junk mail.
David
I talked to Stefan last night via Skype and he was able to fix my problem and now it works with both. Guess my ver of FSUIPC was to old and when i got the newest ver it worked just fine. Then we talked about some of my other problems in C++ and lol most of it was a fix like o well that should say "com2 not com1" lol. So yeah David you should try to talk to Stefan Via Skype. And your right he knows his stuff.
I was looking at your lay last night and noticed that R1-3 are close to each other are they SMDs? Also there are some lines that go under them 2 times when it could be cleaner and be one line. Is that made like that for a reason? Also i noticed that the 20PU has 5 pins not being used and the other one has 6 pins. Should there be 6 pins on that one as well not being used? Theres my 2 cents for now lol
Trevor
Working on my Announcer panel i have noticed that the Oil Press light will come on at around 60 PSI on the B350 but on the 737-800 it turns on at around 13 PSI. So there for if i set the Oil Press light to come on for the B350 at 60 PSI on the 737-800 they will always stay on. is there a way to make this some kind of and/if so that it will work for more then one aircraft? Or do you have to pick ONE aircraft and base every thing around that.
Trevor
Trevor,
I have found that you have to make a seperate .exe file for any variations. For example, my flight sim has all the analogue gauges for the cessna plus it has the 777 overhead and MCP. I can use the 777 MCP for the cessna and some of the switches in the overhead for lights etc but most of the other functions are not relevant. Then there is the ASI which requires different Calibrate arrays for it to be accurate. It is possible, but you won't have 100% accuracy for all craft.
David
yeah thats kinds what i was thinking of doing to fix it. Was thinking about making one for the King Air 350 and then another one for the 737-800. Also are the R1-3 on your lay for the stepper SMDs?
Thanks,
Trevor
No SMD's at all. Don't like working with them. My hands arn't that steady for that level of fine work (thank god I'm not a brain surgeon huh!)
David
So would the hols on R1-3 be to close to each other then? also why does 1 line break into 2 lines and run under them and then back to 1 line then back to 2 line then back to 1? Why not keep it at 1 line?
Trevor
Hi Trevor,
It's that Auto-route function. It's all the same trace, it just did something weird when I used the auto-route. I figured, it's not doing any harm so don't mess with it.
If you can get it to drop all the secondary lines, go for it. Just share the final product.
Ah, the resistors. You could mount them vertically. It's just the size of the resistor I chose from the macro library and it's not until you print it that you see how big it is (if you know what I mean). Than can be changed too if you wish.
David
that was a fast reply to bad your not on skype
Just checked the thread before I settled down the watch the MotoGP. Can't get caught up talking Flight Sim when there's motorbike racing on. lol
David
i know that
But can i do something where you have 2 things like a x and y? for example can you doCode:If (x == 10)
DoSomething(x);
Was thinking about putting 2 values from FS for example batt switch and Gen switch when there both turned off then a light would turn on, on the Announcer. Or something like that. I made a Low Voltage light but not sure on what offsets to send to it. Was thinking of maybe 1 or 2 not sure.Code:If (x == 10 and y == 10)
DoSomething(x);
O and P.S. THANKS alot guys..... now im kinda getting into the mood of make some gauges with Stepper Motors lol
Trevor
look to that site.
C++ operators
You should be able to assign diffent values dependent on a switch position. ie: if switch is in up position = 0, or is switch is in down position =1
if x=0
then... the value for one aircraft;
if x=1
then.... the value for the other aircraft
Don't know how to code it but I would think it's possible.
Stefan should be able to put this into the right context.
David
PS Just a quick break between the Moto2 and the MotoGP races.
Well im on Skype if any of you wana hang out and chat
Trevor
So can i do
What im wanting to do is add up both tanks and when the get to lass then say 13% total the low fuel light will come on.Code:case FS_L_LOW_FUEL:
FsReadDirect(0x0B7C, 4, &L_LOW_FUEL_MAIN);
FsReadDirect(0x0B84, 4, &L_LOW_FUEL_AUX);
if (L_LOW_FUEL_MAIN + L_LOW_FUEL_AUX >1069672)
FsbusWrite (C_L_LOW_FUEL, 0);
if (L_LOW_FUEL_MAIN + L_LOW_FUEL_AUX <1069670)
FsbusWrite (C_L_LOW_FUEL, 1);
break;
Trevor
fixed it
Trevor