Switching to SX chips
achilles03
Posts: 247
I was considering switching over to SX chips from the BS2 series.· I had two questions though.
1.· Is the SX chip, compiled from a BASIC program, that much faster than a similar BASIC program running on a BS2p?
2.· I heard the SX chip and some PICS were drop in replacements for each other.· Is that true?· If so, could you program a PIC with·the SX starter/development kit?
Thanks in advance!
Dave
1.· Is the SX chip, compiled from a BASIC program, that much faster than a similar BASIC program running on a BS2p?
2.· I heard the SX chip and some PICS were drop in replacements for each other.· Is that true?· If so, could you program a PIC with·the SX starter/development kit?
Thanks in advance!
Dave
Comments
I think the SX running a compiled BASIC program is approximately one bazillion times faster. All right, I may be exaggerating, but it's is way, way faster than an interpreted BASIC program running on a BS2p. In fact, I think Bean or Jon should (if they haven't already) run some sort of benchmark to see just how much faster it is.
As for being a replacement, I know that the SX was designed to be code compatible with some models of PICs, but I don't think they were pin for pin compatible, just code compatible. Anyone have the exact details on this?
Thanks, PeterM
The SX is much faster, but there are some trade-offs. The SX chip doesn't have EEPROM so your running program cannot store any data that is retained when the power is off. Also SX/B doesn't have WORD variables, or some of the more advanced functions (like one-wire stuff).
On the plus side you get, incredible speed (I don't like to give numbers because it VERY much depends on the code), you also get TRUE interrupts.
As for being PIC compabible I think it is Pin-For-Pin compabible with one of the very old PIC processors 12C54 or something like that.
Bean.
However, if it doesn't have an eeprom, does that mean you have to program it everytime you power up?
Secondly, how hard is it to incorporate a peripheral eeprom for datalogging for the SX?
Thanks in advance!
Dave
It is not hard at all to connect an external eeprom.
Bean.
Ok, I think I got what you're saying. I did some reading, and basically what it boils down to is that the BS "effectively" has a 2-way von-Neumann memory setup, which is what I'm used to....correct? Does the SX have a Harvard setup, and the data side of the memory is lost on power-down? Or does it not have any data memory at all?
Thanks again for the help,
Dave
-Paul
The SX18-28 has 136 bytes of RAM and the SX48-52 has 262 bytes of RAM.
Bean.
ORG $000
JMP Start ' This is at location $000 in program space
ORG $000
MyVar DS 1 ' This is at location $000 in RAM space
Bean.
The BS2 runs at about 10,000 IPS (100 uS per instruction, roughly).
The SX28 runs at 50,000,000 IPS (20 nSec per instruction, roughly).
Note the BS2 is running 'PBasic' instructions, while the SX28 is running 'Assembly' instructions. The SX/B lets you program in a simplified 'PBasic', where each keyword is expanded into multiple SX28 assembly instructions, so your throughput may drop some there.
Still 50 Meg divided by 10 K is 5,000 times faster. Quite a jump in performance, I'd say. And an external 24LC256 EEPROM doesn't cost that much.