SXB to Spin
mnemonics
Posts: 23
I am new to spin and I am having a hard time with it. What are my options to getting a SXB code translated to spin. Can prop basic do it . I don't see a section on here for prop basic. Thanks..
Comments
The good news for you is you have choices. And if C is your fancy, you can go that route, too.
If I may, I think that line of thinking is flawed and can say so with some authority. Twenty years ago I started with the BASIC Stamp 1 (I already knew BASIC and was pretty good with electronic so it was easy). Then I migrated to the BS2. While working for Parallax I started using the SX and was part of the SX/B team. All three of those processors use a flavor of BASIC, but all are different from the others -- you cannot compile a BS1 or BS2 program with SX/B. Still, SX/B was a very big success, mostly because it allowed programmers to move beyond the restrictions imposed by the BS1 and BS2. Terry and Ken and I worked hard to make it the best product we could, and had Ubicom not been such a bunch of morons, the SX might still be alive today (okay, I'll stop editorializing).
Spin is another programming language, and it will allow you to move beyond the restrictions of the SX chip by using the Propeller. If you have mastered the fundamentals of programming, making the move from SX/B to Spin will hardly cause you to break out in a sweat. I know because I've done it. We were using the SX (programmed in SX/B) in EFX-TEK products until the writing was clearly on the wall about the SX going away. We jumped onto the Propeller with a vengeance and our first commercial product was the AP-16+. It's one of our most popular products and in the last month a MAJOR amusement company (with parks across the globe) has adopted it (along with the HC-8+ that is also Propeller powered and programmed in Spin). They have already purchased nearly a 100 sets of boards for small-scale animations and have put us on notice that they will be ordering several hundred more (sets) in the New Year of new parks and attractions. Their staff knew and liked the BS2, but needed something more. The Propeller was the answer and we happened to have products that fit their needs perfectly.
To cite a very practical example, I recently ported the SX/B code for the EZ-8 to Spin for the EZ-8+. What was really very difficult to accomplish in SX/B I was able to port in about an afternoon while sitting in a Starbucks with a prototype circuit assembled on a Propeller PDB. And I have loads of memory left for more features should customers ask. This was not the case with the EZ-8; when done I had about 20 bytes of program space left.
Yes, Spin in devoted to the Propeller -- just as SX/B was devoted to the SX. Programming is programming. If you give five programmers, each using a different language, a flowchart they will solve the problem, and the programs will have more similarities than differences.
Finally... you have this incredible resource in the Propeller forums. There are a lot of very smart people here that I learn from every day. If you're sincere with your questions you'll find lots of them will jump in and help.
Forgive me if this sounded like a bit of a rant. I get a tad impatient when I see the "Woe is me, I have to learn Spin..." comments in posts. Again, programming is programming. Just do it!
Happy New Year!
Yes the programming food fight can get tiresome and the language I would have preferred never existed for the Prop but you are right Spin works well, PropBasic was a real help (if only it were VB6) and I find myself spending 99% of my time in PASM as all my requirements are high speed. In fact outside of the occasional Serial Communication Spin would only be used to launch PASM.
Your programming tips in N&V help immensely and some of the tricks I would never have though of. Thanks for sharing.
==========================================
Sure, but I don't want to start a language food fight as depending upon what is the sharpest tool you have on your tool belt that ends up being the best (for you).
As Director of Engineering for what at one time was the worlds largest commercial printer (70+ plants world wide), I did a ton of SCADA systems and VB6.0 saved me and the many engineers and programmers who worked for me and those I collaborated with more times then I can remember.
The prepackaged SCADA programs always left something which could only be done in another language so I spent the vast majority of time moving all my SCADA systems to VB (never let me down) and various flavors of assembly. It was quick, the IntelliSense was immensely helpful when the fat fingers typed the wrong variable name...
Iconics, WonderWare, AB $$$$$$, etc., all worked but usually needed a program or two or more usually written in VB to make the entire system work well. Eventually I gave up patching holes in the SCADA packages using VB I just switched everything over.
I got so used to the VB IDE I find the things missing in just about everything else annoying but that is why they call it work and not play. Seems to me there was also a MicroContoller which used VB. BasicX I believe, but the Propeller just so much more powerful, I'd program it in Vulcan if that is what it took.
My current project involves high speed scanning of over 500 inputs and setting 1200 outputs (2 props and glue hardware involved) and reading/writing to an Access database. VB sits between the props and the database stuff.
And at the end of the day ANY language would be good provided there was a Compiler for it.
Anyway, SPIN, PropBasic and PASM for me. C & Forth must be some sharp tools in somebody elses tool belt and certainly not mine.
I tried getting David to make xbasic to be more like that
The xbasic IDE is still there without all the C and Spin stuff. It could use a few enhancements though.
I know you're squeezed for time but I think the Propeller world would be a better place with xBASIC. Looking through the original thread I see that I played with it and right now I don't know why I stopped. I have customers that are very comfortable with BASIC, and having a a nice, cross-platform VB-like BASIC for the Propeller is excellent.
I am sure anything you do would be better than I could develop.
I had toyed with writing my own modules in VB to behave like the BasicX software but for the Prop and obviously that never happened. As a module/form in VB is a simple text file, I thought a compiler could be written without a great degree of difficulty but with so many tools available for the prop it does not make a lot of sense to reinvent the wheel with just a different number of spokes.
Obviously for someone like me who spends 90% of their time in the VB6 IDE using it for the prop would be fantastic and again there are a virtual ton of programmers still using it.
IMO it was one of the best things to come out of Microsoft in a long, long time but true to form they threw a wrench into it in VB.Net and subsequent versions.