HOME  |  NEWS  |  BLOGS  |  MESSAGES  |  FEATURES  |  VIDEOS  |  WEBINARS  |  INDUSTRIES  |  FOCUS ON FUNDAMENTALS
  |  REGISTER  |  LOGIN  |  HELP
Comments
You must login to participate in this chat. Please login.

Thank for nice lection

Iron

for last question: Time for design always is valuable thing, so I tries to make design goals in 1st version with little modifications in production design, when it's possible, of course.

Iron

Memory not constraint in mine last designs, but usage value near 70-80 percents of RAM

Iron

answer for 2nd question,-  yes, in last design was several critical functions, for DAC control, RS485 & USB interfaces.

Iron

for 1st question. - yes, almost all our designs has user interface (not for all MCUs in system)

Iron

Memory size is a key most of the time

Thanks for having this on archive so I can catch up after two days on the road.

Regarding your question on memory, memory = money.  Multiply the increment X 500K and you know what I cost or save a year.

One thing I missed today is maintainability.  It is easier to hand off C to product support engineers since they are more familiar with C.

Iron

Another good session, Warren. Thank You Warren and Lauren.

Iron

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.

Iron

Answers to previous questios: Is memory size a key constraint in your designs? On occasion, yes. Low cost design, wimpy processors, extremely resource constrained.

Iron

Answer to Q.: User Interface = yes, Peripherals = Timer, ADC.

Iron

Hi all, ... late today.

Iron

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.

Iron

Back from my meeting. Answers to previous questions: Do you typically have a user interface on your designs? Yes, have a user interface in our design.

Iron

thanks for the archives

 

Iron

Thanks Mr. Miller!

Iron

Thanks Warren. Thanks everyone. There were some C programming reference materials in an earlier class: Practical C Programming by Steve Oualline...

@All- Ok, if there are more questions let's go over them tomorrow. CU then...

Iron

The ATMEL SAM4L EK kit has a built in power monitor with graphic display -- most enetertaining and not that expensive. Available at Digi-Key. ($150 ??)

 

Iron

@aapl- The environment usually supports both assembly and C so 'power profiling' should work for either one. It is a very useful tool!

Iron

@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...

Iron

? 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...

Iron

@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.

Iron

? From your example of a multi-cycle instruction that would be "bombed" by an interrupt, do you recommend identifying ALL similar in the code then making them atomic via accosser functions?

It seems this kind of programming problem might not show up during testing, but after the product hits the market.

? 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.

Iron

Thank you all, esp WM! The PResentations are much appreciated.

Let me know if I missed any questions...

Iron

Thank you very much!

Iron

@Whirleybird- Yep audio is archived too. As well as the chat!

Iron

Thanks, Warren. Good presentation in a short time.

I will be ready for the fight club and my bet is on C.

@richwilliams- Good suggestion. Thanx!

Iron

QNX was written in C and supports C and C+

@ehatien- You might try the CEC Class on selecting an MCU. It probably will have some info on memory size. If you don;t have a previous design it is touch to estimate code size.

Iron

Thanks for the useful sessions

Chris Shore has given talks at a a couple of the ARM Technical Conferences on Efficient C Code for ARM Devices.  A search for his name and the title should turn up his white paper

Thank you for the excellet presentation!

Iron

@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...). 

Iron

Yes, we are currently using QNX.

Iron

@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'?

Iron

thanks for a good info and pleasant chat 

Iron

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.

? New to programming using 8 and 16 bit micros.  How can one gauge the size of memory will be needed when trying to choose a micro?

Iron

? It is necessary to use VOLATILE modifier inside ISR ?

@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...

Iron

Thanks WM! ? Will the audio be available with the archived classess?

@Alaskaman- C+ tends to be better for structured data like data bases. Otherwise they are very similar (C and C ). 

Iron

Another great presentation.  Thanks!

Iron

Thanks for presentation very informative

Iron

@JCG64- There are lots of good books on Assembly Language programming. It's best to look at reviews from other engineers to see if the topics are what you need..

Iron

? What is best for Real Time systems: C or Assembly? Can C be used at all?

Iron

Hi Warren, About optimization i have a question.

How i can set code and data cache more efficiency? I am using Cortex-m3 and transfer from PIC18&24.

Iron

? Is there any advantage to using C+ over C

@Jafar- There is a good CEC class on selecting an MCU. Check out the archived classes..

Iron

Thanks , Warren. C you tomorrow (haha)

Whoa, tomorrow is building to be a real cooker...   (grin)  See you then!!  Thank you everyone!!

? Can you recommend any web site that suggests set of "good techniques" that we can use while writing code  in C specifically for MCUs

 

Iron

@srdmahesh- A good resource is typical the compiler suppliers web site. Check out IAR for example.

Iron

? Can optimizations be restricted to certain parts of code?

Iron

