I've been asked to write a tutorial to introduce people who have had a bit of programming experience to embedded hardware and software. I can think of plenty of material for such a tutorial, but I don't want to miss something important, or treat my particular background as universal, so I'm hoping that some of you will offer your top N things to teach an embedded newbie (with N being a function of your free time and/or enthusiasm). Thanks,
Well, my bias would be 8 bits and no OS. But maybe there are good arguments otherwise, so I don't want to narrow down at this point. I'm trying to hear views outside my natural inclinations.
Ok, here goes, from years of work with embedded guys (I am an analog dude myself):
a. Do not trust the POR/BOR on a uC. b. If marketing says the POR/BOR is really good, don't believe it. c. Learn how to roll your own POR/BOR.
Seriously, this is not a joke. By far the most grief I unearthed in embedded designs was related to that.
d. Learn a little bit about simple HC logic.
I found that embedded guys would often try to do everything within the confines of a processor. Cases where they selected a larger uC at over a buck in added cost where a couple of 15c shift registers would have sufficed to give them the additional port pins. The topper was when I put a big fat DSP out of a job. All that was left for it was handling two RS232 links.
e. Get a copy of "The Art of Electronics"
Some embedded guys know next to nothing about the transistors and whatnot that the hardware guys connect to a uc. Or maybe even an inductor. It's ok not to be too familiar with discretes but the book will help them understand if they have to.
f. Use the WDT and resist the temptation to kidnap its timer. g. Make a hazard analysis and stick to it.
f and g is the 2nd on my "bug unearthing list". It's so easy to get lost in the code, to the point where one fails to think about what happens when event 23A does not result in valve 3 to be actuated because the driver FET has blown out.
h. Take a peek at the layout.
This is 3rd on the list. They should get familiar with how a good layout looks like. Then when they see there's only one lone bypass cap somewhere in the boonies and numerous splits in the ground plane they should become suspicious and get a 2nd opinion.
i. Learn when to hold'em and when to fold'em.
This would be 4th. Often folks try to do it all on their own. Until the day of reckoning cometh at the EMC lab or somewhere. A second pair of eyes could have told them that they'd better not let the address lines chat around when not needed and so on.
j. Learn about ESD.
Often LCD lines, keyboard lines, D-sub-something connections and such are left completely unprotected, running smack dab into a port pin. All it takes is a dry winter day and a pair of Nikes ... tsssk ... phut ... nothing goes anymore.
k. Consider 2nd sourcing.
Not easy with uC, other than the trusty old 8051 44-pinners. But: Often the board can be designed to accept two or more uC of different brands that aren't 100% identical. At least it's worth a consideration.
Hope this helps.
--
Regards, Joerg
http://www.analogconsultants.com/
"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
If you are most experienced with 8 bits/no OS then teach that. The fact of the matter is that the things a programmer on a 1GHz uC with
512MB RAM running Linux needs to know are not the same things a programmer writing code for a 1K PIC needs to know, and trying to make one program teach everything is a recipe for failure. Take the topic you know best and engage your students with this information.
Yes. I'll second that. However, tell them that crossing from 8bit turf onto 16bit turf such as the MSP430 is really not rocket science. At least to me it wasn't.
--
Regards, Joerg
http://www.analogconsultants.com/
"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Embedded computing is like the insect species Embedded is everywhere, insects are everywhere Embedded comes in many sizes, shapes and forms Insects come in many sizes, shapes and forms Some insect species can live almost anywhere Some insect species can only live in specific places Some insect species can only live with certain animals Some embedded computing aspects can be used anywhere Some embedded computing aspects can only be used in specific places Some embedded computing aspects can only be used with certain ndustries
Embedded computing is like the insect species Embedded is everywhere, insects are everywhere
(Copyright 2009 Paul Carpenter)
--=20 Paul Carpenter | snipped-for-privacy@pcserviceselectronics.co.uk PC Services Timing Diagram Font GNU H8 - compiler & Renesas H8/H8S/H8 Tiny For those web sites you hate
It's too broad to define. I'm right now working with a Broadcom
3548, a Connected Device DTV SoC - it has, in addition to the ATSC/HDMI/component receivers and FHD/surround audio codecs on chip also not one but two 400MHz MIPS32 cores. It has a compositing graphics core with OpenGL support. Plus the usual ethernet etc. Our system runs an embedded Linux SMP kernel. Here's the public brief; it's pretty amazing what they've crammed into a single chip:
formatting link
Working with a system like this is *completely* different from a logic-substitute 16-pin PIC bit banger.
You might want to start your lecture series with a characterization of embedded systems, and then let the participants know which area you're going to focus on.
Teach how to read a data sheet. Absolute maxiumum ratings are not operating regions. What the front descriptive paragraphs promise, the expanded details take away.
l. Document, document, document, start _before_ writing code.
Commented source code is not documentation. Good planning before writing code is very valuable. As one of my bosses put it: "If you didn't document it, it didn't happen".
--
Regards, Joerg
http://www.analogconsultants.com/
"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
I like his point about the PWM. The situation I witnessed was the opposite, someone had left the PWM at 100% ... a high amperage smell wafted through the room, then ... *BANG*
--
Regards, Joerg
http://www.analogconsultants.com/
"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
If they have some programming experience, then tackle this from a physical-numbers angle.
Pin Count is a good one. Silicon area is another. PCB layers is another.
- show them some 6 pin uC - in the sub 50c region. (eg Freescale RS08, Atmel ATiny10, MicroChip PIC12? et al) - and show them code for a Toothbrush timer. That's a peg in the ground.
Then, chose something they are likely to already know, but may not really know the content, such as MP3 players / cell phones. Do a Pincount / Silicon area / PCB layer comparison, and you have another peg in the ground.
That is why I said 'species' meant as in plural of all insect species..
Well I would always come last, in that race...
--
Paul Carpenter | paul@pcserviceselectronics.co.uk
PC Services
Timing Diagram Font
GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
For those web sites you hate
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.