Answers to Qs: Do you have time in your designs to try multiple implementations or do you have time for only a single version? Only occasionally have I had time to do trade-off analysis. Most of the time, schedule is king.
Answers to previous questions: Are there specific peripheral functions that were critical to your most recent design (timer, ADC, serial port, etc)? Yes. Serial (for simple debug interface), ADC (for performing measurements), Timers (periodic functionality), etc.
@Alaskaman- Luckily the functions that can get bombed are fairly easy to spot, but it can be important to think about it in some detail. Peripherals (like timers) are the biggest issue. Usually you turn the timer off while you are loading a value so even this issue can be avoided...
? I learnt that we now have development environments that can highlight power hungry code in a bid to keep power consumption in tight check. Do we have these facilities available for both assembly and C codes...
@Bob- You are correct. MCU targeted compilers (like the one from IAR) are much different from CPU oriented compilers. MCUs have a much smaller recource base (memory and performance) and their compilers need to be much more efficient.
? Are C compilers for MCUs different than for "commercial" CPUs? I'm thinking that some of the typical C internals (eg, Stack Frames) are very memory intensive, and maybe not particulary efficient for real-time embedded processing.
@gamatec- VOLATILE can be important in an ISR if you don't want the variable to be removed, but if the variable isn't needed outside the ISR is won;t need the VOLATILE indication (at least I can't think of a case off hand, unless maybe another interrupt could come in while you are in the current ISR...).
@ncardoso72- Assembly is best for real time systems but C can also be used if the code needed is vary large. You can just do the critical functions in Assembly (like for atomic operations and peripheral initialization) and the rest in C. Do you have an RTOS or just doing it 'by hand'?
I have been using C and C+ in "Real Time" motor control systems. as is the case with any digital system the sampling interval/ allowable delay is the determining factor along with the speed of the MCU.
@sherlock- The important thing with cache is to understand how big it is and what replacement algorithm it uses. That way to can try and fit your 'inner loops' into cache so you don;t need to go to main memory very often...
A good tool for optimitation is have and emulator than have the capacity of tracing portions o program, with this you can see really how time spend every task and detect the more time consuming and try to center in optimize this (polishing algorithm, try another view of task).
Is CISC or RISC architecture more suitable for C coding(as opposed to Assembly coding) ? I would think the way instructions are sturctured, in general, C will be more suitable for CISC archticeture and Assembly for RISC.
Bob Loy:OK...as a learning experience it makes some sense..but I don't think that reasons 1 & 2 are valid. Hey have fun! You ought to really go hog wild and write the new language in itself and bootstrap the whole thing!!
@firstname.lastname@example.org - 4 reasons: 1) New architecture. Does things other architecures don't, lots of new hardware logic. 2) Proprietary machine language - Any translation from a current Forth would practically be a write from scratch anyway. 3) Different operators - I'm used to C, so as much as possible I am changing standard Forth ops to their C equivalents. Might as well piss off all the Forth user groups at the same time! 4) I'm interested in HLL design generally, so starting from scratch is the best way for me to learn anyway.
The streaming audio player will appear on this web page when the show starts at 2 PM Eastern time today. Note however that some companies block live audio streams. If when the show starts you don't hear any audio, try refreshing your browser. If that doesn't work, try using Firefox or Google Chrome as your browser. Some users experience audio interruptions with IE. If that doesn't work, the class will be archived immediately following our live taping.
In many engineering workplaces, there’s a generational conflict between recent engineering graduates and older, more experienced engineers. However, a recent study published in the psychology journal Cognition suggests that both may have something to learn from another group: 4 year olds.
Conventional wisdom holds that MIT, Cal Tech, and Stanford are three of the country’s best undergraduate engineering schools. Unfortunately, when conventional wisdom visits the topic of best engineering schools, it too often leaves out some of the most distinguished programs that don’t happen to offer PhD-level degrees.
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.