Thanks Warren & Lauren

Iron

? Warren, do you have a recommended text book or learning material for beginning assembly language?

Iron

Time to try what if will be great but usually there are time constraints

Iron

Thanks for another good class

Gold

Well done and thanks

Iron

Thanks Warren, Lauren, and Digi-Key

Iron

Thank you for today's lecture Warren. Thank you Lauren and Digi-key

Iron

Thanks Warren and Lauren. Great presentation.

Iron

? what are the key elements in choosing the right mcu ?

?may be in another presentation soon?

Please use a "?" at the front of your question so it is easy for me to see them.

Iron

Thanks woulld like to stay on but work calls.

Iron

Thanks Warren.  I always wondered about optimization

Iron

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).

Iron
thanks Warren and Lauren
Iron

Can you recommend any web site that suggests set of "good techniques" in C specifically for MCU ?

Iron

Accesing the implementation link: it opens IE?

Iron
only one implementation
Iron

Can optimizations be restricted to certain parts of code?

Iron

usually no time at all - product needs to be shipped to the customer ASAP

Iron

Time is not a problem - lots of time...

Iron

Hello, hello, everybody,

Nice to be here again.

Iron

Mostly just write in the higher level language then optimize out slower parts later

Iron

Have time to do efficiency tradeoffs. Merged listings are a great help to determine the efficiency of the compiler.

not much time unless it's in the beginning of the design and implementation phase...

Iron

No time. We're lucky if the code is fully functional before the product ships. (I'll admit this is not typical of most companies)

Iron

single version due to time lack

I usually have time for a single implementation.

Iron

Can try different implementations on critical sections, or things that will be used many times in the future

Iron

limited time is available to perform analysis

 

Iron

Usually just do a single version. /next version just in update products.

Iron

Hard to do tradeoffs on the front end.  Where code needs to be optimized we will go back and code it a couple of ways and do the comparisons.

Time constraints are always a problem, but many times multiple implementations are a must.

Iron

Try multiple implementations.

We usually have time to do trade-off analysis.

Iron

always rush, rush and no time

Iron

single implementation, to make sure it works at system level 

Iron

usually allocate time for trade off analysis

Iron

Usually just do one 

Iron

Limited time - need to get product 'out the door'

 

Iron

No, I really don't use that tradeoff analiszuy.

Iron

time not usually a constraint

Iron

Warren's question was: Do you have time in your designs to try multiple implementations or do you have time for only a single version?

Platinum

? what do you mean by local vs memory??

@gamatec  It means an operation that occurs all at once.  Nothing can happen in the middle of the operation (like interrupts).

Memory is big issue and always is constant.

Iron

The previous type of optimization is called "keyhole" optimization.

? What it mean ATOMIC operation ?

I use CORTEX M3 M4 -- I can buy chips with enough memory for any project. Not an issue. Atmel, TI, ST etc.

Iron
if the memory is a critical constraint then I would change the target MCU.
Iron

Memory is an issue when I use an RTOS on a small memory size uC

Iron

market provides plenty of memory size choices

I am driven to the smallest that is sufficient for the job

Iron

Missing a semicolon on for loop on slide 12.

For automobile stand-alone industrial instruments the memory size is important and usually it limits the amount of functionality that can be implemented.

Iron

Around 64K is ok for our application. memory is not a constraint for me.

Iron

Yes, RAM and FLASH on different projects

Iron

Memory a constraint, maybe not a key one, but have to keep an eye on it.

Iron

Memory size seldom an issue when using the Cortex M3 & M4s which are pretty big.  When using smaller parts like M0s or PIC chips, I usually have to pay attention to it.

memory size not a big issue.

Iron

memory less important than low power. My Posts are getting dropped again today.

Gold

 memory size is not aconstrain

Yes, memory size is a key constraint.

Iron

memory is always a constraint 

Iron

Sometimes memory size contraint has been a problem.

Iron

memory is always in short supply...

Iron

Not that much. Plenty of memory.

Iron

Memory size not an issue for my tasks

Iron

memory size is a factor

 

Iron

memory size... depends

 

Iron

Yes. Memory size can be a key constraint

Iron

Not that much. Plenty of memory.

Iron

With new architectures memory is less of a concern.

Memory is not a key constraint.

Iron

constrained by memory

Iron

Memory size is not a key constraint

Iron

mem is a major constraint

Iron

Memory size has not been so far

Iron

Memory size is key component 

 

Iron

Memory size is critica

 

Iron

There is never enough memory..........................

Iron

typically, yes, memory size

Iron

Memory size not usually a factor

Iron

Warren's question was: Is memory size a key constraint in your designs?

Platinum

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.

 

Iron

adc, serial, timers, usb

Iron

Timer, Thermalcouples

Iron

Timer, SPI (HiPerf ADC), I2C (peripheral backbone), UARTS, USB

