Shop OBEX P1 Docs P2 Docs Learn Events
Parallax SX28 Mov Instructions and Registers — Parallax Forums

Parallax SX28 Mov Instructions and Registers

microcontrollerusermicrocontrolleruser Posts: 1,194
edited 2018-05-03 12:54 in General Discussion
Looking for the datasheet.I remember a Ubicom SX datasheet.

Will that match up 100% ?

Or are there some differences in the Parallax SX 28 chips?

Going to look for the three basic MOV's.

MOVLW,MOVWF and MOVFW.

EDIT:Opened the editor and loaded PWM.src

What is the difference between SASM and Parallax Assembler?

Comments

  • PublisonPublison Posts: 12,366
    edited 2018-05-03 13:24
    Looking for the datasheet.I remember a Ubicom SX datasheet.
    Will that match up 100% ?
    Or are there some differences in the Parallax SX 28 chips?

    They are one in the same. (From Wikipedia).:
    The designs for the devices are owned by Ubicom (formerly Scenix, hence "SX"). The SX dies were manufactured[citation needed] by Ubicom, who sent them to Parallax for packaging. Ubicom had made processors with 18, 20, 28, 48 and 52 pins, but because Parallax did not have packages for 18 and 52 pins chips,[citation needed] the SX-18 and SX-52 were discontinued.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-05-03 14:11
    Thank you Publison!

    Parallax SX-Keyâ/Blitz Manual v2.00

    Where is this manual on Parallax site?

    EDIT

    Found it!

    Version 2.00 is on website and a shortcut on my desktop.

    This has the instruction set in Appendix A.
  • PublisonPublison Posts: 12,366
    edited 2018-05-03 14:22
    Everything SX is on this page under "Downloads and Documentation".

    \https://www.parallax.com/product/sx48bd-g
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-05-03 14:36
    Taking a look at SX Tech board and by way of that the SX28.

    It's like a Stamp board.

    Very cool to see headers next to breadboards with PORT's.

    Port A has 4 pins.0-3 PortB and PortC have 8 pins each.0-7.

    Then it has RTCC and MCLR.Then VDD and VSS.

    How does the RTCC work?

  • Thank you Publison.

    Forgot that trick.

    Probably got ours from SX Key sell page.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-05-03 17:08
    Okay.

    Have the datasheet and the instruction set so I think we're all set for awhile.

    Came to my senses and remembered it is a little better to get info from Parallax documents.

    The Parallax approach helps a lot.

  • 43 instructions.

    That's a relief! I looked before and saw about 20 MOV instructions.

    This might be a clue to that.
    In addition to the 43 basic instructions, the SX-Key assembler allows for additional instruction
    mnemonics that are either converted internally into other basic instructions, or are expanded into two
    or more basic instructions.
    12.2 Instruction Set Summary
    Table 22 – SX Instruction Mnemonics below, contains a list of all instruction mnemonics supported by

    What are SX Instruction Mnemonics?
  • microcontrolleruser,

    Parallax has a few books on the SX and Jon Williams used it in a number of Nuts and Volts articles.
    https://www.parallax.com/product/sx48bd-g

    Click on Downloads & Documentation

    I think this is what you are looking for.
    https://www.parallax.com/downloads/beginning-assembly-language-sx-microcontroller

  • Beginning Assembly looks very cool.Thank you.

    Parallax explains 'Register Banking' and 'Program Pages'.

    THAT should be interesting!
  • I you're able to master SX assembly, Propeller assembly will be a piece of cake! Interrupts on the SX can be very tricky, BTW, if you enable pin and timer interrupts.

    -Phil
  • I you're able to master SX assembly, Propeller assembly will be a piece of cake! Interrupts on the SX can be very tricky, BTW, if you enable pin and timer interrupts.

    -Phil
    I don't understand the point of bothering with SX assembly given that it's a dead product and obsolete to boot. Why not just start with the Propeller? There are plenty of people here who can help him learn Propeller assembly.

  • 'I you're able to master SX assembly'

    At my pace that will be around 2025.Check with you then.

    'Interrupts on the SX can be very tricky, BTW, if you enable pin and timer interrupts.'

    Thanks.We are at the 'One page program' stage.Interrupts are a ways off.Like peripherals and other stuff.

    Just working on the basics.
  • David Betz wrote:
    I don't understand the point of bothering with SX assembly given that it's a dead product and obsolete to boot. Why not just start with the Propeller? There are plenty of people here who can help him learn Propeller assembly.
    That's pretty much the point I was aiming for, albeit rather more obliquely. :)

    -Phil
  • The data memory of the SX consists of a small number of byte-sized registers. Although there
    are well over 100 registers in the SX, your program can only work with 32 of them at a time.
    In a later unit, you’ll learn about banking which allows you to get to all the registers, but for
    now, suffice it to say that there are 32 registers.

    THAT is how you write a beginner's manual.

    1 Keep things limited

    2 Refer to what's ahead.

    This looks like that Lindsay's work.

    32 registers. Now we are getting in the power band!
  • ;Beginning Assembly Language for the SX Microcontroller
    ;Program 2.1
    ;=======================================================================
    device sx28l,oschs3
    device turbo,stackx,optionx
    IRC_CAL IRC_SLOW
    reset start_point
    freq 50000000 ; 50 MHz
    org 0
    start_point mov !rb,#0 ; make all of port b outputs
    mov rb,#0 ; make all port b outputs = 0
    sleep ; go to sleep
    

    I'll comment on this later.

    First order of business is to slow down this board.

    Take out that 50mhz.Put in a 4mhz one.

    Keep SX 28 DIP from blowing up.

  • Here's a pretty good little datasheet.

    https://www.parallax.com/downloads/sx20ac-and-sx28ac-datasheet

    It's by Parallax too! So it has tips about compilers and stuff in it.

    It's is not on 'Downloads' under SX Key sell page at Parallax.
  • In a real project, you must supply a
    crystal or a ceramic resonator for speeds greater than 4 MHz. However, when working with
    the SX-Key it provides the clock (you can change the clock speed using the Run|Clock menu).

    We're off the hook changing resonators on the board!

    You just set it to 4mhz in SX Editor equivalent of PIC configuration.Run/clock menu.

    THIS is a good manual!

  • This is from SX User's Manual by Ubicom.
    MOV W,--fr Move (fr-1) to W 1 1 0000 110f ffff Z

    They list each move combination.

    This is from Beginning Assembler by Parallax.
    MOV 1 1 Move W to register, register to W, literal
    to W
    MOV 2 2 Move register to register or literal to
    register
    TEST 1 1 Test W or register, set flags

    They just give you the instruction and show you some examples.

    All cleared up!

  • If your going to learn assembly on the SX I would suggest also trying SX/B. This is a Basic compiler written by Bean for the SX. I found it very useful to look at the assembly code generated by SX/B.
  • Thanks.

    'going to learn assembly'

    Have a foothold in PIC assembly.Let me tell you just that takes some doing!

    Playing around with SX assembly as a break.It is very interesting comparing the two.

    'trying SX/B'

    There are other compilers that attempt to convert assembler to basic too.PICBasic to name one.

    Just never seems to come out right.

    PICaxe WJEC assembler lessons are really unique.

    They have 'sugar coated' assembler instructions.To protect you from the real time burners.

    Yet it is very true to PIC assembler.Interesting.Very.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2018-05-25 03:13
    If you're still doing PIC assembly, forget the Microchip mnemonics. They're just obfuscated torture. Parallax improved on them years ago, and continued using them with the SX assembler. Parallax sold/assigned (not sure which) their PIC assembler to Tech-Tools, but you can still download it here:

    http://www.tech-tools.com/d_pictools.htm

    -Phil
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-05-25 03:44
    'forget the Microchip mnemonics'

    You are right.It is fun figuring out what they mean.'What they are trying to say.'

    'their PIC assembler to Tech-Tools'

    That Tech Tools guy is hard core technical.Found himself a new niche business.

    In the real world you have to just deal with Microchip and PIC's.

    Although I see why they went after Ubicom and by inheritance Parallax for the SX.

    It is kind of like the 'engineer's ' PIC.

  • microcontrolleruser,

    There are a number of Nuts & Volts articles that Jon Williams wrote that use SX/B.
    #116 (Volume 5)
    #117, 122, 125 (Volume 6)
    #129, 137, 139 (Volume 7)

  • Genetix

    Unfortunately have to stay away from any language but assembler for now.

    That is a very good product.Like all Parallax does.

    That's just the way it is right now.
    BEGIN BSF PORTB,0 ;Turn ON B0.
    BCF PORTB,1 ;Turn OFF B1
    CALL DELAYP5 ;Wait 0.5 seconds
    BCF PORTB,0 ;Turn OFF B0.
    BSF PORTB,1 ;Turn ON B1.
    CALL DELAYP5 ;Wait 0.5 seconds
    GOTO BEGIN ;Repeat
    END
    
  • microcontrolleruser,

    SX/B looks just like PBASIC.
  • Genetix wrote: »
    microcontrolleruser,

    SX/B looks just like PBASIC.

    And generates Assembler to boot !




  • 'generates Assembler to boot'

    Will take a look at it again.

    The PIC ones that attempt that have a few problems.

    You expect result to look like a regular assembler program and it does not.

    Full of EQU's about a page and a half of them.That is what one did.Kind of a jolt expecting

    little assembler program and seeing that.
Sign In or Register to comment.