Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Emulation, Workbench and Sensor-Object Toolbox — Parallax Forums

Propeller Emulation, Workbench and Sensor-Object Toolbox

DomanikDomanik Posts: 233
edited 2014-10-06 14:13 in General Discussion
It would be helpful to have a software emulation of the Propeller that runs off the binaries created by SimpleIDE. This emulator could be written in C and work interactively with the IDE. It would have debugging tools like trace code, break points, watches/monitoring of values and other tools to aid developers and students. And a virtual PropScope like workbench.

The workbench portion would allow the monitoring of output signals from the emulator with a virtual DVM, ammeter, scope, logic analyzer or even an LED that lights up. The user defined stimulus might be something like a voltage ramp, resistor ramp, push button, voltage pulse sources that have characteristics similar to an encoder (programmable period, width, min max variations of period and width, cycle time from min to max). The sensor and outputs devices could be from a tool box library of widgets that have parameters like pin connection, source impedance, binary pattern or any other characteristic the Propeller would normally recognize.

Not only could the use of these software tools assist in development and debug of applications but as an educational tool to bring young learners up to speed on C (or Spin or PASM) and the integration of virtual component parts with the software. By using a virtual workbench it introduces concepts of test equipment, AC/DC voltages, timing pulses, analog signals like audio and keeps it in a consistent learning environment.

An emulation-workbench could be a low or no cost entry into the Parallax domain. It would enable students to perform homework assignments anywhere they have a computer or laptop without additional hardware. Learning C, electronic hardware, the Propeller micro-computer, and test equipment could take place under one umbrella.

Thoughts anyone…

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2014-10-06 11:09
    This has been suggested before and something similar was done by a 3rd party vendor for the Stamp in the distant past. This was not a commercial success. Parallax has preferred to make real rather than virtual tools available along with good program development tools and tutorials that demonstrate the sorts of things you would like to provide virtually. There have been Propeller emulators freely available for years, both for the hardware instruction set and for the Spin interpretive code and a 3rd party could certainly have put together a "workbench" such as you described.

    What you describe would be a major undertaking to do properly, even if Parallax were philosophically supportive of the idea. It would be expensive to develop and support and would take away significantly from sales of real hardware and from interest in real hardware. Remember that real hardware is messier to use than virtual hardware and that valuable lessons are learned from the differences.

    Have a look at ViewPort from OneRobot and MakerPlot from SelmaWare for examples of desktop / laptop applications that do some of the things you mention.

    An emulator / workbench application like you describe would probably cost several hundred dollars if not heavily subsidized by a company like Parallax. You can buy a Propeller Activity Board for $50 and add some capacitors, resistors, LEDs, and pushbuttons from SparkFun or Parallax or RadioShack for $20-$30 more. ViewPort Lite is $30 and is enough to get started.
  • Heater.Heater. Posts: 21,230
    edited 2014-10-06 11:29
    Domanik,

    A very nice idea. We look forward to seeing what you come up with.

    There is already a Propeller simulator called "gear" http://forums.parallax.com/showthread.php/156347-Improved-GEAR-Emulator. I have never played with it but perhaps it could help you with your idea.

    I see a couple of problems though:

    1) When it comes to learning C the easiest way is just to write C programs. Compile and run them on whatever machine you have. PC or laptop, Windows, Mac or Linux. A very quick edit, compile, run, debug cycle.

    2) When it comes to C on the Propeller or any other MCU there is an infinite amount of external peripherals that can be connected. Such a simulator could not possibly cover them all.

    All in all, given that a Propeller or any other MCU is very cheap why not just connect a real one and get on with it? After all it only takes seconds to edit and rerun your code that way.

    I am not aware of any such simulator in the Arduino world but Arduino users seem to get by just fine.

    And finally, half the point of getting into an MCU like the Propeller is to be involved in real world interfacing. The real world has a strange way to not behave as theory might suggest to you. The education is in finding out what really happens:) That includes burning chips and transistors, dealing with noise issues, and so on.
  • Dave HeinDave Hein Posts: 6,347
    edited 2014-10-06 12:17
    Early on in the PropGCC development eclipse was going to be used as the IDE, and there was some thought of integrating spinsim to it to provide the type of tool you're talking about. spinsim does have some hooks in it to allow it to work with the Gnu debugger, GDB when running LMM code. You can run spinsim in a command-line mode to run binary files. It supports a virtual serial port for console I/O, and it also supports I2C access to a simulated EEPROM. I also have a version that simulates an SPI port that treats a large file as an SD card.

    spinsim also simulates the October 2013 version of the P2. Whenever a new spec for the P2 is available I'll update it to match the new spec.
  • DomanikDomanik Posts: 233
    edited 2014-10-06 13:52
    Mike Green wrote: »
    T
    Have a look at ViewPort from OneRobot and MakerPlot from SelmaWare for examples of desktop / laptop applications that do some of the things you mention.

    Hi Mike,
    You brought up some great points and thanks for the links. I agree with what you're saying, especially that business, in general, must protect its revenue flow. Finding new markets and establishing market barriers makes sense.

    Thanks for the feedback,
    Dom......:smile:
  • DomanikDomanik Posts: 233
    edited 2014-10-06 14:03
    Heater. wrote: »
    We look forward to seeing what you come up with.

    There is already a Propeller simulator called "gear" http://forums.parallax.com/showthread.php/156347-Improved-GEAR-Emulator. I have never played with it but perhaps it could help you with your idea.
    Heater,

    YIKES!!!! I didn't realize I was volunteering.:lol: Where is that little voice saying "Run Dom, Run" coming from????? But I will check out GEAR and ViewPort. My post was to float the idea (which I thought was good) and get feedback from everyone that has more experience than I do so I could find out how terrible it is:innocent:.

    Thanks and much appreciated.
    Dom...
  • Heater.Heater. Posts: 21,230
    edited 2014-10-06 14:13
    Domanik,

    Sorry, yes, I was a bit tongue in cheek there.

    I'm not saying yours not a good idea.

    It's just that ideas are easy. There are so many of them. Backing the right one is another question. Could be a lot of investment of time and money that nobody appreciates.

    And so, the best thing is if the guy with the idea at least tries to make a working prototype. That may well inspire others to build on it.
Sign In or Register to comment.