Q: I have a question about third party and programmer tools (jtag programmers) . how can I make sure those tools work with third party development tools? I used link programmer ATMEL for AT9(ARM9) and didn't work with compiler (KEIL ) . how can we taker over this issues?

A: The 3rd-party software suppliers want to control the hardware so they can update firmware and handle the PC-based drivers and JTAG connections. That makes sense and simplifies any "he-said she-said" situations where one company blames another for problems: "It's your pod that's the problem. No, it's your tools that cause the problem, etc..."

As I noted in the seminar, avoid programming and debugging pods from Asia. I have read posts that describe compatibility problems with many of those pods. Do you want to stake your career on a few-hundred-dollar difference between a reputable vendor known in the industry and a cheap product from Asia you uncovered on ebay?

Also, JTAG is not always JTAG between manufacturers. The IEEE 1149 JTAG standard uses signals for boundary-scan tests and in-circuit programming, but the MCU JTAG pods might not adhere to this standard. Don't assume because a pod has a "JTAG" interface it will work with all other JTAG devices.

Q: Is model creation in the Maplesoft easy? Should you decide algorithm when you create model?

A: Maplesoft has some videos on its site that will answer your questions better than I can in a short answer at the end of a long day: http://www.maplesoft.com/products/maplesim/index.aspx. Watch the short video. If you're serious, request a live demonstration.

Q: Jon can you recommend a path/tool for the lone engineer working from a home lab?

A: It depends on what you want to do, but to start, the Arduino Uno, Digilent chipKIT Uno32, ARM mbed, and Parallax BASIC Stamp provide good ways to get a quick start without the headaches of configuring compilers, worrying about libraries, and so on. You can get a good start for under $150. Note the Parallax BASIC Stamps use the BASIC language, but that shouldn't discourage you from taking that route. Parallax has many good books, too. I hope this helps.

Q: @jon: C vs. ASM: Given that in both cases you're working close to the hardware, I wonder how reusable is embedded C across MCU families, say from MSP430 to PIC?

A: Good question. There's no compatibility between hardware functions, but if you have an algorithm that simply processes data, you can likely move the code between processors. Lots of "gotcahs," though because, say one MCU has multiply hardware and the new target does not. You have a line of code:

test = alpha * temperature;

The new compiler will handle this situationus but you'll end up with more code and a longer processing time without the multiply hardware. It's not easy.

A: I'm not sure whether you've asked me or the other "chatters" in general. Anyway, no, I have not used UML because I never got involved with a project large enough to justify using or learning it. See my answer below, too.

Q: Jon, in all fairness to all the different techniques and tools, isn't it fair to say that all this these different approches can and should be used at different phases of the project?

A: Good point! It depends on the people you work with, company policies about project development, budget, and so on. Some people will use model-based design only to tune algorithms and then create some C code they tune by hand. For others, they have a project flow that uses state-machine notations and separate teams use a seat-of-the-pants method. I just want people to know what's out there so they can investigate and find out what could work for them.

Q: Mrs. Z... How reluctant of a beginner are you to get into C? I think that the K&R is the best C book ever, since it is concise, but it is so concise that it can be hard for non-programers/non-engineers to devour.

Q: What learning tool, for us non-programmer (reluctant beginners) best addresses the differences and teaching of the MANY different addressing modes. Decision and control, interupt and pin handling not so bad ... but the addressing mechanisms are terribly confusing.

A: Addressing can get complicated in assembly language. It gets easier in C with the uses of pointers and pointer addresses. It's something you just have to experiment with and see the results. Take a look at the book, "Mastering C Pointers," by Robert J. Traister. It's available in a 2nd edition and I think you'll find it helpful. I still have the 1st edition in my library. You might find copies of the 1st edition available from second-hand book dealers on the Internet.

Q: If using PICs and assembly only - any advantage going to MPLAB-X over MPLAB-IDE?

A: I haven't used all of the features of MPLAB X and no longer program in assembly language. But MPLAB X provides a nicer interface because it uses a standard Netbeans framework, it will be easy to update and for developers to extend it. Also, Microchip will not support new chips with older versions of MPLAB, so the "X" version is the way to go now so you're a step ahead.

A: Better for what? Each has a place. Assembly language works with the hardware and gives you complete control over an MCU. But it's easy to get into trouble and it has a steep learning curve. If you want to move up a bit from the hardware and let C do a lot of the work, than go that route. Years ago I programmed in assembly language and loved it because I could use any instruction and do anything I wanted with a processor. But today I would not want to try assembly language on an ARM Cortex-M3 MCU.

