Shop OBEX P1 Docs P2 Docs Learn Events
Trouble getting started — Parallax Forums

Trouble getting started

lambertmjlambertmj Posts: 4
edited 2004-10-01 20:52 in General Discussion
I just installed the SX-Key (OS = XP) and am unable to get the demos working.· I keep getting the error "unable to assemble due to errors in source code".· I followed the instructions - what did I miss?·

Comments

  • lambertmjlambertmj Posts: 4
    edited 2004-09-16 15:49
    I'm using V2.02 and it doesn't like the led28 source. It gives be bad instruction errors on these line:

    mov W,/RC.7 ;grab inverse of RC bit7
    mov RC.7,W ;and store it in RC bit7
    jmp Main ;goto main
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-16 16:16
    If you deselect the "Use SASM" option from the Configuration dialog, the program will assemble properly.

    I'm just getting started with the SX myself, but I did manage to update the program to work properly with SASM (attached).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 9/16/2004 4:46:28 PM GMT
  • lambertmjlambertmj Posts: 4
    edited 2004-09-16 17:21
    Yep - that was it (a little misleading in the manual).·

    I have the 52con CARNE module and modified the code for the SX52.· The LED turns on but does not blink.· Would this code not be compatible with the SX52?·
  • lambertmjlambertmj Posts: 4
    edited 2004-09-16 17:52
    I found a conversion document (SX18/20/28AC to SX48/52BD Conversion) that explains this. It looks like the counter registers used @ 8 and 9 are different. So this question has now been answered.
  • Josiah WoodJosiah Wood Posts: 16
    edited 2004-09-16 21:57
    I got my SX-Key in yesterday and the sample worked as-is if I used the SXKey28L.exe program instead of the program that runs from the icon that gets installed on the desktop.
  • peterjpeterj Posts: 24
    edited 2004-09-17 01:29
    I fell into the same trap when I first fired up my SX-Key. The manual tells you to always use SASM, but then points you to sample code that uses sale, OLD, assembler you were told to avoid using. In addition, the pin used in the code does not match the pin in the manual.

    ATTENTION PARALLAX SUPPORT: THIS IS NOT A WAY TO PROVIDE FOR A GOOD NEWBIE EXPERIENCE! An eratta sheet, preferably a printed one, would sure be a good thing to include for future customers!

    -P.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-17 02:15
    Bear with us while we revamp our SX product line.· We just recently became the Master Distributor for it and are putting significant efforts into the SX -- we're sorry you got caught in between.·

    The attached file has information on porting from the Parallax assembler to SASM.· Hopefully this will help while we update the demos.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2004-09-17 17:12
    Lambert,

    Jeff Martin is going to go through all of the SX-Key Development System Manual today and update the codes so they properly compile at the first attempt. This is an easy project as it most likely pertains to directives. Then, we'll upload them to the forums (this thread) and our web page featuring SX downloads:·http://www.parallax.com/sx/downloads.asp

    Just wanted you to know that we're now on top of this problem.

    Sincerely,

    Ken Gracey
    Parallax, Inc.
  • BeanBean Posts: 8,129
    edited 2004-09-17 17:35
    Be careful with that code. The reason SASM doesn't allow "MOV W,RC.7" and "MOV RC.7,W" is because the assemble to "MOV W,RC" and "MOV RC,W" they actually copy all 8 bits not just the one specified.

    Terry
  • Jeff MartinJeff Martin Posts: 760
    edited 2004-09-17 18:46
    Hi,

    I've attached a new led28.src file. It now includes more comments and tries to maintain the original code as much as possible. There are notes about the fact that it toggles every bit in RC's output latch (thanks Terry!) but it is kept that way for code simplicity. NOTE: a seemingly better choice is movb RC.7,/RC.7 however, "read-modify-writes" do not work properly on I/O pins when the processor is running above certain speeds.

    As Ken mentioned, we'll have all the demo code posted as soon as it is fixed. I posted this one now only because it is the immediate topic.

    Thank you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • BeanBean Posts: 8,129
    edited 2004-09-19 03:33
    Jeff,
    I would use either the zero or carry flag like:
    MOVB Z,RC.7 and MOVB RC.7,Z

    This will work as expected.

    Terry
  • Bill_BBill_B Posts: 1
    edited 2004-10-01 20:52
    Woo-Hoo. Blinky-blinky!

    I had the same trouble with the led28.src file, but the new one Jon provided runs fine.
Sign In or Register to comment.