Iron

Timers, serial / 485 communications, sensors (several different parameters sensed) A/D, motor control.....

Iron

keyboard (serial),

Iron

seriel interface & bluetooth module

Long live the UART!

Iron

Camera interface on STM cortex-m4.

Iron

adc, serial, spi, can, timers, usb, i2c 

 

Iron

ADC, multiplexers, motor drivers

Gold

Camera interface on STM cortex-m4.

Iron

UART, I2C, A/D, D/A, PWM, motor control PWM, timers

Iron

Serial, timers, ADC, DAC typically

Iron

ADC, timer and serial

Iron

timers/pwm, serial, SPI & ADC.

Iron

Interrupts, Analog, DMA, SPI, I2C, Timers, UART

Iron

Peripherals - not sure yet which are critical.

Iron

@Alaskaman66  Every C compiler needs to be targeted for a specific MCU or MCU family.  Where you'll see differences is with the level of optimization that the compiler has implemented.

Iron

? Isn't the ARM a register machine as oppossed to a stack machine?

It is also a "load and store" architecture.

ADC, DAC, SERIAL, TIMERS.

Iron

The "R" in ARM stands for RISC.

Iron

Warren's question was: Are there specific peripheral functions that were critical to your most recent design (timer, ADC, serial port, etc)?

Platinum

user interface, 2line 16 character lcd,sensors, push buttons

?? why does slide #6 say 56 instructions but slide #10 yesterday says 87 instructions

Iron

? Are C compilers tailored to each MCU

@gwp2  Or need more!  :)

Iron

Only an interrogation interface; simple serial.

I can see by my post I've had way too much coffee today.

Iron

Hello form south central PA, 72 degF and balmy ...

User Interface - yes, simple text based monitor & debug.

Iron

Typically 16 button with 2 line hexidecimal display on most,  a couple have had graphics cabibilty to draw graphs of system performance.

Iron
user interface: text LCD or FNDs and switches
Iron

Some type of UI is typically required - the level depends on the specific unit.

Iron

Yes I do use user interface with a 4X4 keypad and a los resolution Lcd

 

Rockwell does LEDs to web-based displays

We are on slide nine.

Platinum

UI with button and LCD graphics

Iron

touchscreen user interface

Iron

hello from Sacramento

Iron

Simple user interface with LCD, LED's, pushbuttons or thumbwheel.

Iron

Yes.  Implement user interfaces.  Sometimes buttons.  Sometime keypads.  Sometimes LCD graphics.  Sometime LCD character displays.

Iron

http://en.wikipedia.org/wiki/Advanced_Microcontroller_Bus_Architecture

User interfaces are buttons w/ multi-line (8+) text display

Iron

Yes, key, UART, SPI and motor drive bridge etc.

Iron

usually have user interface. simple butons, dials, guages.

Iron

I have done simple hardware buttons up to full graphical interfaces

Iron

I have not done any UI so far

Iron

AHB-Lite is a subset of AHB formally defined in the AMBA 3 standard. This subset simplifies the design for a bus with a single master.

May or may not have user interface. It depends on the project type.

Iron

simple user interface most of the time

Iron

no user interface, mostly just LCD numeric display

Iron

Not currently implmenting GUIs.

Iron

Stellaris UI, yse; MSP430, typically no

Iron

No user interfaces yet.  Just status LEDs.

Iron

no user interface, data transfer that can be used in a user interface

Iron

Yes, monochrome and color w/touch

Iron

No user interface.

 

Iron

Implement basic UI

Iron

Yes, User interfaces are used.  Buttons, with LCD graphics.  No video todate.

Iron

User interface implemented via a touch screen

We are on slide eight.

Platinum

Will start in this new project (medical).

Mostly I don't.

Iron

Limited user intf.

 

Iron

Warren's question was: Do you typically have a user interface on your designs?

Platinum

Ok I see the slides. Thank you.

Iron

? are we going to cover MISRA C ?

http://en.wikipedia.org/wiki/MISRA_C

download the slides from the link under special educational materials above the chat window

 

Iron

Yes audio still is started and clear.

Iron

We are on slide six.

Platinum

Yes audio is started and clear.

Iron

?It has started. But how can i see the slides?

Iron

We are on slide five.

Platinum

Has the audio started?

 

Iron

Hello from Minneapolis - sunny & 78 degF

Iron

We are on slide four.

Platinum

Greetings from Vermont

Iron

Greetings from Chicago

Iron

Hello from Toronto, ON!!

Iron

Hello from Milwaukee!

Iron

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!!

Hi all - The audio is live!

@Alaskaman66: ARM is RISC.

Iron

RISC was called out be Warren

Iron

Hello from Manizales, Colombia.

? From the last class: Is the ARM Cortex architecture considered to be RISC or CISC

Greetings from Midland TX another hot day.

Iron

