Shop OBEX P1 Docs P2 Docs Learn Events
SX code snippet, please? — Parallax Forums

SX code snippet, please?

MacGeek117MacGeek117 Posts: 747
edited 2005-03-27 03:07 in General Discussion
I don't have the SX Tool Kit yet, So please don't think that I'm trying to get someone to solve a problem for me, but could someone please attach a snippet of assembly code that blinks a LED twice a second?
bugg

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Boe-bot: $229

Toddler: $249

Learning Google is your friend: priceless

Comments

  • KenMKenM Posts: 657
    edited 2005-03-25 02:53
    What clock speed will you run the SX at?





    <SNIP>

    bugg

    setb ra.0··· ;make pin ra.0 high

    call delay

    clrb· ra.0··· ;make ra.0 low

    call delay

    jmp bugg··· ;do it again

    at www.sxlist.com there is a cool delay code generator. You enter the clock frequency, delay amount and it spits out the code as shown below.

    http://www.sxlist.com/cgi-bin/delay.exe

    The 5 uS delay shown below is running the SX at 4MHz

    del_5uS
    ·jmp·$+1
    ·jmp·$+1
    ·jmp·$+1
    ·jmp·$+1
    ·nop
    ·nop
    ·ret


    Post Edited (KenM) : 3/25/2005 2:56:21 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-25 04:14
    If you DO get an SX-Tech kit then you get the SX/B compiler at no charge and you can write your programs in BASIC -- SX/B is very close to PBASIC so what you've been doing with BASIC Stamps will be helpful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • BeanBean Posts: 8,129
    edited 2005-03-25 14:21
    Bugg, you can download the SX-key software and compile SX/B programs and look at the source code generated, without having the SX-Key.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video Display Module" Available Now.

    www.sxvm.com

    "A problem well defined, is a problem·half solved."
    ·
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-03-25 18:26
    Jon- could you please post a part#, I couldn't find where it says that you get the SX/B free. I'm looking at the SX Tool Tech kit PLUS.
    bugg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Boe-bot: $229

    Toddler: $249

    Learning Google is your friend: priceless
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-25 18:39
    Go to our downloads section and get the SX-Key software -- it's part of that package.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-03-27 03:07
    Thanks, guys!
    bugg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Boe-bot: $229

    Toddler: $249

    Learning Google is your friend: priceless
Sign In or Register to comment.