Shop OBEX P1 Docs P2 Docs Learn Events
BASIC Stamp2 SX DIP (Interpreter Chip) — Parallax Forums

BASIC Stamp2 SX DIP (Interpreter Chip)

microcontrollerusermicrocontrolleruser Posts: 1,194
edited 2018-06-15 06:11 in BASIC Stamp
Sent money to Parallax to help develop the new Propeller by purchasing a Stamp SX not a SX SX.

https://www.parallax.com/product/pbasic2sx_p

Getting a Stamp 1 DIP lost out to the old rule 'Get the most micro you can for the money'.

Picked up their EEPROM and crystal to ensure the little Stamp2 SX is happy.

Anybody know if any of the instructions you gain over a Stamp2 are useful?

«13

Comments


  • Thank you Publison

    The comparison chart looks like one in Stamp Editor Help/Hardware.

    Figured out the three extra instructions.GET PUT and RUN.

    The GET and PUT go with 'Scratchpad' memory.

    Which is the SX-SX's data memory.

    In the SX you can get to it by address, this one the compiler numbers the registers for you.

    The RUN looks like something for later.Calling another program? That is a new one on me.

  • GET and PUT refer to 64 bytes of "scratchpad" memory in the BS2sx. Nowhere does the documentation indicate specifically where this memory resides, but it's part of the SX's data memory. Similarly, GET and PUT refer to 128 bytes of "scratchpad" memory in the several BS2p/pe/px models.

    All of these Basic Stamps have 16K of EEPROM for program storage divided into 2K "pages". The RUN statement works like a GOTO to the beginning of one of these 2K "pages". There's no way to specify a statement within a 2K "page" nor is there any way to return to the "page" containing the RUN statement. Despite these limitations, the RUN statement is helpful ... allowing a program to essentially have overlays. There are some application notes on ways to use the RUN statement.
  • GenetixGenetix Posts: 1,740
    edited 2018-06-15 03:29
    microcontrolleruser,

    Don't forget that the SX 50 MHz) is 2.5X faster than a BS2 (20 MHz) so any commands that involve timing will have different except for PAUSE which is always in ms.

  • Thanks Mike

    '128 bytes of "scratchpad" memory'

    Yes.We own a PX on a breakout board.

    This Stamp SX is a nice transition to the P24 and up stamps.

    ' EEPROM for program storage divided into 2K "pages"

    I know what causes the 2k limit.Just have to refresh my memory on it.Probably in the SX-SX datsheet.

    It's the size of the register controlling it that does that.

    ' There are some application notes on ways to use the RUN statement.'

    That's handy info.






  • Thanks Genetix

    ' the SX 50 MHz) is 2.5X faster than a BS2 (20 MHz)'

    One major reason for that is the SX-SX 'software peripherals'.The Ubicom Sx needs to run fast for those to work.

    So you get the benefit of that with the Stamp SX.

    'so any commands that involve timing will have different'

    That's handy info too.Thanks.
  • "I know what causes the 2k limit.Just have to refresh my memory on it.Probably in the SX-SX datsheet."

    Not really. The BS2 (and the PBasic interpreter) was designed for a 2K (byte) EEPROM. The interpretive code format was designed around this 2K maximum program size. Rather than completely redesign the interpretive code and interpreter for larger EEPROMs, the notion of these 2K "pages" was used.

    "The Ubicom SX needs to run fast for those to work." It's kind of the other way around.

    The SX runs at about 2.5X the speed of the PIC used for the BS2. Most non-time-dependent statements and operators in PBasic benefit from the speed boost allowing PBasic programs to accomplish more. Time-dependent statements are also faster (except for PAUSE) so the various timing parameters have to be changed.

  • '2K maximum program size'
    6.1. Program Memory
    The program memory is organized as 2K, 12-bit wide
    words. The program memory words are addressed
    sequentially by a binary program counter. The program
    counter starts at zero. If there is no branch operation, it
    will increment to the maximum value possible for the
    device and roll over and begin again.
    Internally, the program memory has a semi-transparent
    page structure. A page is composed of 512 contiguous
    program memory words. The lower nine bits of the
    program counter are zeros at the first address of a page
    and ones at the last address of a page. This page structure
    has no effect on the program counter. The program
    counter will freely increment through the page
    boundaries.

    Anyhow it is Assembler stuff.Not necessary when using PBasic.

    Program counter.Big fun.
  • Yes. What you quote is strictly related to the SX's program memory and instruction set. PBasic instructions are stored in an external 2K byte EEPROM, at least for the PIC-based BS2, the instructions are variable length, and assume a 2K address space.

  • Thanks Mike

    Saving any more questions about new Stamp 2 SX for tomorrow morning.

    It does seem like a cool little micro.
  • GenetixGenetix Posts: 1,740
    edited 2018-06-15 17:26
    microcontrolleruser,

    Nuts and Volts #54 (Volume 2) is all about the BS2sx.
    I think the title speaks for itself.
    #54: "Faster, Stronger, Better: the BASIC Stamp 2-SX"
    https://www.parallax.com/downloads/nuts-and-volts-basic-stamps-volume-2

    #71 which is also in Volume 2, talks about converting code from the BS2 to the BS2 sx-based modules.

    #87 is on Multi-bank programming (Volume 3)
    https://www.parallax.com/downloads/nuts-and-volts-basic-stamps-volume-3

    The BASIC Stamp Manual though is your best resource.
    https://www.parallax.com/downloads/basic-stamp-manual

  • Thank you Genetix

    Here's some more info on it.

    http://www.ic0nstrux.com/SX-tech-board#.WyP9sIplDIU

    Next thing to do is start laying out circuit on breadboard.

    SX should be here Monday or Tuesday.

    Serial port hardware connector will be here in about a week.
  • PublisonPublison Posts: 12,366
    edited 2018-06-15 18:19
    Thank you Genetix

    Here's some more info on it.

    http://www.ic0nstrux.com/SX-tech-board#.WyP9sIplDIU

    Next thing to do is start laying out circuit on breadboard.

    SX should be here Monday or Tuesday.

    Serial port hardware connector will be here in about a week.

    That board is for the 28 pin SX chip, not the BS2-SX.

    You would need this chip:

    https://www.ebay.com/itm/1pc-UBICOM-Scenix-SX28AC-DP-microcontroller-50MHZ-50MIPS-Parallax-USA-seller-/231953261907?_trksid=p2385738.m4383.l4275.c10




  • Thank Publison

    I was looking for SX SX schematic to hook up the Stamp SX.

    Those downloads there have some handy stuff in them.

    Looked at Stamp SX module schematic.Might be able to get by with that.

    Wonder why Parallax never made schematics to breadboard Stamp 1 and Stamp SX DIP's?

    Or Stamp 2 DIP?
  • Thank Publison
    I was looking for SX SX schematic to hook up the Stamp SX.

    What is a SX SX?
  • Ok. You ordered the interpreter chip. You should make a distinction between the SX OEM and Stamp SX module, which to many is thought to be a BS2SX.
  • Publison wrote: »
    For that price you could get a Propeller, EEPROM, and crystal. Why bother with the SX?

  • I share your feelings, but I still play with 6800's. :smile:

  • Thanks Publison

    'What is a SX SX?' SX28

    'You should make a distinction between the SX OEM and Stamp SX module'

    Title of post is right off of Parallax website.

    Thank you David Betz

    'For that price you could get a Propeller, EEPROM, and crystal.'

    We use Propeller and SX.

    ' Why bother with the SX?''

    Because we want to.
  • Publison wrote: »
    I share your feelings, but I still play with 6800's. :smile:
    I'd like to play with a 6809. I had one in a Southwest Technical Products system but I sold it quite a while ago. I'd love to get a 6809 SBC.

  • PublisonPublison Posts: 12,366
    edited 2018-06-15 22:35

    'What is a SX SX?' SX28

    Parallax never used that term in their marketing content. That muddies the waters when trying to answer your questions.


  • ' Why bother with the SX?''

    Because we want to.
    Fair enough! It is fun to play with old technology and I agree that Parallax never really created a successor to the BASIC Stamp. The Propeller is very cool but isn't really the same thing.


  • ' I agree that Parallax never really created a successor to the BASIC Stamp'

    It exists as another companies PICBasic.More or less a continuation of Basic Stamp.

    Then there is PICaxe.Basic with more powerful micro's than PIC16F54(56 Stamp almost the same) and 16F57 Parallax uses.

    So Parallax would have to play catchup and then pass them.

    We will figure out how to wire these DIP's one way or the other.

    It is just a little checklist.

    Power, serial connection,oscillator and EEPROM.

    Can't be that hard.

  • So Parallax would have to play catchup and then pass them.
    I doubt that was true when Parallax made the decision to create the Propeller. They just decided to move beyond the BASIC Stamp into new territory. Just what is it that the BASIC Stamp does that the Propeller doesn't? I understand the appeal of using vintage tech but is there something beyond that that you like more about the BASIC Stamp than the Propeller?

  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-06-16 03:24
    Mr Betz

    That whole thing is getting WAY off track.

    We are getting a Stamp SX working on a breadboard.That's it.

    Thank you Genetix

    Let me take a closer look at that.

    It looks like a Stamp 2 in a socket on a PCB board.With components to get it to run.That's what we need only on a breadboard.

    Should work out about the same on a breadboard.

    Went down this road with Stamp 1 DIP.

    Guess we could get a Stamp 2 DIP and get that working and just modify for Stamp 1 and Stamp SX.
  • It's not a Stamp 2 in a socket on a PCB. It's an SX microcontroller pre-programmed with the BS2sx interpreter, surrounded with the necessary components (resonator, voltage regulator, serial I/O and reset circuitry, etc.) to function like a BS2sx module. This may seem nitpicking, but it's an important distinction. You might have an ATmega328P microcontroller, but you don't have an Arduino Uno R3 module unless you have the right parts connected to it in a particular way with specific code downloaded to the on-chip EEPROM (the bootloader). The BS2sx OEM module also doesn't have the wiring or interface parts to be used with a blank SX for SX programming.

    The SX is fast (50MHz clock) and a breadboard has fairly long interconnections with a lot of capacitance between a given connection and those around and adjacent to it. You may have problems trying to run the SX on a breadboard. There used to be breadboards specially designed to minimize the capacitance (and inductance) in and among the various interconnects, but I haven't seen them in years. Good luck.

  • Thanks Mike

    Current plan.

    Find + and - pins on SX28.

    Sift through available info and see if pins are in same place on BS2SX.

    Stamp will get here Monday probably.

    To the eye it looks the same as SX28.I have to mark it somehow so

    it does not get programmed and wipe out Parallax stuff on it.

  • VDD and VSS are pins 2 and 4 on the SX28.

    We'll see where they are at on the BS2SX.

    Found OSC1 OSC2 for the oscillator circuit.

    The EEPROM is still a mystery.

    Ditto on the serial adapter.

    Interesting SX28 has PORTA PORTB and PORTC.

    Lots of I/O pins.I'll get spoiled.Been working with 4 and 8 pins.
  • The BS2sx OEM interpreter chip is an SX28 pre-programmed by Parallax with their PBasic interpreter. The pins are the same except that some of them are used to implement the BS2sx module functions. For example, RB0-7 becomes I/O pins 0-7 while RC0-7 becomes I/O pins 8-15. RA0-1 become data and clock pins respectively for the I2C EEPROM used to store the user's PBasic program. RA2-3 become the serial port Rx and Tx pins, used for downloading and debugging.
Sign In or Register to comment.