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?·
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?·
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.
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.
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!
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
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.
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.
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.
Comments
mov W,/RC.7 ;grab inverse of RC bit7
mov RC.7,W ;and store it in RC bit7
jmp Main ;goto main
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
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?·
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.
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
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.
Terry
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.
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
I had the same trouble with the led28.src file, but the new one Jon provided runs fine.