starting to work with the SX's....what's better to program in ASM or SX/B??
steve_b
Posts: 1,563
Hi guys,
I've had my SX lite kit a couple weeks and just cracked it this week to play.
I'm getting a wee bit confused as to how I 'should' be trying to learn this thing!
Almost all the examples I download are in SRC files (assembler).· The neumonics don't quite make sense to me yet, but it's like learning linux...they'll eventually make sense!
The help file seems to all be in SX/B with PBasic-like instructions.· These seems like the obviously way to transition to the SX.· Similar instructions that should make it somewhat transparent to switch over.
Am I right with this?
The SX's are no doubt, more for the advanced user....but I do love taking babysteps to get in to the groove and, maybe my patience isn't what it used to be but, I haven't been able to find as much of the basic 'handholding' docs that the stamps have.
Does someone have a surefire resource to get me going (a 2x4 maybe? haha).
My initial plan is to strip out the time from a GPS 'RMC stream....but I notice there's no WAIT modifier for the SERIN (SX/B?) command.
Do I then just build an array and scan through it?
Thanks guys
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I've had my SX lite kit a couple weeks and just cracked it this week to play.
I'm getting a wee bit confused as to how I 'should' be trying to learn this thing!
Almost all the examples I download are in SRC files (assembler).· The neumonics don't quite make sense to me yet, but it's like learning linux...they'll eventually make sense!
The help file seems to all be in SX/B with PBasic-like instructions.· These seems like the obviously way to transition to the SX.· Similar instructions that should make it somewhat transparent to switch over.
Am I right with this?
The SX's are no doubt, more for the advanced user....but I do love taking babysteps to get in to the groove and, maybe my patience isn't what it used to be but, I haven't been able to find as much of the basic 'handholding' docs that the stamps have.
Does someone have a surefire resource to get me going (a 2x4 maybe? haha).
My initial plan is to strip out the time from a GPS 'RMC stream....but I notice there's no WAIT modifier for the SERIN (SX/B?) command.
Do I then just build an array and scan through it?
Thanks guys
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Comments
In the long run, it empowers you to do much more.
Fortunately, the SX-Parallax Chips only come in two formats. So it is a great place to start out with Assembly.
If you become frustrated, you can always fall back to SX/B and even mix bits of Assembly code within.
Guenther wrote a very good tutorial. In fact, I keep finding all the Parallax manuals are full of clear, concise examples. Other companies documentation can tend to ramble on.· {It seems that everything Microchip PIC writes is no less than 100 pages long.}
I feel·Parallax really understands how to write to beginners as an audience, whereas others believe that engineers love a mess of sophistication.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Post Edited (Kramer) : 2/8/2006 4:27:03 PM GMT
ASM has long learning curve, so you may want to take that into consideration. Also, their are quite a few asm experts here that could help sort things out when you get in bind. You may want to sit down and make a more specific list of what you want to accomplish, and then see what ASM or SX/B has to offer in terms of getting your job done.
For the ASM stuff we do have a manual, and our friend Guenther Daubach has written a wonderful book that you'll want in your library if you're serious about going down the ASM path.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I'm also fairly new to the SX chips, about a month into it. I found that the SX/B, and SXSim are great for getting up and running. Some tasks are well suited to SX/B coding. It is when you start to push the chip towards it's limits, custom VP's, precision timing, etc. that the asm is sometimes required. - I'm sure some of the coders on this board can push the limits in SX/B, but I found it easier to take total control with the asm.
In any case, the debugging is at the asm level, so you will need to learn the opcodes, unless You write Bug Free code!
I would also suggest Gunther's book, "Programming the SX Microcontroller" It is worth ever penny, and will walk you through asm code from simple to advanced. The sections on software UART VP, and FIFO would drop right into you project.
My 10 cents worth.
Larry
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I think I got a little confused because I had downloaded some of Ubicom's doc's which, as Kramer pointed out, are somewhat over-worded...at least for me!! haha
My first task for the SX is this:
I have a couple of precip gauges (hot plate evap-type sensors) that time stamp their data.
Their clocks drift a little and for precise comparisons to radar data and other precip data, they need to have their fairly accurate.
You set the time on the 2 separate instruments with a proprietary Windows program via a serial port.
This works fine, but since you have to program them one at a time, the time is off.
So, if I could have an SX read the time from a GPS and then set the time on both instruments in 'near' dual realtime....I'd be a champ! haha
Well that's the goal.
A stamp would probably work fine....but it seemed like a good opportunity to learn the SX!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I find it's always a good idea to use a specific project to learn a new platform, as long as the task isn't too huge. I think you've chosen a good project for a first time SX learning experience. I always find that having a real task to accomplish forces me to learn so much more than just dreaming up some "toy" project to test things out with.
Thanks, PeterM
I found myself trying to skip steps and go straight to what I needed to know to do what I wanted....but that left out so many pieces that I couldn't get it done....so I've gone back and am going through the manual front/back and also ordered Guenthars book...
Hope this gets me closer to be successful!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Don't forget all this stuff is in the documentation section on the site as well as SAMPLE CODE TEMPLATES. Loadem up and watch the command execution through SXSim and you will learn loads in no time at all about Assembly.
Good luck,
BBAL
Do you have a link to the asm code samples?· All I seem to find are the SX/B samples.
Chris I.
I think he might mean to look at the code generated by the SX/B examples. And even if he didn't, that is a great way to learn assembly.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"Ability may get you to the top, but it takes character to keep you there."
·
Chris I.