Shop OBEX P1 Docs P2 Docs Learn Events
Building a Flight Simulator — Parallax Forums

Building a Flight Simulator

ECSimsECSims Posts: 19
edited 2008-01-07 07:02 in BASIC Stamp
I am familiar wth the BS2 on a previous project, and I am getting ready to start a new one.· Before I dive in deep, I would like some feedback on the basic framework.·· I need a total of 114 inputs.· 34 of the inputs will be dedicated to reading 17 2-bit rotary encoders, while the other 80 inputs will be used to read push-buttons.·

I was sucessful at building a simulator with 2 rotary encoders and 12 push buttons using one 16-input Basic Stamp 2.· My preference is to continue to use the BS2, but I have no experience connecting together mulitiple microcontrollers.·

Is the BS2 capable enough for the new project I am proposing?· If so, how would I connect mutiple BS2s together, and still have only a single USB plug.

Merry Christmas, and thanks for your help!!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-12-26 18:49
    You have to ask yourself, are these events never going to happen at the same time. The stamp is good at polling for a single task but if things come at it too fast it just drops those events it can't process. You might look at the propeller or (Ken close your eyes) another type of processor that handles interrupts.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ECSimsECSims Posts: 19
    edited 2007-12-26 20:01
    I can't imagine any two inputs changing at the same time.·· It is a single pilot simulator, and you would never push two buttons at the same time, or turn two rotary encoders at the same time.·· If it can cycle through all the sensors at about 0.25 seconds pers cycle, then·I would be happy.· Rapid button presses or quick rotation of the encoder would require this 0.25 second sampling rate.· Do you have any experience with using multiple microcontrollers?· Thank you!
  • ECSimsECSims Posts: 19
    edited 2007-12-30 13:40
    I know everyone is really busy during Christmas and New Year, but I would REALLY appreciate a bit more feedback or advice on this subject. It would be MUCH appreciated.
  • Technic-R-CTechnic-R-C Posts: 117
    edited 2007-12-30 16:12
    I agree with Franklin, check out the propeller and find out if it can handle the project that you are going to be working on.
    Techinc-R-C
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-30 17:12
    You can connect several Stamps in a network arrangement. The PBasic manual gives one example and there is a pair of Nuts and Volts columns that illustrates another. Each Stamp has to be programmed individually though. Once your program is downloaded to a Stamp, it doesn't have to remain connected to a PC.

    That said, I also think that a Stamp, even a couple of Stamps may be inadequate for your project, mostly because of the limited memory available for storing the data from the sensors and the limited speed. A Propeller with some I/O expanders would be more than adequate. Cheap input expanders would be something like the 74HC165 which can provide 8 (or several groups of 8) digital inputs using only 3 I/O pins. There are also I2C I/O Expanders like the MAX7318 that provide 16 I/O pins (input by default) and 8 of these can be attached to the same 2 I/O pins (which can be the same as the EEPROM pins on the Propeller). Note that these I2C I/O Expanders can also be used with Stamps (the BS2p/pe/px particularly). The 74HC165 also works well with the Stamps.
  • ECSimsECSims Posts: 19
    edited 2008-01-07 07:02
    HI Mike,

    I will consider those I/O expanders.·· I am assuming this is a way to reduce the number components on the limited real estate I have, and also to keep the cost down.
Sign In or Register to comment.