Greetings gang from Buffalo, NY!

Iron

Hi from not-so-sunny Syracuse

Postings working ? Or still hangups? Testing 123

Yeah Philly's had a LOT of rainfall this year, above record highs.

Iron

Howdy from Fort Worth, TX

Iron

Good. Made it.  Looking forward to this.

Iron

hello from Mishawaka

Iron

Hello from Sunny Saint Louis, Missouri

Iron

Hello from Tennessee

Iron

Hello from kinda cool Atlanta

Iron

Greetings from Wheaton IL

Morning from misty Valdez

Hello from Johnson City, TN

Iron

Hello from Charlotte, NC

Iron

Hello from wet Florida

Iron

Aloha from Montana with a partly cloudy 71 degrees F.

Gold

Hello from SW Michigan

Iron

@jjrochow@ra.rockwell.com - 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.

Iron

Finally- raining someplace, but why Philly...

Iron

Florida, hearing thunder.

Iron

Good evening from Valladolid, Spain.

37ºC or 99ºF in a sunny and hotty day.

Iron

Hi from Roppenheim, France!

Iron

Be sure to follow @designnews and @DigiKeyCEC on Twitter for the latest class information. We encourage you to tweet about today's class using the hashtag #CEC.

Platinum

Remember to use a leading "?" in your chat (when we get to the question and answer section) when are asking questions of me. Easier to spot them that way...

Iron

Hello everyone from sunny SE Lake Simcoe area of Ontario Canada

Iron

hello everyone. rainy in Philly today

Iron

Hi everyone! Welcome to todays class.

Iron

Hello from Beaverton, Oregon. I have a little time before my multiple meetings, then I'll have to play catch-up. Good day everyone!

Iron

Hi from Thessaloniki, Greece

Iron

Good Morning from Fremont CA

Iron

Good morning from Edmonton, AB

Iron

Please join our Digi-Key Continuing Education Center LinkedIn Group at http://linkd.in/yoNGeY

Platinum

Bob Loy: Why write a Forth-like language? Why not just use Forth-80, or 83 or FIG Forth?

Good morning from the garden spot of the universe.

That is of course - Minneapolis Minnesota!

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.

Platinum

Good morning from cloudy and cool Cleveland Ohio, the home of Rockwell Automation's Mayfield Advanced Technology Group. Why are we signing on so early?? This webinar starts at 2 EDT!

Good Morning from Toronto

 

Iron

Good morning from Scottsdale, AZ

Iron

Good Morning from Toronto

 

Iron

Be sure to click 'Today's Slide Deck' under Special Educational Materials above right to download the PowerPoint for today's session.

Platinum

Good morning from cloudy Michigan

Iron

Good morning from Mobile, AL

Good Morning from Los Angeles

Iron

Good morning from rainy Panama City FL.

Iron

good morning, everyone

Iron

Good Morning All!

 

Iron

Morning from Portland Oregon

Iron

C u where? 

Rainy and cool in Aurora, Ontario

Iron

Good morning from NY.

Iron

Chat window really is doing bad today!  LOL

Iron


Partner Zone
Latest Analysis
Researchers in Canada have developed a chin strap that harvests energy from chewing and can potentially power a digital earplug that can provide both protection and communication capabilities.
In case you haven't heard, the deadline to enter the 2014 Golden Mousetrap Awards is coming up fast Oct. 28! Have you entered yet?
Made by Monkeys highlights products that somehow slipped by the QC cops.
A Tokyo company, Miraisens Inc., has unveiled a device that allows users to move virtual 3D objects around and "feel" them via a vibration sensor. The device has many applications within the gaming, medical, and 3D-printing industries.
In the last few years, use of CFD in building design has increased manifolds. Computational fluid dynamics is effective in analyzing the flow and thermal properties of air within spaces. It can be used in buildings to find the best measures for comfortable temperature at low energy use.
More:Blogs|News
Design News Webinar Series
9/25/2014 11:00 a.m. California / 2:00 p.m. New York
9/10/2014 11:00 a.m. California / 2:00 p.m. New York
7/23/2014 11:00 a.m. California / 2:00 p.m. New York
7/17/2014 11:00 a.m. California / 2:00 p.m. New York
Quick Poll
The Continuing Education Center offers engineers an entirely new way to get the education they need to formulate next-generation solutions.
Oct 20 - 24, How to Design & Build an Embedded Web Server: An Embedded TCP/IP Tutorial
SEMESTERS: 1  |  2  |  3  |  4  |  5  |  6


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.
Next Class: October 2
Sponsored by Altera
Learn More   |   Login   |   Archived Classes
Twitter Feed
Design News Twitter Feed
Like Us on Facebook

Sponsored Content

Technology Marketplace

Copyright © 2014 UBM Canon, A UBM company, All rights reserved. Privacy Policy | Terms of Service