In SX Microcontrollers, SX/B Compiler and SX-Key Tool, kmonsx wrote: [quote="Unsoundcode"]opinion on basic v assembly, do you think learning assembly has benefits worth the time it takes to learn. Is assembly as good as basic, better than basic or a lot better than basic? [/quote] Jeff, Tough questions here. Yes, learning assembly will definitely help you in the microcontroller world. These type of projects are hardware related and can require tight timings, especially when communicating to outside chips and devices. Because you know each instruction takes a certain number of cycles(usually 1 instruction = 1 cycle = 20ns at 50mhz) it's easy to tell exactly when something is going to happen. Assembly is about as close to the hardware as you can get and so it is a low-level language. Low-level languages give you the power to do whatever you want, but comes at a price of complexity, and things that you might take for granted in a higher-level language simply aren't there in assembly. Assembly instructions are usually the most basic, the most atomic operations you can perform. Basic on the SX I've found to be really easy. Quick to pickup. It's not a "full-fledged" version of basic, unlike what you might have played with on a PC. There are some commands that have limited flexibility and options, but newer additions like 16-bit variables are nice. It has some nice features like I2C support, one wire stuff, a UART that runs at a respectable speed(although I'd love to see this work even faster) As far as "rapid application development", basic is great for throwing together a working program quickly. For my purposes (hobby projects etc), I use a mixture of assembly and basic on the SX. For anything with critical timing, I use assembly. In my current project, I have my ISR written in assembly, because it's firing pretty frequently, and I wanted to get in and get out. For my memory communication, I'm doing everything in assembly. I *was* using assembly for a bit-banging UART, but found that I had a minor timing glitch (related to MOVB taking a different number of cycles based on contents of the source bit), and so the (although maybe temporary) fix was actually to go to known-good working code, the basic UART. Answer? Use the right tool for the job. HTH, Keith ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=160995#m166953 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)