BS2 clock speed question
davejames
Posts: 4,047
I see the following clock speed specs listed for the various BS2 products as:
BS2 - 20 MHz
BS2e - 20 MHz
BS2sx - 50 MHz
BS2p24 - 20 MHz Turbo
BS2p40 - 20 MHz Turbo
BS2pe - 8 MHz Turbo
BS2px24 - 33 MHz Turbo
To those that might know, what's this "Turbo" thing all about?
Thanks.
BS2 - 20 MHz
BS2e - 20 MHz
BS2sx - 50 MHz
BS2p24 - 20 MHz Turbo
BS2p40 - 20 MHz Turbo
BS2pe - 8 MHz Turbo
BS2px24 - 33 MHz Turbo
To those that might know, what's this "Turbo" thing all about?
Thanks.
Comments
The SX chip is code compatible with the PIC, but it also has a turbo(!) mode. That is a pipeline where most can execute at one instruction per clock. In "p" series Stamps the interpreter is recast to run in turbo mode. Thus, the p series Stamps are much faster at a given resonator frequency. For example, the BS2pe uses an 8MHz resonator but it runs slightly faster than the BS2e with its 20MHz resonator. The BS2p gets about a 3x speed advantage over the BS2 and the BS2px about 5x. 20Mhz and 32MHz resonators respectively. The turbo mode is not an exact 4x multiple of the original speeds, because many instructions such as those that involve branching have refill the pipeline.
Edit: Tracy beat me to it. Better explanation too.
So - where is this information documented aside from possibly Mr. Allen's site?
The turbo thing is what made the SX such a hot processor. A lot of us are sad to see it disappear (due to IP disputes, I think).
Other than speed, are there any other differences between the BS2 and its SX-variants, functionally?
I ask because I am not familiar with the SX but I've worked with PICs.
That is why I didn't offer anything.
...so, "no" in relation to Parallax documentation.
Can I take circuits designed for the PIC-BS2 and use them on the SX-BS2, or vice-versa?
Turbo mode is only available on the versions of the BS that use the SX chip. And it mostly runs code 4X faster than a PIC with the same XTAL. (I say mostly as some code will force the Turbo mode to dump what is in its pipeline and those items run at 1X... but on the whole it is much faster).
Be aware that the faster you go, the more power the BS consumes. So take a look at the comparison chart for power consumption figures in the BasicStamp Manual. There are some situations where the lowly BS2 and BS1 are really the best choice for battery operation.
The SX chips are something akin to a Deluxe PIC. More speed and more RAM in comparison a similar PIC. But they program through the OSC rather than programing the way the PIC does. Both can use a similar Boot Loader and that's why they are interchangeable for the BasicStamps.
The BS2e is the most compatible with the original BS2. It uses an SX28 chip, but not running in turbo mode. The timings are exactly the same as they are on the BS2. You get three new commands, GET, PUT and RUN that have to do with the 7 additional 2k memory slots for program and data.
There are small differences in the power consumption in both run and sleep mode, with the BS2e drawing higher currents, and there are slight differences in the drive capabilities of the pins and pin thresholds, the BS2e having higher drive capability. Mostly things that won't make much difference. But the original BS2 is definitely lower power.
The current version of the BS2e (hardware rev e, firmware rev 1.2) works over the full industrial temperature range, down to -40°C and below. Watch out though if you want to use an earlier rev below about -10°C; there is a bug in the brownout circuit of the SX chip on the 4.2V setting at sub-zero. The BS2e rev e instead has an external 4.2V brownout chip, like the original BS2.
The p series Stamps have differences in timing, but the circuit interface is basically the same, same pinout on the modules and chips. Except the BS2p40 offers 16 additional i/o pins, x0 to x15 plus p0 to p15. P series all have additional very useful i/o commands in PBASIC.