How fast can you program your propeller?
Dr_Acula
Posts: 5,484
0.1 seconds.
I have just finished some code and I thought of Humanoido, who I know likes to collect benchmarks.
Much of programming is a cycle of Write/Compile/Run/Rewrite/Compile/Run etc
In the olden days when my dad was programming, Compile meant something that might take all night, and even "Load" meant a girl in another room went and got some paper tape and physically loaded it into a machine.
Programming a Propeller to eeprom takes a few seconds. Programming to just ram is faster (I think it can be as short as 0.5 seconds for a tiny program). I've been programming my Propeller in C and Basic and Assembly but all of these involve a file transfer. But I thought I would add MBASIC to my IDE, and instead of downloading a program, 'Type' it into the program each time.
So, assuming that Mbasic is running on the propeller, I have "10 PRINT "Hello World" on a PC screen (see attached) and I click the "Type into Mbasic" button and it sends a "NEW" to erase the previous program, then types in that program at 38k baud, and then types "RUN".
Total time to do all that is just under 0.1 seconds.
Edit the program and do it again and it is still under 0.1 seconds for the program to download and run.
Isn't the Propeller amazing?!
Ok, it does get longer once the program gets longer, but many times I find myself just wanting to test one line of code in a program, particularly when I'm learning a language.
Mbasic is rather unique in that it came as both an interpreted version and a compiler (which is slow - on a propeller the above program takes 3 minutes to compile!). But most of the time one debugged in the interpreter, so the long compilation time was not so important.
Now I am starting to wonder about extending the concept to Spin. I wonder what it would take to have a Spin interpreter? Maybe one even written in Spin. It would need a few things - keyboard, display, some sort of rudimentary text editor, and a storage media (sd card). And it would be slow. But - given each line would be read in and interpreted one at a time, the program could be much bigger than the propeller memory. Maybe this is another way towards Big Spin. I shall ponder this some more...
I have just finished some code and I thought of Humanoido, who I know likes to collect benchmarks.
Much of programming is a cycle of Write/Compile/Run/Rewrite/Compile/Run etc
In the olden days when my dad was programming, Compile meant something that might take all night, and even "Load" meant a girl in another room went and got some paper tape and physically loaded it into a machine.
Programming a Propeller to eeprom takes a few seconds. Programming to just ram is faster (I think it can be as short as 0.5 seconds for a tiny program). I've been programming my Propeller in C and Basic and Assembly but all of these involve a file transfer. But I thought I would add MBASIC to my IDE, and instead of downloading a program, 'Type' it into the program each time.
So, assuming that Mbasic is running on the propeller, I have "10 PRINT "Hello World" on a PC screen (see attached) and I click the "Type into Mbasic" button and it sends a "NEW" to erase the previous program, then types in that program at 38k baud, and then types "RUN".
Total time to do all that is just under 0.1 seconds.
Edit the program and do it again and it is still under 0.1 seconds for the program to download and run.
Isn't the Propeller amazing?!
Ok, it does get longer once the program gets longer, but many times I find myself just wanting to test one line of code in a program, particularly when I'm learning a language.
Mbasic is rather unique in that it came as both an interpreted version and a compiler (which is slow - on a propeller the above program takes 3 minutes to compile!). But most of the time one debugged in the interpreter, so the long compilation time was not so important.
Now I am starting to wonder about extending the concept to Spin. I wonder what it would take to have a Spin interpreter? Maybe one even written in Spin. It would need a few things - keyboard, display, some sort of rudimentary text editor, and a storage media (sd card). And it would be slow. But - given each line would be read in and interpreted one at a time, the program could be much bigger than the propeller memory. Maybe this is another way towards Big Spin. I shall ponder this some more...
Comments
http://www.parallax.com/tabid/832/Default.aspx
Propellent (Library and Executable) v1.2 - (Supports Windows 2K/XP/Vista/7)For software developers to add support of the Propeller chip to their projects and for users needing command-line driven Propeller chip support.
More information about version 1.2
You can also load in a version of Mike Green's FemtoBASIC and type in command lines in BASIC language. I'm sure that begins to execute in a fraction of a second.
At first I was loading programs into EEPROM but then realized it was not necessary during program development and would only wear out the EEPROM sooner. Using RAM loading is very fast by comparison. In fact, I built a test computer with a prop chip and ended up removing the EEPROM because all the data during the test is held in the Propeller chip and no storage is needed.
So you are talking about developing a SPIN interpreter that we can load and then type command lines in SPIN and run SPIN programs, and no support from pc-loading necessary.. like FemtoBASIC only in SPIN.. I like it!
Humanoido
In short, there would be setup for a given program, such as what pins had what signals on them; inputs; outputs and the such. Nothing too fancy to begin with, but enough so a PC program could single step through a spin or PASM file, and give you full access to everything without the hardware.
I know there are things like Fem2Basic that give you nearly everything you need, but they require the hardware. This application would permit the development of logic and other core application requirements when you weren't near a propeller system.
Anyway, just what I have thought about quite a few times.
KK