Q: Jon, I don't know you're planning to talk about his in the real-time module. Question is what doyou think of QNX Momentics to develop C/C+ code for even basic MCU software?

A: I'm not familiar with the QNX Momentics software and the basic info doesn't explicitly say what ARM family the Momentics tools work with. Perhaps someone else can offer more information. Sorry I can't be of more help.

Q: Jon, I'm in that problem now with PIC24... and MPLAB X appears to have no chip configuragion Wizard.

A: I talked with people at Microchip about a peripheral-device wizard and they said they do not have one. That's a shame because it can take a while to become familiar with the registers and bits needed to control a device. Microchip has good documentation and example code, but it's behind the times without a wizard. Maybe customers can apply some pressure.

A: Years ago microprocessor manufacturers created special (expensive) bonded-out chips that brought out signals not present at pins on the normal, commercial processors. The tool suppliers bought those chips and put them in pods that connected to a host computer and to the microprocessor socket on a board. The special chip would act like an MCU but also give the software tools extra information and control over the chip. In essence, it would "emulate" the chip that would eventually go in the socket. These days MCUs include debug capabilities, so emulator "pods" have disappeared. Today's pods provide the debug connections for testing software and loading flash memory with code and data from a host PC. The name "emulator" continues however, even though these pods no longer emulate a processor. It's a case of an obsolete name sticking to a product. Much like saying, "dial 212-555-0000." There are no longer dials on phones.

A: Well, you get what you pay for. The more-expensive tools include those types of capabilities, but don't expect them in every free or low-cost software package. You'll have to check the specs for the tools you might consider to ensure they do what you want. I doubt debuggers monitor the stack in real time, though.

To estimate stack use, allocate a large amount of memory for the stack and fill it all with the same value, sau 0x55. After you run your program, look at the stack area and determine the extent of changes from 0x55. That will give you a first approximation of the amount of memory the stack used for that version of your code. I would add quite a bit of memory, though, to be on the safe side. I hope that helps.

Q: I am designing a microcontroller for a space application. Can you suggest a reference on how to correct (SCRUB) memory to remove errors caused by radiation.

A: You'll need radiation-hardened memories and a rad-hardened MCU. Check with aerospace companies to find one that manufactures such devices. They are expensive due to a limited market and special processing needed to harden them against radiation. AMSAT has placed many small satellites into low-earth orbits, so you might find MCU-related info on the amsat.org site.

Q: what is the benefit to use RTOS such as uC/OS II or III? Is it more complecate or overburden to make codes for small embedded applications? If so, what is the measure or reference to use or not an RTOS to develop an application? For e.g. code size or complexity or any other reasons to be developed application?

A: The complexity of a project and the number of "threads" or processes you need to run determine whether or not to use an OS or an RTOS. Ask Jack Gannsle this question in his sessions the week of January 29th. He can add some insight into when to use an OS. In the meantime, here's a good paper: http://www.netburner.com/downloads/embedded_projects/RtosVsInfiniteLoop.pdf. I hope this helps.

Q: What are the chances that we burn the chips on dev boards becos of static in this winter season? Not everybody at home/hobbyists wear all the anti static gaurds.. right?

A: Good question! I always work on a static-dissipating mat on my lab bench and have a wrist strap with a solid ground connection. My mat is bright green. 3M sells many desktop mats such as this one: TM2436L1BL-L. You can find them from several suppliers. I live in Utah and it gets very dry during the winter--lots of static sparks, so a mat is mandatory. I recomment such a mat to everyone who works on electronic hardware. Why risk killing a project?

A: I like it. It's specific to the TI MSP430 family and doesn't cover all of the '430 chips, but I'd bet TI will extend it to other MCUs. It just makes a lot of sense and it helps get programmers over the hurdle of setting up peripherals and I/O ports. That's no small matter for some MCUs.

You're missing the point. Even if there were some solid ant-virus software for the Mac (maybe there is, maybe there isn't), what is really needed here is a comprehensive anti-virus solution that operates between both platforms, to make sure a virus can't get in on one side (in my example, the Mac side), and execute on the other.

PC vs Mac .. workaround is to use VirtualBox or similar SW, install extra Win XP as VM, install needed IDE tools, bridge USB port over and things works. I used to evaluate some MSPs on this way on PC box but there should nto be any diff on Mac. There are just probably small drawbacks (performance, latency, ...) but is usefull to some level.

Alaskaman66, the trickier part is isolating the potential short from the CPU so the CPU doesn't fail. You need to be able to safely detect the short. At that point, you probably want an interrupt to go off, to indicate that a short has occurred, and the circuit is no longer valid for execution.

