Why...O...why...in this day and age...
denno
Posts: 223
For close to two decades now, I have been writing programs for the Basic Stamps. Many, many projects with the Bs2 and my favorite the BS2sx. Now, I understand, from Chris, that the BS2sx is now obsolete, due to the interpertor chip, not be produced. Such a shame...really. Now, I see Parallax shifting toward the Arduino, products, which I personally find sad.
The reason I feel sad, after using the Stamps, is...Parallax, (Chip Gracey) produced the Propeller, which by all standards, is far superior to the Arduino product. The basic problem with the Propeller, for old Stamp code writers, like myself, is the SPIN language is...really...just to complicated to learn, and I have tried. Book, after book, and I really don't think I am stupid.
So, repeating the subject line, "Why...O...why", with the aid of a super computer, or someone...(probably got something to do with moneys)..can't the PBASIC language be installed (if that is the right word) in the Propeller. I am sure this would put Parallax back on the Microcontroller map, and take some glory away from the Arduino. After all the Stamp was out there first.
I do know that there are other STAMPS with the multi slot programing abilities. But....well, I just had to speak out....because I hate to see Parallax go done the tubes..
Dennis
The reason I feel sad, after using the Stamps, is...Parallax, (Chip Gracey) produced the Propeller, which by all standards, is far superior to the Arduino product. The basic problem with the Propeller, for old Stamp code writers, like myself, is the SPIN language is...really...just to complicated to learn, and I have tried. Book, after book, and I really don't think I am stupid.
So, repeating the subject line, "Why...O...why", with the aid of a super computer, or someone...(probably got something to do with moneys)..can't the PBASIC language be installed (if that is the right word) in the Propeller. I am sure this would put Parallax back on the Microcontroller map, and take some glory away from the Arduino. After all the Stamp was out there first.
I do know that there are other STAMPS with the multi slot programing abilities. But....well, I just had to speak out....because I hate to see Parallax go done the tubes..
Dennis
Comments
PropBasic has been out for many years for the Propeller:
http://forums.parallax.com/discussion/118611/download-propbasic-here-00-01-14-last-version-for-bst/p1
Check it out!
https://www.parallax.com/product/sx48bd-g
The could be put onto something like:
http://forums.parallax.com/discussion/94916/sx48-40-pin-dip-full-kit-and-pcb-available
And there are 137 BS2SX available:
https://www.parallax.com/product/bs2sx-ic
While the BS2e and BS2sx are now obsolete, the BS2p series more than makes up for them. I've been asking for years for the BS2e and BS2sx to be discontinued since the BS2p supercedes them. There really is no reason to use the older models when something faster and better can do the same job for the same cost.
Also, Parallax isn't shifting toward the Arduino. We've simply provided some example code and a board (BoE Shield) to allow those already using the Arduino to make use of our accessories and robot platform.
The SPIN language was designed to be easy, but could not really be a variant of PBASIC for many reasons, not the first of which is major architectural differences. The PBASIC language could not really handle the resources of the Propeller without a huge overhaul. Also, there are inherent limitations in the PBASIC language that would then impose limitations on the Propeller hardware. These instructions are quite powerful and easy to master within the limitations of the BASIC Stamp, but the Propeller can do so much more. Many features of the BS2sx you refer to were added to get around some of these hardware limitations. So porting this to the Propeller just imposes the same limitations. SPIN was designed to free the programmer from such limitations.
Parallax never left the microcontroller map, nor is it going down the tubes. When the Propeller 2 comes out it will no doubt have a revised language as there aren't facilities within the current SPIN language to handle all the new hardware features of the new Propeller chip. It's just how things go.
Take for instance this part in PBASIC
when converted to Tachyon PBASIC style code becomes: The init section was named Init so that it could be called by name or setup to AUTORUN on reset. So far so good.
This is one of the subroutines:
In Tachyon PBASIC style:
which BTW is fully interactive and this is what this routine looks like decompiled: The PWM function was implemented in a Q&D loop fashion even though there are better ways, but the PBASIC cycle time is still 4 times faster than a BS2px. Here I test that interactively using LAP functions to accurately measure execution time:
I'm not saying the this is a "comfortable" solution but it just shows how quickly a PBASIC program could be "converted" although this is really just a quick test and I could make it with a bit more work handle unmodified PBASIC source except of course the source would just be pasted into a terminal interactively.
I didn't bother with any books when I learned Spin. I just looked at demos, mostly ones that did VGA and TV output, and modified them to try to make them do other similar things. Eventually, I got to the point where I could write my own programs. I don't remember how or when I learned PASM, though.
About the same scenerio for me, I never thought twice about when, I made the graduation from the BS2 to the Propeller and SPIN. I have a lot to learn yet, but the transition was smooth.
I too started with the BS2 and thought Spin was intimidating but now I love it!
I would say that about 75% of Spin is the same as PBASIC but Spin is a lot more powerful.
I learned Spin mainly from the Propeller Education Kit (PEK) textbook but also by looking at Demo programs and other people's code. Unfortunately I had to learn how to use Constants (CON) from other sources.
Martin Hebel wrote a BS2 Object, or a Spin Library, for those PBASIC only commands such as RCTIME, SHIFTIN/OUT, PULSIN/OUT, etc.
If you like PBASIC then you will love Spin,
The BS2 bytecodes are still considered proprietary to Parallax and are not publicly documented. I've thought about enhancing FemtoBasic to handle most of PBasic, but it ended up way too big and complex without completely rewriting FemtoBasic which I wasn't willing to do.
I agree that Spin is a better fit to P1 than PBASIC, but that does not quite address the OP's question.
The main hurdle I see for PBASIC -> P1 is not language limitations, but the lack of Wide Vcc on P1.
A key pivot for doing a 'better PBASIC' platform, will be backward hardware compatibility.
Neither P1 nor P2 offers 5V IO operation, but BS2p already uses an external-vendor MCU, so a precedent is proven that Parallax can use other vendor's MCUs.
The existing BS2p is not at the lowest price end of the spectrum, so a next-step has some elbow room in MCU choice.
The range of ARM parts in 5V is expanding steadily, and Nuvoton, Infineon, and Cypress have many.
Some work is being done on Python for MCUs, so a chip choice that allowed PBASIC with an eye to future Python could generate enough market interest.
Interesting...it seems to me he's saying the hurdle is the language, not the hardware.
While the Propeller chip is not a 5V MCU, it can easily interface to 5V systems as shown in a myriad of examples Parallax has provided. Granted, not every 5V system is compatible with 3.3V signals, but the circuitry to make it all work smoothly is minimal.
What do you mean the BS2p uses an external-vendor MCU? I don't understand that statement.
Well, yes, of course, but Chris said the only active variant was BS2p, so I focused on that.
Actually, that's not what I said. I said the BS2p series supercedes the BS2e and BS2sx. There was also a BS2pe and a BS2px.
The MCU used as the interpreter in the BS2p was not made by Microchip. It was a Parallax part. Before that it was a Ubicom part and prior to that it was Scenix. The die may have been made by the same company all along, however the owner of the SX brand at the time was as stated.
Liekwise, the BS1 and BS2 use the PIC as the interpreter, which is the only one made by Microchip.
-Phil
Okay, now we're quibbling needlessly. I will refer to the following article which was already previously shared when the BS2e and BS2sx were listed as obsolete.
https://www.parallax.com/news/2016-05-20/bs2-substitution-recommendations-eol-sx-based-basic-stamp-microcontroller-modules
That's likely the root of your problem, honestly. Please don't take that as an insult because it's not intended as such in any way - it's natural to get comfortable with something and continue to use it because it comes easily, even when better options are available. If you spend some time with the Propeller and Spin you'll find that there's a learning curve, but it's not hard to use, and there are a lot of examples in the code provided with the Propeller Tool, the Object Exchange, and the forums, in addition to a lot of people here who are happy to help when something stumps you.
There are also a few libraries available that provide many of the same functions as the Stamp, using the command names you're used to, which should help the transition. When you're ready to dig into the details, the code for those functions is available too.
Examples :
Checking in at Digikey finds MB9BF566KPMC-G-JNE2 in 48 pins, which would be a same-package retrofit & Parallax could use a change of colour to show different MCU host.
http://www.digikey.com/product-detail/en/cypress-semiconductor-corp/MB9BF566KPMC-G-JNE2/1534-1106-ND
ARM® Cortex®-M4F FM4 MB9B560L Microcontroller IC 32-Bit 160MHz 48-LQFP (7x7)
Program Memory Size 544KB (544K x 8 )
RAM Size 64K x 8
Connectivity CAN, CSIO, I²C, LIN, UART/USART, USB
Peripherals DMA, LVD, POR, PWM, WDT
Number of I/O 33
Voltage - Supply (Vcc/Vdd) 2.7 V ~ 5.5 V
Data Converters A/D 8x12b, A/D 2x10b
$3.36/1k
From Nuvoton, also focusing on 48 pin, USB, Wide Vcc :
(smaller and slower, but also lower price)
https://direct.nuvoton.com/en/m452le6ae
- ARM® Cortex®-M4 with DSP and FPU
- Max frequency of 72 MHz
- Operating voltage: 2.5V to 5.5V
- 128 KB of Flash memory
- 32 KB of SRAM
12-bit ADC (up to 16 channels)
12-bit DAC
- USB 2.0 OTG
- Up to 4 UARTs
- Up to three SPIs
- Up to two I2Cs (up to 1 MHz)
- Smart card interface
- I2S interfaces
$1.89/1k