Propeller Emulation, Workbench and Sensor-Object Toolbox
Domanik
Posts: 233
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…
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
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.
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.
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.
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......
YIKES!!!! I didn't realize I was volunteering. 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.
Thanks and much appreciated.
Dom...
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.