Techhunter: here's another example I wish to try sometime..Build a glow plug controller for a diesel engine. The MCU will drive a solid state relay. If the relay fails shorted, could one devise a way to inform the driver with appropriate code and sensors?

For people interested in an all-in-one IDE, Clang is an LLVM based GCC replacement. It can support multiple chip architectures with the same "GCC", and thus, may become the basis of an all-encompassing IDE in the future.

what is the benefit to use RTOS such as uC/OS II or III? Is it more complecate or overburden to make codes for small embedded applications? If so, what is the measure or reference to use or not an RTOS to develop an application? For e.g. code size or complexity or any other reasons to be developed application?

kenstan, use the most convenient language that suits your application on the chip you need to use. C will allow you a wider range of chips, but if you are only interested in big chips like ARM CPUs, you might as well use c plus plus, if you prefer it.

Q: @Jon - Your specific recommendations for IDE's (by chip mfg & chip family)? Is a place to see comparisons? I have a DVD full of various free and eval copies of IDE's - in addition to the Visual Studio versions I use in the day job.

A: I don't know of any comparison sites. Usually people choose the MCU first and go with the tools available for it rather than vice versa.

A: If you mean the creator of the IDE used open-source, I believe the MPLAB X uses NetBeans, so you can easily create add-ons. If you mean an IDE for open-source development tools for a PIC, visit: http://gputils.sourceforge.net/.

Alaskaman66, it is better to safely constrain the output than to try and figure out all the inputs. Of course, the HP example may be more about the chip being shorted out, which means the board level design may be partly to blame. And if that was the case, the rest of the circuit should have cut the heating on account of no CPU response. I suspect that unit had more problems than just corroded keys!

Q: Question on software design: what about dealing with failure modes? I remember reading HP built a labware heater that could catch fire. Turned out the keypad had corroded so two keys were activated at once while the unit was in the heating mode. The progran simply halted.

A: You strive to prevent that sort of action. Always assume someone will do something wrong, press two keys at a time, not read a display message, etc. You can't prevent every type of failure, though. Obviously the heater should have had a simple overheat sensor that would kill power if it ran "too hot" for a period of, say 1 minute.

Alaskaman66, it depends on the simulator, and your settings for it, though I have little experience with them. Ultimately, you may be able to get your simulator to run in real time if you sacrifice some features. But more importantly is to be able to debug from the boards.

Question on software design: what about dealing with failure modes? I remember reading HP built a labware heater that could catch fire. Turned out the keypad had corroded so two keys were activated at once while the unit was in the heating mode. The progran simply halted.

Q: It's been a LONG time since I had a C+ class... Any basic tutorials you would recommend?

A: I'm not a C programmer, so I can't relate any experience, I'd check C books on Amazon and find one that got good reviews. Read the reviews, too. Google has some courses of its own and I'd bet you can find other online courses, too. Let me know how you make out.

Also, getting additional chips to use with the launchpad can allow use of different peripherals than are included in the kit. (The new launchpads are shipping with 20 pin chips that are larger than the original 14s)

Q: Jon, would you consider an application that requires real time response in a fast changing environment to need more advanced software than some application that simply waits for an input and performs an output - like enabling a heater? Especially if the real time application could outpace the MCU?

A: Yes, you might need a small scheduler to handle the tasks. If the tasks outpace an MCU, you'll need a faster MCU or perhaps you can divide tasks between two MCUs and have a simple communication link (UART) transfer information between them. There are some small operating systems available for MCUs, so if you need more info, a Google search should find more information for you.

Jon, would you consider an application that requires real time response in a fast changing environment to need more advanced software than some application that simply waits for an input and performs an output - like enabling a heater? Especially if the real time application could outpace the MCU?

Q: What kind of tools / softwares you recommend for GUI development forr Embedded systems?

A: Some of the MCU development tools include a GUI package. It can be a challenge, though, because much depends on the display you use--size of the display, color or b/w, necessary graphics and fonts, etc. You might take a look at the tools from Amulet that help you create a GUI on an LCD. Good for prototypes and short runs. Amulet has goof tools for GUI creation on its LCDs.

@Jon - Your specific recommendations for IDE's (by chip mfg & chip family)? Is a place to see comparisons? I have a DVD full of various free and eval copies of IDE's - in addition to the Visual Studio versions I use in the day job.

Most of my experience is with AVR. If you're designing the hardware and software (e.g., breadboarding something at home), that's a good family to start with. The development environment is free and the chips are as cheap and varied as others.

2) Add hyperlinks to referenced web sites and vendors within the presentation.

3) Add any additional comments or correntions to the slides in the archive so that key points or errors found during the presentation can be corrected and we can download the updated presentation file.

Q: After regaining my composure, optimizers can change code such that it does not work as one would expect, especially writing internal debuggers. Atmel IDE allows one to turn OFF the optimizer thus building code that I design, not the machine.

A: That's true. I recommend people first run their "unoptimized" code before they try to optimize it. That's for raising that point.

After regaining my composure, optimizers can change code such that it does not work as one would expect, especially writing internal debuggers. Atmel IDE allows one to turn OFF the optimizer thus building code that I design, not the machine.

2) Add hyperlinks to referenced web sites and vendors within the presentation.

3) Add any additional comments or correntions to the slides in the archive so that key points or errors found during the presentation can be corrected and we can download the updated presentation file.

kenstan, I hate to say this, but do a google search for tutorials on C. I would focus on learning ANSI C, rather than a specialized version of C. The PIC MCC18 C compiler is very close to ANSI C, which is why I prefer it over some of the duino style languages. An easy way to start out with C and embedded devices is to get an embedded dev board that has some C example code. I like this one: http://www.modtronix.com/product_info.php?cPath=1_36&products_id=149 because it has a network interface and doesn't require specialized programming hardware as the firmware can be compiled and the uploaded to the device.

kensten, depends on what you want to do. I use C with some assembly (for stuff C can't access) when I work on the PIC 18 series of chips. I find C to be easier to read and faster to develop and debug. I move between projects a lot and sometimes will come back to a project source code after a month or two. By having the code in C, I can read it real easy and refamiliarize myself with it easier than assembly. Plus, I use C & java on mac/windows/linux for other work so it makes the learning curve easier.

I have a question about third party and programmer tools (jtag programmers) . how can I make sure those tools work with third party development tools? I used link programmer ATMEL for AT9(ARM9) and didn't work with compiler (KEIL ) . how can we taker over this issues?

We use mikroElectronica and MPlab almost exclusively at work. They work great. MicroElectroinica has lots of libraries andI would recomend it for someone learning. My supervisor taught himself that way.

What learning tool, for us non-programmer (reluctant beginners) best addresses the differences and teaching of the MANY different addressing modes. Decision and control, interupt and pin handling not so bad ... but the addressing mechanisms are terribly confusing.

Reluctant: took minimum programming in eng school. Really useful to know for my current job. I want to play with software / hardware at home, expand the horizons. I never had a good professor, never really caught on that well.

Mrs. Z... How reluctant of a beginner are you to get into C? I think that the K&R is the best C book ever, since it is concise, but it is so concise that it can be hard for non-programers/non-engineers to devour.

The inefficiency stems from the machine not being able to take in the whole context of the application. I'm sure the efficiency is highly variable, depending upon the problem. The upside is that it's easier to maintain when changes are necessary. Plus, the auto-generated code is likely higher quality (fewer bugs in the code itself).

In a small project, with 5 people at most, does it make sense to create "modules"? I.E. two people take care of hardware, other two of software... or is it better for everyone do a little of all parts?

Todays MCUs are much faster as well as contain higher memory compared to say 10 years back...In regards to that I wonder does Assembly Language Programming still has any advantage over much simpler C/C+ ? Why does anybody needs to choose ALP other than for having fun?

Q: Ok I was wondering if manuals usually incorporate a rough calculation....such I have encountered with PLCs.

A: You can look at the assembly-language listing produced by a compiler and use the MCU clock frequency and number-of-cycles-per instruction (it can vary from instruction to instruction) to calculate the time needed for a routine. That's a tedious process. Might be easier to put an output instruction at the start and change the state of the output at the end. Use a storage scope to display the signal and determine the time that way. I have used that technique.

FYI,Your IT department might need to unblock "blogtalkradio.com"for you to get the streaming audio (and to even see the audioplayer that appears just under the class description near thetop of the page).

hmmm... is there a bug in the point system? according to "how do i graduate?": "A total of ten points can be scored for each of the five lectures in a track". So how do I get 25 points before the third session even started?

@vagish archived classes are here:http://www.designnews.com/lecture-calendar.asp but problem with audio ...I have the same on this computer and I cannot solve it. It probably comes from firewalls or other Internet protection at browser

hi..i need help..i am from India.i missed previous lectures and though they are archieved i am not able to see audio player or something on those lecture's link..what should i do??my flash player is upgraded and acitive x is not blocked

Focus on Fundamentals consists of 45-minute on-line classes that cover a host of technologies. You learn without leaving the comfort of your desk. All classes are taught by subject-matter experts and all are archived. So if you can't attend live, attend at your convenience.